Documentation ¶
Index ¶
- func DeleteCustomResourceAndWaitForGC(ctx context.Context, c clientset.Interface, dynamicClient dynamic.Interface, ...) error
- func DeleteResourceAndWaitForGC(ctx context.Context, c clientset.Interface, kind schema.GroupKind, ...) error
- func GetReplicasFromRuntimeObject(obj runtime.Object) (int32, error)
- func GetRuntimeObjectForKind(ctx context.Context, c clientset.Interface, kind schema.GroupKind, ...) (runtime.Object, error)
- func GetSelectorFromRuntimeObject(obj runtime.Object) (labels.Selector, error)
- func ScaleResource(ctx context.Context, clientset clientset.Interface, ...) error
- func WaitForControlledPods(ctx context.Context, c clientset.Interface, ns, name string, ...) (pods *v1.PodList, err error)
- func WaitForControlledPodsRunning(ctx context.Context, c clientset.Interface, ns, name string, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteCustomResourceAndWaitForGC ¶ added in v1.26.0
func DeleteCustomResourceAndWaitForGC(ctx context.Context, c clientset.Interface, dynamicClient dynamic.Interface, scaleClient scaleclient.ScalesGetter, gvr schema.GroupVersionResource, ns, name string) error
DeleteCustomResourceAndWaitForGC deletes only given resource and waits for GC to delete the pods. Enables to provide a custom resourece client, e.g. to fetch a CRD object.
func DeleteResourceAndWaitForGC ¶ added in v1.19.0
func DeleteResourceAndWaitForGC(ctx context.Context, 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 ¶
GetReplicasFromRuntimeObject returns the number of replicas for the given object.
func GetRuntimeObjectForKind ¶
func GetRuntimeObjectForKind(ctx context.Context, 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 ¶
GetSelectorFromRuntimeObject returns the labels for the given object.
func ScaleResource ¶ added in v1.19.0
func ScaleResource( ctx context.Context, 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(ctx context.Context, 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.
Types ¶
This section is empty.