agentprofile

package
v1.31.2 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 18 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

View Source
const (
	// ValidConditionType is a type of condition for a DatadogAgentProfile
	ValidConditionType = "Valid"
	// ValidConditionType is a type of condition for a DatadogAgentProfile
	AppliedConditionType = "Applied"

	// ValidConditionReason is for DatadogAgentProfiles with a valid manifest
	ValidConditionReason = "Valid"
	// InvalidConditionReason is for DatadogAgentProfiles with an invalid manifest
	InvalidConditionReason = "Invalid"
	// AppliedConditionReason is for DatadogAgentProfiles that are applied to at least one node
	AppliedConditionReason = "Applied"
	// ConflictConditionReason is for DatadogAgentProfiles that conflict with an existing DatadogAgentProfile
	ConflictConditionReason = "Conflict"

	// DDAIReconcileErrorConditionType surfaces a reconcile error from the profile's DatadogAgentInternal
	DDAIReconcileErrorConditionType = "DatadogAgentInternalReconcileError"
	// DDAIReconcileErrorConditionReason is used when the profile's DatadogAgentInternal failed to reconcile
	DDAIReconcileErrorConditionReason = "DatadogAgentInternal_reconcile_error"
	// DDAIReconcileOKConditionReason is used when the profile's DatadogAgentInternal is reconciling successfully
	DDAIReconcileOKConditionReason = "DatadogAgentInternal_reconcile_ok"
)
View Source
const (
	// OldProfileLabelKey was deprecated in operator v1.8.0
	OldProfileLabelKey = "agent.datadoghq.com/profile"
)

Variables

This section is empty.

Functions

func AffinityOverride added in v1.16.0

func AffinityOverride(profile *v1alpha1.DatadogAgentProfile) *v1.Affinity

func ApplyCreateStrategy added in v1.22.0

func ApplyCreateStrategy(logger logr.Logger, profilesByNode map[string]types.NamespacedName, csInfo *CreateStrategyInfo, profile *v1alpha1.DatadogAgentProfile, ddaMaxUnavailable intstr.IntOrString, numNodes int, dsStatus *appsv1.DaemonSetStatus)

ApplyCreateStrategy applies the create strategy to the profiles - determines the max number of nodes that can be labeled based on max unavailable values - updates the profile status based on the create strategy

func AssignNodesToProfile added in v1.30.0

func AssignNodesToProfile(profile metav1.ObjectMeta, profileRequirements []*labels.Requirement, nodes []v1.Node, profilesByNode map[string]types.NamespacedName, csInfo map[types.NamespacedName]*CreateStrategyInfo)

AssignNodesToProfile assigns matching nodes to the profile in profilesByNode and records create-strategy data in csInfo. It must only be called after CheckProfileNodeConflicts returns nil, so it never returns an error.

func CheckProfileNodeConflicts added in v1.30.0

func CheckProfileNodeConflicts(profile metav1.ObjectMeta, profileRequirements []*labels.Requirement, nodes []v1.Node, profilesByNode map[string]types.NamespacedName) error

CheckProfileNodeConflicts checks whether a profile conflicts with already-assigned profiles. It is a pure read: it does not modify profilesByNode or csInfo.

func CreateStrategyEnabled added in v1.9.0

func CreateStrategyEnabled() bool

CreateStrategyEnabled returns true if the create strategy enabled env var is set to true

func CreateStrategyNeeded added in v1.22.0

func CreateStrategyNeeded(profile *v1alpha1.DatadogAgentProfile, csInfo map[types.NamespacedName]*CreateStrategyInfo) bool

func DaemonSetName

func DaemonSetName(profileNamespacedName types.NamespacedName, useV3Metadata bool) string

DaemonSetName returns the name that the DaemonSet should have according to the name of the profile associated with it.

func DefaultProfile added in v1.21.0

func DefaultProfile() v1alpha1.DatadogAgentProfile

DefaultProfile returns the default profile, we just need a name to identify it

func GenerateProfileStatusFromConditions added in v1.21.0

func GenerateProfileStatusFromConditions(logger logr.Logger, profile *v1alpha1.DatadogAgentProfile, now metav1.Time)

func GetMaxUnavailableFromSpec added in v1.31.0

func GetMaxUnavailableFromSpec(spec *v2alpha1.DatadogAgentSpec, customDefault *intstr.IntOrString) intstr.IntOrString

GetMaxUnavailableFromSpec gets the max unavailable value from a DatadogAgent spec and allows for a custom default value to be provided.

func IsDefaultProfile

func IsDefaultProfile(profileNamespace string, profileName string) bool

IsDefaultProfile returns true if the given profile namespace and name correspond to the default profile.

func IsEqualStatus added in v1.19.0

func IsEqualStatus(current *v1alpha1.DatadogAgentProfileStatus, newStatus *v1alpha1.DatadogAgentProfileStatus) bool

func NewDatadogAgentProfileCondition added in v1.7.0

func NewDatadogAgentProfileCondition(conditionType string, conditionStatus metav1.ConditionStatus, now metav1.Time, reason, message string) metav1.Condition

NewDatadogAgentProfileCondition returns a new metav1.Condition instance

func SetDatadogAgentProfileCondition added in v1.7.0

func SetDatadogAgentProfileCondition(conditionsList []metav1.Condition, newCondition metav1.Condition) []metav1.Condition

SetDatadogAgentProfileCondition is used to update a condition

func SortProfiles added in v1.7.0

func SortProfiles(profiles []v1alpha1.DatadogAgentProfile) []v1alpha1.DatadogAgentProfile

func ValidateProfileAndReturnRequirements added in v1.21.0

func ValidateProfileAndReturnRequirements(profile *v1alpha1.DatadogAgentProfile) ([]*labels.Requirement, error)

ValidateProfileAndReturnRequirements validates a profile's name and spec and affinity requirements

Types

type CreateStrategyInfo added in v1.22.0

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

CreateStrategyInfo holds create strategy data for a profile

Jump to

Keyboard shortcuts

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