diff --git a/README.md b/README.md index f42ee5e..460f0ac 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,13 @@ # gitops GitOps artefacts + + +## Deploy Postgres CrunchyDB + +1. Create a namespace ***preprod-database*** +2. Install the crunchyDB operator +3. run oc apply -k kustomize/postgres + +More details here : https://access.crunchydata.com/documentation/postgres-operator/5.3.1/quickstart/ + + diff --git a/kustomize/postgres/kustomization.yaml b/kustomize/postgres/kustomization.yaml new file mode 100644 index 0000000..249b410 --- /dev/null +++ b/kustomize/postgres/kustomization.yaml @@ -0,0 +1,4 @@ +namespace: postgres-operator + +resources: +- postgres.yaml diff --git a/kustomize/postgres/postgres.yaml b/kustomize/postgres/postgres.yaml new file mode 100644 index 0000000..ecf6c0c --- /dev/null +++ b/kustomize/postgres/postgres.yaml @@ -0,0 +1,27 @@ +apiVersion: postgres-operator.crunchydata.com/v1beta1 +kind: PostgresCluster +metadata: + name: hippo +spec: + image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi8-15.2-0 + postgresVersion: 15 + instances: + - name: instance1 + dataVolumeClaimSpec: + accessModes: + - "ReadWriteOnce" + resources: + requests: + storage: 1Gi + backups: + pgbackrest: + image: registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:ubi8-2.41-4 + repos: + - name: repo1 + volume: + volumeClaimSpec: + accessModes: + - "ReadWriteOnce" + resources: + requests: + storage: 1Gi