Documentation ¶
Index ¶
- Constants
- func ComponentOverrideFromProfile(profile *datadoghqv1alpha1.DatadogAgentProfile) v2alpha1.DatadogAgentComponentOverride
- func DaemonSetName(profileNamespacedName types.NamespacedName) string
- func IsDefaultProfile(profileNamespace string, profileName string) bool
- func ProfilesToApply(profiles []datadoghqv1alpha1.DatadogAgentProfile, nodes []v1.Node, ...) ([]datadoghqv1alpha1.DatadogAgentProfile, map[string]types.NamespacedName, ...)
Constants ¶
const (
ProfileLabelKey = "agent.datadoghq.com/profile"
)
Variables ¶
This section is empty.
Functions ¶
func ComponentOverrideFromProfile ¶
func ComponentOverrideFromProfile(profile *datadoghqv1alpha1.DatadogAgentProfile) v2alpha1.DatadogAgentComponentOverride
ComponentOverrideFromProfile returns the component override that should be applied according to the given profile.
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 ProfilesToApply ¶
func ProfilesToApply(profiles []datadoghqv1alpha1.DatadogAgentProfile, nodes []v1.Node, logger logr.Logger) ([]datadoghqv1alpha1.DatadogAgentProfile, map[string]types.NamespacedName, error)
ProfilesToApply given a list of profiles, returns the ones that should be applied in the cluster. - If there are no profiles, it returns the default profile. - If there are no conflicting profiles, it returns all the profiles plus the default one. - If there are conflicting profiles, it returns a subset that does not conflict plus the default one. When there are conflicting profiles, the oldest one is the one that takes precedence. When two profiles share an identical creation timestamp, the profile whose name is alphabetically first is considered to have priority. This function also returns a map that maps each node name to the profile that should be applied to it.
Types ¶
This section is empty.