k8s

package
v1.20.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const WatchNamespaceEnvVar = "WATCH_NAMESPACE"

Variables

View Source
var (
	ErrNotTheHolder = errors.New("not the holder")
)

Functions

func AcquireLease added in v1.20.0

func AcquireLease(ctx context.Context, c client.Client, name, namespace, holder string) (*coordv1.Lease, error)

func AnnotateObject added in v1.16.0

func AnnotateObject(ctx context.Context, c client.Client, obj client.Object, annotations map[string]string) error

AnnotateObject adds the specified annotations to the object

func DeannotateObject added in v1.16.0

func DeannotateObject(ctx context.Context, c client.Client, obj client.Object, annotation string) error

DeannotateObject removes the specified annotation from the object

func GetOperatorNamespace added in v1.14.0

func GetOperatorNamespace() (string, error)

GetOperatorNamespace returns the namespace of the operator pod

func GetWatchNamespace

func GetWatchNamespace() (string, error)

GetWatchNamespace returns the namespace the operator should be watching for changes

func ReleaseLease added in v1.20.0

func ReleaseLease(ctx context.Context, c client.Client, name, namespace, holder string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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