diff --git a/kustomize/postgres/add-users.yaml b/kustomize/postgres/add-users.yaml new file mode 100644 index 00000000..60af7fad --- /dev/null +++ b/kustomize/postgres/add-users.yaml @@ -0,0 +1,10 @@ +apiVersion: postgres-operator.crunchydata.com/v1beta1 +kind: PostgresCluster +metadata: + name: hippo +spec: + users: + - name: rhino + databases: + - zoo + options: "SUPERUSER" diff --git a/kustomize/postgres/kustomization.yaml b/kustomize/postgres/kustomization.yaml index 249b4106..2986be1e 100644 --- a/kustomize/postgres/kustomization.yaml +++ b/kustomize/postgres/kustomization.yaml @@ -1,4 +1,12 @@ -namespace: postgres-operator +namespace: visfrim-database resources: - postgres.yaml + +patchesJson6902: +- target: + group: postgres-operator.crunchydata.com + version: v1beta1 + kind: PostgresCluster + name: hippo + path: visfrim-patch.yaml diff --git a/kustomize/postgres/meteo-baza/kustomization.yaml b/kustomize/postgres/meteo-baza/kustomization.yaml new file mode 100644 index 00000000..eced51f2 --- /dev/null +++ b/kustomize/postgres/meteo-baza/kustomization.yaml @@ -0,0 +1,12 @@ +namespace: meteo-database + +resources: +- postgres.yaml + +patchesJson6902: +- target: + group: postgres-operator.crunchydata.com + version: v1beta1 + kind: PostgresCluster + name: hippo + path: meteo-patch.yaml diff --git a/kustomize/postgres/meteo-baza/meteo-patch.yaml b/kustomize/postgres/meteo-baza/meteo-patch.yaml new file mode 100644 index 00000000..6650dab8 --- /dev/null +++ b/kustomize/postgres/meteo-baza/meteo-patch.yaml @@ -0,0 +1,45 @@ +- op: replace + path: /metadata/name + value: meteo-db +- op: replace + path: /spec/image + value: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:centos8-13.4-3.1-1 +- op: replace + path: /spec/instances/0/dataVolumeClaimSpec/resources/requests/storage + value: 40Gi +- op: replace + path: /spec/backups/pgbackrest/repos/0/volume/volumeClaimSpec/resources/requests/storage + value: 40Gi +- op: add + path: /spec/users + value: [{"name": "hasura", "databases": ["hasura"], "options": "SUPERUSER"}, {"name": "meteo-db", "databases": ["meteo-db"], "options": ""}] +- op: add + path: /spec/patroni + value: + dynamicConfiguration: + postgresql: + parameters: + shared_preload_libraries: timescaledb +- op: add + path: /spec/backups/pgbackrest/global + value: + repo1-retention-full: "7" + repo1-retention-full-type: time +- op: add + path: /spec/backups/pgbackrest/manual + value: + repoName: repo1 + options: + - --type=full +- op: add + path: /spec/backups/pgbackrest/repos/0/schedules + value: + full: "0 1 * * *" + incremental: "5 * * * *" + + + + + + + diff --git a/kustomize/postgres/meteo-baza/postgres.yaml b/kustomize/postgres/meteo-baza/postgres.yaml new file mode 100644 index 00000000..5e7b9dc5 --- /dev/null +++ b/kustomize/postgres/meteo-baza/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:centos8-13.4-1 + postgresVersion: 13 + instances: + - name: instance1 + dataVolumeClaimSpec: + accessModes: + - "ReadWriteOnce" + resources: + requests: + storage: 1Gi + backups: + pgbackrest: + image: registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:centos8-2.35-0 + repos: + - name: repo1 + volume: + volumeClaimSpec: + accessModes: + - "ReadWriteOnce" + resources: + requests: + storage: 1Gi diff --git a/kustomize/postgres/test/kustomization.yaml b/kustomize/postgres/test/kustomization.yaml new file mode 100644 index 00000000..fd0f0cb5 --- /dev/null +++ b/kustomize/postgres/test/kustomization.yaml @@ -0,0 +1,12 @@ +namespace: test-bitnami-nginx + +resources: +- postgres.yaml + +patchesJson6902: +- target: + group: postgres-operator.crunchydata.com + version: v1beta1 + kind: PostgresCluster + name: hippo + path: test-patch.yaml diff --git a/kustomize/postgres/test/postgres.yaml b/kustomize/postgres/test/postgres.yaml new file mode 100644 index 00000000..5e7b9dc5 --- /dev/null +++ b/kustomize/postgres/test/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:centos8-13.4-1 + postgresVersion: 13 + instances: + - name: instance1 + dataVolumeClaimSpec: + accessModes: + - "ReadWriteOnce" + resources: + requests: + storage: 1Gi + backups: + pgbackrest: + image: registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:centos8-2.35-0 + repos: + - name: repo1 + volume: + volumeClaimSpec: + accessModes: + - "ReadWriteOnce" + resources: + requests: + storage: 1Gi diff --git a/kustomize/postgres/test/test-patch.yaml b/kustomize/postgres/test/test-patch.yaml new file mode 100644 index 00000000..3d107061 --- /dev/null +++ b/kustomize/postgres/test/test-patch.yaml @@ -0,0 +1,30 @@ +- op: replace + path: /metadata/name + value: test-db +- op: replace + path: /spec/image + value: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:centos8-13.4-3.1-1 +- op: add + path: /spec/patroni + value: + dynamicConfiguration: + postgresql: + parameters: + shared_preload_libraries: timescaledb +- op: add + path: /spec/backups/pgbackrest/global + value: + repo1-retention-full: "7" + repo1-retention-full-type: time +- op: add + path: /spec/backups/pgbackrest/manual + value: + repoName: repo1 + options: + - --type=full +- op: add + path: /spec/backups/pgbackrest/repos/0/schedules + value: + full: "0 1 * * *" + incremental: "*/5 * * * *" + diff --git a/kustomize/postgres/visfrim-patch.yaml b/kustomize/postgres/visfrim-patch.yaml new file mode 100644 index 00000000..1b2d71f7 --- /dev/null +++ b/kustomize/postgres/visfrim-patch.yaml @@ -0,0 +1,44 @@ +- op: replace + path: /metadata/name + value: visfrim-db +- op: replace + path: /spec/image + value: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:centos8-13.5-3.1-0 +- op: replace + path: /spec/instances/0/dataVolumeClaimSpec/resources/requests/storage + value: 5Gi +- op: replace + path: /spec/backups/pgbackrest/repos/0/volume/volumeClaimSpec/resources/requests/storage + value: 3Gi +- op: add + path: /spec/users + value: [{"name": "visfrim", "databases": ["visfrim-db"], "options": "SUPERUSER"}] +- op: add + path: /spec/patroni + value: + dynamicConfiguration: + postgresql: + parameters: + max_wal_size: 100 MB +- op: replace + path: /spec/backups/pgbackrest/image + value: registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:centos8-2.36-0 +- op: add + path: /spec/backups/pgbackrest/global + value: + repo1-retention-full: "5" + repo1-retention-full-type: time + log-level-console: debug + +- op: add + path: /spec/backups/pgbackrest/manual + value: + repoName: repo1 + options: + - --type=full +- op: add + path: /spec/backups/pgbackrest/repos/0/schedules + value: + full: "0 1 * * *" + incremental: "0 */1 * * *" +