Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsPopulated ¶
func IsPopulated(pvc *corev1.PersistentVolumeClaim, getDvFunc func(name, namespace string) (*cdiv1.DataVolume, error)) (bool, error)
IsPopulated indicates if the persistent volume passed in has been fully populated. It follow the following logic 1. If the PVC is not owned by a DataVolume, return true, we assume someone else has properly populated the image 2. If the PVC is owned by a DataVolume, look up the DV and check the phase, if phase succeeded return true 3. If the PVC is owned by a DataVolume, look up the DV and check the phase, if phase !succeeded return false
func IsWaitForFirstConsumerBeforePopulating ¶
func IsWaitForFirstConsumerBeforePopulating(pvc *corev1.PersistentVolumeClaim, getDvFunc func(name, namespace string) (*cdiv1.DataVolume, error)) (bool, error)
IsWaitForFirstConsumerBeforePopulating indicates if the persistent volume passed in is in ClaimPending state and waiting for first consumer. It follow the following logic 1. If the PVC is not owned by a DataVolume, return false, we can not assume it will be populated 2. If the PVC is owned by a DataVolume, look up the DV and check the phase, if phase WaitForFirstConsumer return true 3. If the PVC is owned by a DataVolume, look up the DV and check the phase, if phase !WaitForFirstConsumer return false
Types ¶
This section is empty.