Documentation
¶
Overview ¶
Package introspection detects the cluster-level provider (e.g. "eks", "openshift-rhcos") on the elected leader and publishes it for lock-free reads by the DatadogAgent reconciler.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Detector ¶
type Detector struct {
// contains filtered or unexported fields
}
Detector detects the cluster provider on the elected leader and publishes the result for lock-free reads.
func NewDetector ¶
func NewDetector(mgr manager.Manager, nodeName string, logger logr.Logger, nodeCacheEnabled bool) *Detector
NewDetector builds a provider Detector from the manager. nodeName is the operator's own node (DD_HOSTNAME); empty skips the Stage-1 read. The Stage-2 cluster-node-list fallback is wired only when nodeCacheEnabled is true.
func (*Detector) InGracePeriod ¶
InGracePeriod reports whether the detector is still within its startup window on this leadership term, during which an absent signal should not be treated as final. A detector that has not started yet is always in the grace period.
func (*Detector) NeedLeaderElection ¶
NeedLeaderElection implements manager.LeaderElectionRunnable: detection runs only on the elected leader.
func (*Detector) Provider ¶
Provider returns the detected provider and whether detection has completed. It performs a single atomic load and is safe for the reconcile hot path.