meta

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2022 License: Apache-2.0 Imports: 6 Imported by: 14

Documentation

Index

Constants

View Source
const AnnotationKeyExternalName = "ndd.yndd.io/external-name"

AnnotationKeyExternalName is the key in the annotations map of a resource for the name of the resource as it appears on provider's systems.

Variables

This section is empty.

Functions

func AddAnnotations

func AddAnnotations(o metav1.Object, annotations map[string]string)

AddAnnotations to the supplied object.

func AddControllerReference

func AddControllerReference(o metav1.Object, r metav1.OwnerReference) error

AddControllerReference to the supplied object's metadata. Any existing owner with the same UID as the supplied reference will be replaced. Returns an error if the supplied object is already controlled by a different owner.

func AddFinalizer

func AddFinalizer(o metav1.Object, finalizer string)

AddFinalizer to the supplied Kubernetes object's metadata.

func AddLabels

func AddLabels(o metav1.Object, labels map[string]string)

AddLabels to the supplied object.

func AddOwnerReference

func AddOwnerReference(o metav1.Object, r metav1.OwnerReference)

AddOwnerReference to the supplied object' metadata. Any existing owner with the same UID as the supplied reference will be replaced.

func AsController

func AsController(r *nddv1.TypedReference) metav1.OwnerReference

AsController converts the supplied object reference to a controller reference. You may also consider using metav1.NewControllerRef.

func AsOwner

AsOwner converts the supplied object reference to an owner reference.

func FinalizerExists

func FinalizerExists(o metav1.Object, finalizer string) bool

FinalizerExists checks whether given finalizer is already set.

func GetExternalName

func GetExternalName(o metav1.Object) string

GetExternalName returns the external name annotation value on the resource.

func HaveSameController

func HaveSameController(a, b metav1.Object) bool

HaveSameController returns true if both supplied objects are controlled by the same object.

func NamespacedNameOf

func NamespacedNameOf(r *corev1.ObjectReference) types.NamespacedName

NamespacedNameOf returns the referenced object's namespaced name.

func RemoveAnnotations

func RemoveAnnotations(o metav1.Object, annotations ...string)

RemoveAnnotations with the supplied keys from the supplied object.

func RemoveFinalizer

func RemoveFinalizer(o metav1.Object, finalizer string)

RemoveFinalizer from the supplied Kubernetes object's metadata.

func RemoveLabels

func RemoveLabels(o metav1.Object, labels ...string)

RemoveLabels with the supplied keys from the supplied object.

func SetExternalName

func SetExternalName(o metav1.Object, name string)

SetExternalName sets the external name annotation of the resource.

func TypedReferenceTo

func TypedReferenceTo(o metav1.Object, of schema.GroupVersionKind) *nddv1.TypedReference

TypedReferenceTo returns a typed object reference to the supplied object, presumed to be of the supplied group, version, and kind.

func WasCreated

func WasCreated(o metav1.Object) bool

WasCreated returns true if the supplied object was created in the API server.

func WasDeleted

func WasDeleted(o metav1.Object) bool

WasDeleted returns true if the supplied object was deleted from the API server.

Types

This section is empty.

Jump to

Keyboard shortcuts

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