persistentvolumeclaim

package
v1.30.0-alpha.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2024 License: Apache-2.0 Imports: 6 Imported by: 23

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DropDisabledFields added in v1.14.0

func DropDisabledFields(pvcSpec, oldPVCSpec *core.PersistentVolumeClaimSpec)

DropDisabledFields removes disabled fields from the pvc spec. This should be called from PrepareForCreate/PrepareForUpdate for all resources containing a pvc spec.

func DropDisabledFieldsFromStatus added in v1.23.0

func DropDisabledFieldsFromStatus(pvc, oldPVC *core.PersistentVolumeClaim)

func EnforceDataSourceBackwardsCompatibility added in v1.22.0

func EnforceDataSourceBackwardsCompatibility(pvcSpec, oldPVCSpec *core.PersistentVolumeClaimSpec)

EnforceDataSourceBackwardsCompatibility drops the data source field under certain conditions to maintain backwards compatibility with old behavior. See KEP 1495 for details. Specifically, if this is an update of a PVC with no data source, or a creation of a new PVC, and the dataSourceRef field is not filled in, then we will drop "invalid" data sources (anything other than a PVC or a VolumeSnapshot) from this request as if an empty PVC had been requested. This should be called after DropDisabledFields so that if the AnyVolumeDataSource feature gate is disabled, dataSourceRef will be forced to empty, ensuring pre-1.22 behavior. This should be called before NormalizeDataSources, so that data sources other than PVCs and VolumeSnapshots can only be set through the dataSourceRef field and not the dataSource field.

func GetWarningsForPersistentVolumeClaim added in v1.26.0

func GetWarningsForPersistentVolumeClaim(pv *core.PersistentVolumeClaim) []string

func GetWarningsForPersistentVolumeClaimSpec added in v1.26.0

func GetWarningsForPersistentVolumeClaimSpec(fieldPath *field.Path, pvSpec core.PersistentVolumeClaimSpec) []string

func NormalizeDataSources added in v1.22.0

func NormalizeDataSources(pvcSpec *core.PersistentVolumeClaimSpec)

NormalizeDataSources ensures that DataSource and DataSourceRef have the same contents as long as both are not explicitly set. This should be used by creates/gets of PVCs, but not updates

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL