Back to godoc.org
k8s.io/kubernetes / pkg / volume / util / recyclerclient

package recyclerclient

v1.18.5
Latest Go to latest
Published: Jun 26, 2020 | License: Apache-2.0 | Module: k8s.io/kubernetes

Index

func RecycleVolumeByWatchingPodUntilCompletion

func RecycleVolumeByWatchingPodUntilCompletion(pvName string, pod *v1.Pod, kubeClient clientset.Interface, recorder RecycleEventRecorder) error

RecycleVolumeByWatchingPodUntilCompletion is intended for use with volume Recyclers. This function will save the given Pod to the API and watch it until it completes, fails, or the pod's ActiveDeadlineSeconds is exceeded, whichever comes first. An attempt to delete a recycler pod is always attempted before returning.

In case there is a pod with the same namespace+name already running, this function deletes it as it is not able to judge if it is an old recycler or user has forged a fake recycler to block Kubernetes from recycling.//

 pod - the pod designed by a volume plugin to recycle the volume. pod.Name
       will be overwritten with unique name based on PV.Name.
	client - kube client for API operations.

type RecycleEventRecorder

type RecycleEventRecorder func(eventtype, message string)

RecycleEventRecorder is a func that defines how to record RecycleEvent.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier