Documentation
¶
Index ¶
- func BuildSignalPatchWithAnnotations(signal, id string, extra map[string]string, config ...json.RawMessage) ([]byte, error)
- func BuildStartPatch(dda *v2alpha1.DatadogAgent, experimentID string, config json.RawMessage, ...) ([]byte, error)
- func ExpectedSpecHashAfterInMemoryMerge(dda *v2alpha1.DatadogAgent, config json.RawMessage) (string, error)
- func ManagedAgentInstallationReadinessTags(ctx context.Context, reader client.Reader, ...) ([]string, error)
- type Daemon
- type DaemonOption
- type ManagedAgentInstallationIdentity
- func (i ManagedAgentInstallationIdentity) Configured() bool
- func (i ManagedAgentInstallationIdentity) InstallationID() string
- func (i ManagedAgentInstallationIdentity) Provider() ManagedAgentInstallationProvider
- func (i ManagedAgentInstallationIdentity) TargetID() string
- func (i ManagedAgentInstallationIdentity) UpdaterTags() ([]string, error)
- func (i ManagedAgentInstallationIdentity) Validate() error
- type ManagedAgentInstallationProvider
- type Operation
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
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 ¶
NeedLeaderElection implements manager.LeaderElectionRunnable. The daemon only runs on the elected leader.
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 (i ManagedAgentInstallationIdentity) Provider() ManagedAgentInstallationProvider
func (ManagedAgentInstallationIdentity) TargetID ¶ added in v1.30.0
func (i ManagedAgentInstallationIdentity) TargetID() string
func (ManagedAgentInstallationIdentity) UpdaterTags ¶ added in v1.30.0
func (i ManagedAgentInstallationIdentity) UpdaterTags() ([]string, error)
func (ManagedAgentInstallationIdentity) Validate ¶ added in v1.30.0
func (i ManagedAgentInstallationIdentity) Validate() error
type ManagedAgentInstallationProvider ¶ added in v1.30.0
type ManagedAgentInstallationProvider string
const (
ManagedAgentInstallationProviderEKS ManagedAgentInstallationProvider = "eks"
)
Source Files
¶
- daemon.go
- daemon_operations.go
- daemon_worker.go
- events.go
- experiment.go
- managed_agent_installation.go
- managed_agent_installation_command.go
- managed_agent_installation_identity.go
- managed_agent_installation_identity_eks.go
- managed_agent_installation_identity_environment.go
- managed_agent_installation_intent.go
- managed_agent_installation_intent_eks.go
- managed_agent_installation_state.go
- managed_agent_installation_windows_profile.go
- remote_config.go