MCPcopy Create free account
hub / github.com/cloudnative-pg/cloudnative-pg / GetStorageAllowExpansion

Function GetStorageAllowExpansion

tests/utils/storage/storage.go:42–50  ·  view source on GitHub ↗

GetStorageAllowExpansion returns the boolean value of the 'AllowVolumeExpansion' value of the storage class

(
	ctx context.Context,
	crudClient client.Client,
	defaultStorageClass string,
)

Source from the content-addressed store, hash-verified

40
41// GetStorageAllowExpansion returns the boolean value of the 'AllowVolumeExpansion' value of the storage class
42func GetStorageAllowExpansion(
43 ctx context.Context,
44 crudClient client.Client,
45 defaultStorageClass string,
46) (*bool, error) {
47 storageClass := &storagev1.StorageClass{}
48 err := objects.Get(ctx, crudClient, client.ObjectKey{Name: defaultStorageClass}, storageClass)
49 return storageClass.AllowVolumeExpansion, err
50}
51
52// IsWalStorageEnabled returns true if 'WalStorage' is being used
53func IsWalStorageEnabled(

Callers 1

Calls 1

GetFunction · 0.92

Tested by

no test coverage detected