IsWalStorageEnabled returns true if 'WalStorage' is being used
( ctx context.Context, crudClient client.Client, namespace, clusterName string, )
| 51 | |
| 52 | // IsWalStorageEnabled returns true if 'WalStorage' is being used |
| 53 | func 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 |
| 66 | func PvcHasLabels( |