forked from CrunchyData/postgres-operator-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create optional backups flag (CrunchyData#103)
Make backups optional for create As of PGO v5.7, backups can now be disabled or enabled at any point in the postgrescluster's lifecycle. We don't want to bring that functionality entire over into the CLI, but we do want to start by allowing users to create a cluster without backups. Since this is a not recommended for production, we require confirmation. This should not block later changes that may allow users to disable/enable backups after creation. Issue: [PGO-1530]
- Loading branch information
1 parent
d41109f
commit 7c1c509
Showing
8 changed files
with
88 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
testing/kuttl/e2e/create-without-backups/00--create_cluster.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestStep | ||
commands: | ||
- script: echo no | kubectl-pgo --namespace $NAMESPACE create postgrescluster --pg-major-version 16 --disable-backups created-without-backups |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
apiVersion: postgres-operator.crunchydata.com/v1beta1 | ||
kind: PostgresCluster | ||
metadata: | ||
name: created-without-backups | ||
spec: | ||
instances: | ||
- dataVolumeClaimSpec: | ||
accessModes: | ||
- "ReadWriteOnce" | ||
resources: | ||
requests: | ||
storage: 1Gi | ||
replicas: 1 | ||
postgresVersion: 16 | ||
status: | ||
instances: | ||
- name: "00" | ||
readyReplicas: 1 | ||
replicas: 1 | ||
updatedReplicas: 1 |
5 changes: 5 additions & 0 deletions
5
testing/kuttl/e2e/create-without-backups/01--create_cluster.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestStep | ||
commands: | ||
- script: echo yes | kubectl-pgo --namespace $NAMESPACE create postgrescluster --pg-major-version 16 --disable-backups created-without-backups |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
apiVersion: postgres-operator.crunchydata.com/v1beta1 | ||
kind: PostgresCluster | ||
metadata: | ||
name: created-without-backups | ||
spec: | ||
instances: | ||
- dataVolumeClaimSpec: | ||
accessModes: | ||
- "ReadWriteOnce" | ||
resources: | ||
requests: | ||
storage: 1Gi | ||
replicas: 1 | ||
postgresVersion: 16 | ||
status: | ||
instances: | ||
- name: "00" | ||
readyReplicas: 1 | ||
replicas: 1 | ||
updatedReplicas: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: created-without-backups-repo-host |