Documentation ¶
Index ¶
- Constants
- func CheckOwnerReference(owner, object metav1.Object) bool
- func GetChecksumAnnotationKey(keyName string) string
- func GetDefaultAnnotations(dda metav1.Object) map[string]string
- func GetDefaultLabels(dda metav1.Object, instanceName, version string) map[string]string
- func MergeAnnotationsLabels(logger logr.Logger, previousVal map[string]string, newVal map[string]string, ...) map[string]string
- func SetOwnerReference(owner, object metav1.Object, scheme *runtime.Scheme) error
- type PartOfLabelValue
Constants ¶
const (
// DatadogTagPrefix Datadog tags prefix
DatadogTagPrefix = "tags.datadoghq.com"
)
Variables ¶
This section is empty.
Functions ¶
func CheckOwnerReference ¶
CheckOwnerReference return true if owner is the owner of the object
func GetDefaultAnnotations ¶
GetDefaultAnnotations return default annotations attached to a DatadogAgent resource.
func GetDefaultLabels ¶
GetDefaultLabels return default labels attached to a DatadogAgent resource.
Types ¶
type PartOfLabelValue ¶
type PartOfLabelValue struct {
Value string
}
PartOfLabelValue is helpful to work with the "app.kubernetes.io/part-of" label. We use that label to track the of an object when we can't use owner references (cannot be used across namespaces). In order to identify an owner, we encode its namespace and name in the value of the label separated with a "-". Because names and namespaces can contain "-" too, we escape them. There are not any characters that are allowed in labels but not in names and namespaces so escaping is needed.
func NewPartOfLabelValue ¶
func NewPartOfLabelValue(obj metav1.Object) *PartOfLabelValue
NewPartOfLabelValue creates an instance of PartOfLabelValue from a DatadogAgent.
func (*PartOfLabelValue) NamespacedName ¶
func (partOfLabelValue *PartOfLabelValue) NamespacedName() types.NamespacedName
NamespacedName returns the NamespaceName that corresponds to the value of a part-of label.
func (*PartOfLabelValue) String ¶
func (partOfLabelValue *PartOfLabelValue) String() string