Documentation
¶
Overview ¶
Package storage provides functions to manage enything related to storage
Index ¶
- func GetPVCList(ctx context.Context, crudClient client.Client, namespace string) (*corev1.PersistentVolumeClaimList, error)
- func GetSnapshotList(ctx context.Context, crudClient client.Client, namespace string) (*volumesnapshotv1.VolumeSnapshotList, error)
- func GetStorageAllowExpansion(ctx context.Context, crudClient client.Client, defaultStorageClass string) (*bool, error)
- func IsWalStorageEnabled(ctx context.Context, crudClient client.Client, namespace, clusterName string) (bool, error)
- func ObjectHasAnnotations(object client.Object, annotations []string) bool
- func ObjectMatchesAnnotations(object client.Object, annotations map[string]string) bool
- func PvcHasLabels(pvc corev1.PersistentVolumeClaim, labels map[string]string) bool
- func SetSnapshotNameAsEnv(snapshotList *volumesnapshotv1.VolumeSnapshotList, backup *apiv1.Backup, ...) error
- type EnvVarsForSnapshots
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPVCList ¶
func GetPVCList( ctx context.Context, crudClient client.Client, namespace string, ) (*corev1.PersistentVolumeClaimList, error)
GetPVCList gathers the current list of PVCs in a namespace
func GetSnapshotList ¶
func GetSnapshotList( ctx context.Context, crudClient client.Client, namespace string, ) (*volumesnapshotv1.VolumeSnapshotList, error)
GetSnapshotList gathers the current list of VolumeSnapshots in a namespace
func GetStorageAllowExpansion ¶
func GetStorageAllowExpansion( ctx context.Context, crudClient client.Client, defaultStorageClass string, ) (*bool, error)
GetStorageAllowExpansion returns the boolean value of the 'AllowVolumeExpansion' value of the storage class
func IsWalStorageEnabled ¶
func IsWalStorageEnabled( ctx context.Context, crudClient client.Client, namespace, clusterName string, ) (bool, error)
IsWalStorageEnabled returns true if 'WalStorage' is being used
func ObjectHasAnnotations ¶
ObjectHasAnnotations returns true if the object has the passed annotations
func ObjectMatchesAnnotations ¶
ObjectMatchesAnnotations returns true if the object has the passed annotations key/value
func PvcHasLabels ¶
func PvcHasLabels( pvc corev1.PersistentVolumeClaim, labels map[string]string, ) bool
PvcHasLabels returns true if a PVC contains a given map of labels
func SetSnapshotNameAsEnv ¶
func SetSnapshotNameAsEnv( snapshotList *volumesnapshotv1.VolumeSnapshotList, backup *apiv1.Backup, envVars EnvVarsForSnapshots, ) error
SetSnapshotNameAsEnv sets the names of a PG_DATA, a PG_WAL and a list of PG_TABLESPACE snapshots from a given snapshotList as env variables
Types ¶
type EnvVarsForSnapshots ¶
type EnvVarsForSnapshots struct {
DataSnapshot string
WalSnapshot string
TablespaceSnapshotPrefix string
}
EnvVarsForSnapshots represents the environment variables to use to track snapshots and apply them in test fixture templates