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

Function IsWalStorageEnabled

tests/utils/storage/storage.go:53–63  ·  view source on GitHub ↗

IsWalStorageEnabled returns true if 'WalStorage' is being used

(
	ctx context.Context,
	crudClient client.Client,
	namespace, clusterName string,
)

Source from the content-addressed store, hash-verified

51
52// IsWalStorageEnabled returns true if 'WalStorage' is being used
53func IsWalStorageEnabled(
54 ctx context.Context,
55 crudClient client.Client,
56 namespace, clusterName string,
57) (bool, error) {
58 cluster, err := clusterutils.Get(ctx, crudClient, namespace, clusterName)
59 if cluster == nil || cluster.Spec.WalStorage == nil {
60 return false, err
61 }
62 return true, err
63}
64
65// PvcHasLabels returns true if a PVC contains a given map of labels
66func PvcHasLabels(

Callers 4

OnlineResizePVCFunction · 0.92
OfflineResizePVCFunction · 0.92

Calls 1

GetFunction · 0.92

Tested by 2

OnlineResizePVCFunction · 0.74
OfflineResizePVCFunction · 0.74