# Functions
CheckIfPVCIsDataset checks if the pvc is dataset.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
DeleteConfigMap deletes the configmap given its name and namespace if the configmap exists.
DeletePersistentVolume deletes volume.
DeletePersistentVolumeClaim deletes volume claim.
No description provided by the author
No description provided by the author
No description provided by the author
EnsureNamespace makes sure the namespace exist.
A wrapper function of ExecCommandInContainerWithFullOutput.
ExecCommandInContainerWithFullOutput executes a command in the specified container and return stdout, stderr and error.
ExecCommandInPod finds the first container in the given pod, executes command in that container, and return stdout, stderr and error.
ExecWithOptions executes a command in the specified container, returning stdout, stderr and error.
GetConfigmapByName gets configmap with given name and namespace of the configmap.
GetCronJobStatus gets CronJob's status given its namespace and name.
GetDaemonPods gets pods of the specified daemonset.
GetDaemonset gets the daemonset by name and namespace.
GetDeployment gets the deployment by name and namespace.
GetFinishedJobCondition get the finished(succeed or failed) condition of the job.
No description provided by the author
GetIpAddressesOfNodes gets the ipAddresses of nodes.
GetIpAddressesOfPods gets the ipAddresses of pods.
GetJob gets the job given its name and namespace.
GetMountInfoFromVolumeClaim gets the mountPath and type for CSI plugin.
No description provided by the author
GetNode gets the latest node info.
No description provided by the author
No description provided by the author
GetPhaseFromStatefulset gets the phase from statefulset.
GetPodByName gets pod with given name and namespace of the pod.
GetPodsForStatefulSet gets pods of the specified statefulset.
GetPvcMountNodes get nodes which have pods mounted the specific pvc for a given namespace it will only return a map of nodeName and amount of PvcMountPods on it if the Pvc mount Pod has completed, it will be ignored if fail to get pvc mount Nodes, treat every nodes as with no PVC mount Pods.
GetPvcMountPods get pods that mounted the specific pvc for a given namespace.
GetPVCNamesFromPod get names of pvc mounted by Pod.
GetPVCsFromPod get PersistVolumeClaims of pod.
GetReferringDatasetPVCInfo check whether the PVC is a referring dataset PVC.
GetSecret gets the secret.
get service given name and namespace of the service.
GetStatefulset gets the statefulset by name and namespace.
GetSucceedPodForJob get the first finished pod for the job, if no succeed pod, return nil with no error.
GetUnavailableDaemonPods gets unavailable pods of the specified daemonset.
GetUnavailableDaemonPods gets unavailable pods of the specified daemonset.
GetUnavailablePodNamesForStatefulSet gets pod names of the specified statefulset.
GetUnavailablePodsStatefulSet gets unavailable pods of the specified statefulset.
IsCompletePod determines if the pod is complete.
IsConfigMapExist checks if the configMap exists given its name and namespace.
IsDatasetPVC check whether the PVC is a dataset PVC.
IsFailedPod determines if the pod is failed.
IsFinishedPod determines if the pod is succeeded or failed.
IsPersistentVolumeClaimExist checks if the persistent volume claim exists given name, namespace and annotations of the PVC.
IsPersistentVolumeExist checks if the persistent volume exists given name and annotations of the PV.
IsReady checks if the node is ready If the node is ready,it returns True.Otherwise,it returns False.
IsSucceededPod determines if the pod is Succeeded.
No description provided by the author
No description provided by the author
RemoveProtectionFinalizer removes finalizers of PersistentVolumeClaim if all owners that this PVC is mounted by are inactive (Succeed or Failed).
ScaleStatefulSet scale the statefulset replicas.
SetPVCDeleteTimeout is only for test case usage.
ShouldDeleteDataset return no err when no pod is using the volume If cannot get PVC, cannot get PvcMountPods, or running pod is using the volume, return corresponding error.
ShouldRemoveProtectionFinalizer check if should remove pvc-protection finalizer by force.
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
ExecOptions passed to ExecWithOptions.