persistentvolumeclaim

package
Version: v1.22.2 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2021 License: Apache-2.0 Imports: 3 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DropDisabledFields added in v1.14.0

func DropDisabledFields(pvcSpec *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 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 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.

Source Files

Jump to

Keyboard shortcuts

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