references

package
v1.99.3 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2024 License: Apache-2.0 Imports: 13 Imported by: 2

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

func AnnotationKey(kind, name string) string

AnnotationKey computes a reference annotation key based on the given object kind and object name.

func InjectAnnotations

func InjectAnnotations(obj runtime.Object, additional ...string) error

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

func KindFromAnnotationKey(key string) string

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.

Jump to

Keyboard shortcuts

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