resource

package
v1.24.10-rc.0 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2022 License: Apache-2.0 Imports: 20 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteResourceAndWaitForGC added in v1.19.0

func DeleteResourceAndWaitForGC(c clientset.Interface, kind schema.GroupKind, ns, name string) error

DeleteResourceAndWaitForGC deletes only given resource and waits for GC to delete the pods.

func GetReplicasFromRuntimeObject

func GetReplicasFromRuntimeObject(obj runtime.Object) (int32, error)

GetReplicasFromRuntimeObject returns the number of replicas for the given object.

func GetRuntimeObjectForKind

func GetRuntimeObjectForKind(c clientset.Interface, kind schema.GroupKind, ns, name string) (runtime.Object, error)

GetRuntimeObjectForKind returns a runtime.Object based on its GroupKind, namespace and name.

func GetSelectorFromRuntimeObject

func GetSelectorFromRuntimeObject(obj runtime.Object) (labels.Selector, error)

GetSelectorFromRuntimeObject returns the labels for the given object.

func ScaleResource added in v1.19.0

func ScaleResource(
	clientset clientset.Interface,
	scalesGetter scaleclient.ScalesGetter,
	ns, name string,
	size uint,
	wait bool,
	kind schema.GroupKind,
	gvr schema.GroupVersionResource,
) error

ScaleResource scales resource to the given size.

func WaitForControlledPods added in v1.19.0

func WaitForControlledPods(c clientset.Interface, ns, name string, kind schema.GroupKind) (pods *v1.PodList, err error)

WaitForControlledPods waits up to podListTimeout for getting pods of the specified controller name and return them.

func WaitForControlledPodsRunning added in v1.19.0

func WaitForControlledPodsRunning(c clientset.Interface, ns, name string, kind schema.GroupKind) error

WaitForControlledPodsRunning waits up to 10 minutes for pods to become Running.

Types

This section is empty.

Jump to

Keyboard shortcuts

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