Documentation ¶
Index ¶
- Constants
- func ApplyDefaultProfile(profilesToApply []datadoghqv1alpha1.DatadogAgentProfile, ...) []datadoghqv1alpha1.DatadogAgentProfile
- func DaemonSetName(profileNamespacedName types.NamespacedName) string
- func IsDefaultProfile(profileNamespace string, profileName string) bool
- func NewDatadogAgentProfileCondition(conditionType string, conditionStatus metav1.ConditionStatus, now metav1.Time, ...) metav1.Condition
- func OverrideFromProfile(profile *datadoghqv1alpha1.DatadogAgentProfile) v2alpha1.DatadogAgentComponentOverride
- func ProfileToApply(logger logr.Logger, profile *datadoghqv1alpha1.DatadogAgentProfile, ...) (map[string]types.NamespacedName, error)
- func SetDatadogAgentProfileCondition(conditionsList []metav1.Condition, newCondition metav1.Condition) []metav1.Condition
- func SortProfiles(profiles []datadoghqv1alpha1.DatadogAgentProfile) []datadoghqv1alpha1.DatadogAgentProfile
- func UpdateProfileStatus(profile *datadoghqv1alpha1.DatadogAgentProfile, ...)
Constants ¶
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" )
const (
ProfileLabelKey = "agent.datadoghq.com/profile"
)
Variables ¶
This section is empty.
Functions ¶
func ApplyDefaultProfile ¶ added in v1.7.0
func ApplyDefaultProfile(profilesToApply []datadoghqv1alpha1.DatadogAgentProfile, profileAppliedByNode map[string]types.NamespacedName, nodes []v1.Node) []datadoghqv1alpha1.DatadogAgentProfile
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 IsDefaultProfile ¶
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
func OverrideFromProfile(profile *datadoghqv1alpha1.DatadogAgentProfile) v2alpha1.DatadogAgentComponentOverride
OverrideFromProfile returns the component override that should be applied according to the given profile.
func ProfileToApply ¶ added in v1.7.0
func ProfileToApply(logger logr.Logger, profile *datadoghqv1alpha1.DatadogAgentProfile, nodes []v1.Node, profileAppliedByNode map[string]types.NamespacedName, now metav1.Time) (map[string]types.NamespacedName, error)
ProfileToApply validates a profile spec and returns a map that maps each node name to the profile that should be applied to it.
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 []datadoghqv1alpha1.DatadogAgentProfile) []datadoghqv1alpha1.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(profile *datadoghqv1alpha1.DatadogAgentProfile, profileStatus datadoghqv1alpha1.DatadogAgentProfileStatus, now metav1.Time)
Types ¶
This section is empty.