commit c9a5c09b4917b7de99d53e91bf50a5b4f217e05c Author: Michel ten Voorde Date: Sun Apr 13 20:34:21 2025 +0200 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..87271a8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,27 @@ +# ---> Java +# Compiled class file +*.class + +# Log file +*.log + +# BlueJ files +*.ctxt + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.nar +*.ear +*.zip +*.tar.gz +*.rar + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* +replay_pid* + +.idea \ No newline at end of file diff --git a/kustomization.yaml b/kustomization.yaml new file mode 100644 index 0000000..dab0c9b --- /dev/null +++ b/kustomization.yaml @@ -0,0 +1,7 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +namespace: swiss + +resources: +- postgres.yaml diff --git a/pgadmin.yaml b/pgadmin.yaml new file mode 100644 index 0000000..26ae369 --- /dev/null +++ b/pgadmin.yaml @@ -0,0 +1,38 @@ +apiVersion: postgres-operator.crunchydata.com/v1beta1 +kind: PGAdmin +metadata: + name: pgadmin + namespace: postgres-operator +spec: + users: + - username: michel@tenvoorde.org + role: Administrator + passwordRef: + name: pgadmin-password-secret + key: michel + dataVolumeClaimSpec: + accessModes: + - "ReadWriteOnce" + resources: + requests: + storage: 1Gi + serverGroups: + - name: swiss + postgresClusterName: swiss-pg +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: pgadmin + name: pgadmin-svc + namespace: postgres-operator +spec: + type: NodePort + ports: + - name: pgadmin + port: 5050 + protocol: TCP + nodePort: 30050 + selector: + postgres-operator.crunchydata.com/pgadmin: pgadmin diff --git a/postgres.yaml b/postgres.yaml new file mode 100644 index 0000000..32da2c0 --- /dev/null +++ b/postgres.yaml @@ -0,0 +1,37 @@ +apiVersion: postgres-operator.crunchydata.com/v1beta1 +kind: PostgresCluster +metadata: + name: swiss-pg +spec: + image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi8-16.3-1 + postgresVersion: 16 + instances: + - name: instance1 + dataVolumeClaimSpec: + accessModes: + - "ReadWriteOnce" + resources: + requests: + storage: 1Gi +# selector: +# matchLabels: +# pgo-postgres-cluster: postgres-operator-swiss-pg + backups: + pgbackrest: + image: registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:ubi8-2.51-1 + repos: + - name: repo1 + volume: + volumeClaimSpec: + accessModes: + - "ReadWriteOnce" + resources: + requests: + storage: 1Gi + users: + - name: swiss-user + databases: + - swiss + - name: swiss-test-user + databases: + - swiss-test