util

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IndexControllerOf

func IndexControllerOf(mgr kube_ctrl.Manager, ownerGVK kube_schema.GroupVersionKind, objType kube_client.Object) error

IndexControllerOf adds an index to objects of this GVK for use with ManageControlledObject.

func ManageControlledObject

func ManageControlledObject(
	ctx context.Context, client kube_client.Client, owner kube_meta.Object, objectList kube_client.ObjectList, mutate func(kube_client.Object) (kube_client.Object, error),
) (kube_client.Object, error)

ManageControlledObject is used to handle the lifecycle of and mutate a single object controlled by owner. This object type must be indexed by calling IndexControllerOf. If a controlled object exists, it's passed to mutate. Otherwise mutate receives a nil object. mutate should return a nil Object if the owned object should be deleted or not created.

Types

This section is empty.

Jump to

Keyboard shortcuts

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