Documentation ¶
Index ¶
Constants ¶
View Source
const ( // LabelKeyGarbageCollectable is a constant for a label key on a Secret or ConfigMap resource which makes // the GRM's garbage collector controller considering it for potential deletion in case it is unused by any // workload. LabelKeyGarbageCollectable = "resources.gardener.cloud/garbage-collectable-reference" // LabelValueGarbageCollectable is a constant for a label value on a Secret or ConfigMap resource which // makes the GRM's garbage collector controller considering it for potential deletion in case it is unused by any // workload. LabelValueGarbageCollectable = "true" // AnnotationKeyPrefix is a constant for the prefix used in annotations keys to indicate references to // other resources. AnnotationKeyPrefix = "reference.resources.gardener.cloud/" // KindConfigMap is a constant for the 'configmap' kind used in reference annotations. KindConfigMap = "configmap" // KindSecret is a constant for the 'secret' kind used in reference annotations. KindSecret = "secret" )
Variables ¶
This section is empty.
Functions ¶
func AnnotationKey ¶
AnnotationKey computes a reference annotation key based on the given object kind and object name.
func InjectAnnotations ¶
InjectAnnotations injects annotations into the annotation maps based on the referenced ConfigMaps/Secrets appearing in:
- pod template spec's `.volumes[]` or `.containers[].envFrom[]` or `.containers[].env[].valueFrom[]` or `.imagePullSecrets[]` lists
- managed resource spec's `.secretRefs`
Additional reference annotations can be specified via the variadic parameter (expected format is that returned by `AnnotationKey`).
func KindFromAnnotationKey ¶
KindFromAnnotationKey computes the object kind and object name based on the given reference annotation key. If the key is not valid then both return values will be empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.