agentprofile

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProfileLabelKey = "agent.datadoghq.com/datadogagentprofile"
	// OldProfileLabelKey was deprecated in operator v1.8.0
	OldProfileLabelKey = "agent.datadoghq.com/profile"
)
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"
)

Variables

This section is empty.

Functions

func ApplyDefaultProfile added in v1.7.0

func ApplyDefaultProfile(profilesToApply []v1alpha1.DatadogAgentProfile, profileAppliedByNode map[string]types.NamespacedName, nodes []v1.Node) []v1alpha1.DatadogAgentProfile

func ApplyProfile added in v1.9.0

func ApplyProfile(logger logr.Logger, profile *v1alpha1.DatadogAgentProfile, nodes []v1.Node, profileAppliedByNode map[string]types.NamespacedName,
	now metav1.Time, maxUnavailable int) (map[string]types.NamespacedName, error)

ApplyProfile validates a profile spec and returns a map that maps each node name to the profile that should be applied to it. When create strategy is enabled, the profile is mapped to: - existing nodes with the correct label - nodes that need a new or corrected label up to maxUnavailable # of nodes

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 DaemonSetName

func DaemonSetName(profileNamespacedName types.NamespacedName) string

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

func GetMaxUnavailable added in v1.9.0

func GetMaxUnavailable(logger logr.Logger, dda *v2alpha1.DatadogAgent, profile *v1alpha1.DatadogAgentProfile, numNodes int, edsOptions *agent.ExtendedDaemonsetOptions) int

GetMaxUnavailable gets the maxUnavailable value as in int. Priority is DAP > DDA > Kubernetes default value

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 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 OverrideFromProfile added in v1.6.0

OverrideFromProfile returns the component override that should be applied according to the given profile.

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

SortProfiles sorts the profiles by creation timestamp. If two profiles have the same creation timestamp, it sorts them by name.

func UpdateProfileStatus added in v1.7.0

func UpdateProfileStatus(logger logr.Logger, profile *datadoghqv1alpha1.DatadogAgentProfile, newStatus datadoghqv1alpha1.DatadogAgentProfileStatus, now metav1.Time)

Types

This section is empty.

Jump to

Keyboard shortcuts

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