Documentation
¶
Index ¶
- Constants
- func GetPVCPatchData(oldPVC, newPVC *v1.PersistentVolumeClaim) ([]byte, error)
- func GetPatchData(oldObj, newObj interface{}) ([]byte, error)
- func HasFileSystemResizePendingCondition(pvc *v1.PersistentVolumeClaim) bool
- func MergeResizeConditionsOfPVC(oldConditions, newConditions []v1.PersistentVolumeClaimCondition) []v1.PersistentVolumeClaimCondition
- func PVCKey(pvc *v1.PersistentVolumeClaim) string
- func SanitizeName(name string) string
Constants ¶
View Source
const ( VolumeResizing = "Resizing" VolumeResizeFailed = "VolumeResizeFailed" VolumeResizeSuccess = "VolumeResizeSuccessful" FileSystemResizeRequired = "FileSystemResizeRequired" )
These constants are PVC condition types related to resize operation.
View Source
const ( // If CSI migration is enabled, the value will be CSI driver name // Otherwise, it will be in-tree storage plugin name VolumeResizerKey = "volume.kubernetes.io/storage-resizer" )
Variables ¶
This section is empty.
Functions ¶
func GetPVCPatchData ¶ added in v1.0.0
func GetPVCPatchData(oldPVC, newPVC *v1.PersistentVolumeClaim) ([]byte, error)
func GetPatchData ¶ added in v1.0.0
func HasFileSystemResizePendingCondition ¶
func HasFileSystemResizePendingCondition(pvc *v1.PersistentVolumeClaim) bool
HasFileSystemResizePendingCondition returns true if a pvc has a FileSystemResizePending condition. This means the controller side resize operation is finished, and kubelet side operation is in progress.
func MergeResizeConditionsOfPVC ¶
func MergeResizeConditionsOfPVC(oldConditions, newConditions []v1.PersistentVolumeClaimCondition) []v1.PersistentVolumeClaimCondition
MergeResizeConditionsOfPVC updates pvc with requested resize conditions leaving other conditions untouched.
func PVCKey ¶
func PVCKey(pvc *v1.PersistentVolumeClaim) string
PVCKey returns an unique key of a PVC object,
func SanitizeName ¶
SanitizeName changes any name to a sanitized name which can be accepted by kubernetes.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.