object

package
v1.0.0-rc.8 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DatadogTagPrefix Datadog tags prefix
	DatadogTagPrefix = "tags.datadoghq.com"
)

Variables

This section is empty.

Functions

func CheckOwnerReference

func CheckOwnerReference(owner, object metav1.Object) bool

CheckOwnerReference return true if owner is the owner of the object

func GetDefaultAnnotations

func GetDefaultAnnotations(dda metav1.Object) map[string]string

GetDefaultAnnotations return default annotations attached to a DatadogAgent resource.

func GetDefaultLabels

func GetDefaultLabels(dda metav1.Object, instanceName, version string) map[string]string

GetDefaultLabels return default labels attached to a DatadogAgent resource.

func MergeAnnotationsLabels

func MergeAnnotationsLabels(logger logr.Logger, previousVal map[string]string, newVal map[string]string, filter string) map[string]string

MergeAnnotationsLabels used to merge Annotations and Labels

func SetOwnerReference

func SetOwnerReference(owner, object metav1.Object, scheme *runtime.Scheme) error

SetOwnerReference sets owner as a OwnerReference.

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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