Documentation ¶
Overview ¶
Package ephemeral provides code that supports the usual pattern for accessing the PVC that provides a generic ephemeral inline volume:
- determine the PVC name that corresponds to the inline volume source - retrieve the PVC - verify that the PVC is owned by the pod - use the PVC
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func VolumeClaimName ¶
VolumeClaimName returns the name of the PersistentVolumeClaim object that gets created for the generic ephemeral inline volume. The name is deterministic and therefore this function does not need any additional information besides the Pod name and volume name and it will never fail.
Before using the PVC for the Pod, the caller must check that it is indeed the PVC that was created for the Pod by calling IsUsable.
func VolumeIsForPod ¶
func VolumeIsForPod(pod *v1.Pod, pvc *v1.PersistentVolumeClaim) error
VolumeIsForPod checks that the PVC is the ephemeral volume that was created for the Pod. It returns an error that is informative enough to be returned by the caller without adding further details about the Pod or PVC.
Types ¶
This section is empty.