fleet

package
v1.32.0-rc.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2026 License: Apache-2.0 Imports: 47 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildSignalPatchWithAnnotations added in v1.32.0

func BuildSignalPatchWithAnnotations(signal, id string, extra map[string]string, config ...json.RawMessage) ([]byte, error)

BuildSignalPatchWithAnnotations behaves like buildSignalPatch but also merges extra annotations (e.g. the rollback-target checkpoint) into the same patch. Exported so reconciler tests drive stop and promote signals through the real Fleet patch construction instead of an approximation that can drift.

func BuildStartPatch added in v1.32.0

func BuildStartPatch(dda *v2alpha1.DatadogAgent, experimentID string, config json.RawMessage, rollbackTarget, expectedHash string) ([]byte, error)

BuildStartPatch builds the whole start patch: the signal, ID, rollback-target and expected-spec-hash annotations plus the experiment spec, all in one atomic JSON MergePatch. The caller supplies expectedHash so this stays a pure builder — the hash comes either from an apiserver dry-run (planExpectedSpecHash, the production path) or from an in-memory merge (ExpectedSpecHashAfterInMemoryMerge, the test-fixture path).

func ExpectedSpecHashAfterInMemoryMerge added in v1.32.0

func ExpectedSpecHashAfterInMemoryMerge(dda *v2alpha1.DatadogAgent, config json.RawMessage) (string, error)

ExpectedSpecHashAfterInMemoryMerge applies config onto a copy of dda in memory and hashes the result. It does NOT invoke apiserver structural defaulting, so its output diverges from what the reconciler will compute against the persisted object whenever the patch introduces a struct with a CRD-declared default the caller omitted (e.g. ContainerPort.protocol -> TCP). Production code must use planExpectedSpecHash instead; this helper exists for test fixtures that drive fake-client scenarios where no admission runs.

func ManagedAgentInstallationReadinessTags added in v1.30.0

func ManagedAgentInstallationReadinessTags(ctx context.Context, reader client.Reader, identity ManagedAgentInstallationIdentity, namespace string) ([]string, error)

Types

type Daemon

type Daemon struct {
	// contains filtered or unexported fields
}

Daemon subscribes to fleet-specific RC products (installer configs and tasks) and runs after leader election as a controller-runtime Runnable.

The daemon processes local managed Agent installation intents and translates RC tasks into experiment annotation writes. It reports both outcomes through RC and never writes status.experiment.phase, which belongs to the reconciler.

func NewDaemon

func NewDaemon(rcClient remoteconfig.RCClient, mgr manager.Manager, revisionsEnabled bool, options ...DaemonOption) *Daemon

NewDaemon creates a new Fleet Daemon. When revisionsEnabled is false, experiment signals are rejected because the reconciler cannot process them without the ControllerRevision machinery.

func (*Daemon) NeedLeaderElection

func (d *Daemon) NeedLeaderElection() bool

NeedLeaderElection implements manager.LeaderElectionRunnable. The daemon only runs on the elected leader.

func (*Daemon) Start

func (d *Daemon) Start(ctx context.Context) error

Start implements manager.Runnable. It subscribes to fleet RC products and blocks until ctx is cancelled.

type DaemonOption added in v1.30.0

type DaemonOption func(*Daemon)

DaemonOption configures optional Fleet daemon transports.

func WithManagedAgentInstallation added in v1.30.0

func WithManagedAgentInstallation(identity ManagedAgentInstallationIdentity, namespace string, intentsEnabled bool) DaemonOption

WithManagedAgentInstallation configures the identity used by managed DDAs and optionally enables local install and uninstall intent processing.

type ManagedAgentInstallationIdentity added in v1.30.0

type ManagedAgentInstallationIdentity struct {
	// contains filtered or unexported fields
}

func ManagedAgentInstallationIdentityFromEnvironment added in v1.30.0

func ManagedAgentInstallationIdentityFromEnvironment() (ManagedAgentInstallationIdentity, error)

func NewEKSManagedAgentInstallationIdentity added in v1.30.0

func NewEKSManagedAgentInstallationIdentity(installationID, targetHash string) ManagedAgentInstallationIdentity

func (ManagedAgentInstallationIdentity) Configured added in v1.30.0

func (i ManagedAgentInstallationIdentity) Configured() bool

func (ManagedAgentInstallationIdentity) InstallationID added in v1.30.0

func (i ManagedAgentInstallationIdentity) InstallationID() string

func (ManagedAgentInstallationIdentity) Provider added in v1.30.0

func (ManagedAgentInstallationIdentity) TargetID added in v1.30.0

func (ManagedAgentInstallationIdentity) UpdaterTags added in v1.30.0

func (i ManagedAgentInstallationIdentity) UpdaterTags() ([]string, error)

func (ManagedAgentInstallationIdentity) Validate added in v1.30.0

type ManagedAgentInstallationProvider added in v1.30.0

type ManagedAgentInstallationProvider string
const (
	ManagedAgentInstallationProviderEKS ManagedAgentInstallationProvider = "eks"
)

type Operation

type Operation string

Operation is the type of fleet management operation to perform on a Kubernetes resource.

const (
	OperationCreate Operation = "create"
	OperationUpdate Operation = "update"
	OperationDelete Operation = "delete"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL