diff --git a/kustomize/high-availability/ha-postgres.yaml b/kustomize/high-availability/ha-postgres.yaml index 857bd9b7..9d5a30e6 100644 --- a/kustomize/high-availability/ha-postgres.yaml +++ b/kustomize/high-availability/ha-postgres.yaml @@ -1,10 +1,18 @@ apiVersion: postgres-operator.crunchydata.com/v1beta1 kind: PostgresCluster metadata: - name: hippo-ha + name: crunchy-poc spec: - image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi8-16.3-1 - postgresVersion: 16 + service: + type: LoadBalancer + metadata: + annotations: + service.beta.kubernetes.io/aws-load-balancer-internal: "true" + imagePullSecrets: + - name: crtestreg + image: registry.crunchydata.com/crunchydata/crunchy-postgres:ubi8-15.7-5.6.0-2 + # image: registry.crunchydata.com/crunchydata/crunchy-postgres:ubi8-15.8-5.6.2-0 + postgresVersion: 15 instances: - name: pgha1 replicas: 2 @@ -22,11 +30,12 @@ spec: topologyKey: kubernetes.io/hostname labelSelector: matchLabels: - postgres-operator.crunchydata.com/cluster: hippo-ha + postgres-operator.crunchydata.com/cluster: crunchy-poc postgres-operator.crunchydata.com/instance-set: pgha1 backups: pgbackrest: - image: registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:ubi8-2.51-1 + image: registry.crunchydata.com/crunchydata/crunchy-pgbackrest:ubi8-5.6.0-2 + # image: registry.crunchydata.com/crunchydata/crunchy-pgbackrest:ubi8-5.6.2-0 repos: - name: repo1 volume: @@ -36,9 +45,13 @@ spec: resources: requests: storage: 1Gi + monitoring: + pgmonitor: + exporter: + image: registry.crunchydata.com/crunchydata/crunchy-postgres-exporter:ubi8-5.6.0-2 proxy: pgBouncer: - image: registry.developers.crunchydata.com/crunchydata/crunchy-pgbouncer:ubi8-1.22-1 + image: registry.crunchydata.com/crunchydata/crunchy-pgbouncer:ubi8-1.22-1 replicas: 2 affinity: podAntiAffinity: @@ -48,5 +61,30 @@ spec: topologyKey: kubernetes.io/hostname labelSelector: matchLabels: - postgres-operator.crunchydata.com/cluster: hippo-ha + postgres-operator.crunchydata.com/cluster: crunchy-poc postgres-operator.crunchydata.com/role: pgbouncer + resources: + requests: + ephemeral-storage: "2Gi" # Request 2GiB of ephemeral storage + limits: + ephemeral-storage: "4Gi" # Limit usage to 4GiB of ephemeral storage + + # patroni: + # dynamicConfiguration: + # postgresql: + # parameters: + # max_parallel_workers: 2 + # max_worker_processes: 2 + # shared_buffers: 1GB + # work_mem: 2MB + # pg_hba: + # - "hostssl all all all scram-sha-256" + patroni: + dynamicConfiguration: + postgresql: + parameters: + max_parallel_workers: 8 + max_worker_processes: 8 + wal_sender_timeout: 10min + shared_buffers: 128MB + work_mem: 4MB diff --git a/kustomize/high-availability/kustomization.yaml b/kustomize/high-availability/kustomization.yaml index ff4b909c..b7e9bf38 100644 --- a/kustomize/high-availability/kustomization.yaml +++ b/kustomize/high-availability/kustomization.yaml @@ -1,7 +1,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -namespace: postgres-operator +namespace: crunchy-poc resources: - ha-postgres.yaml diff --git a/kustomize/install/default/image-pull.yaml b/kustomize/install/default/image-pull.yaml new file mode 100644 index 00000000..b6be976e --- /dev/null +++ b/kustomize/install/default/image-pull.yaml @@ -0,0 +1,7 @@ +apiVersion: v1 +kind: Secret +metadata: + name: crunchyreg +data: + .dockerconfigjson: eyJhdXRocyI6eyJyZWdpc3RyeS5jcnVuY2h5ZGF0YS5jb20iOnsidXNlcm5hbWUiOiJwa3VtYXJAdXBncmFkZS5jb20iLCJwYXNzd29yZCI6IjlvbThmUmFtZXczNHE9QiIsImVtYWlsIjoicGt1bWFyQHVwZ3JhZGUuY29tIiwiYXV0aCI6ImNHdDFiV0Z5UUhWd1ozSmhaR1V1WTI5dE9qbHZiVGhtVW1GdFpYY3pOSEU5UWc9PSJ9fX0= +type: kubernetes.io/dockerconfigjson diff --git a/kustomize/install/default/kustomization.yaml b/kustomize/install/default/kustomization.yaml index 1583c865..2d5a255a 100644 --- a/kustomize/install/default/kustomization.yaml +++ b/kustomize/install/default/kustomization.yaml @@ -1,6 +1,6 @@ kind: Kustomization -namespace: postgres-operator +namespace: pg-operator labels: - includeSelectors: false @@ -14,9 +14,11 @@ labels: postgres-operator.crunchydata.com/control-plane: postgres-operator resources: +- image-pull.yaml - ../crd - ../rbac/cluster - ../manager + components: - ../components/images-by-tag diff --git a/kustomize/install/rbac/cluster/service_account.yaml b/kustomize/install/rbac/cluster/service_account.yaml index 364f7971..3bf992ac 100644 --- a/kustomize/install/rbac/cluster/service_account.yaml +++ b/kustomize/install/rbac/cluster/service_account.yaml @@ -3,3 +3,6 @@ apiVersion: v1 kind: ServiceAccount metadata: name: pgo +imagePullSecrets: +- name: crunchyreg + diff --git a/kustomize/monitoring/kustomization.yaml b/kustomize/monitoring/kustomization.yaml index 15010e47..ff0aaf03 100644 --- a/kustomize/monitoring/kustomization.yaml +++ b/kustomize/monitoring/kustomization.yaml @@ -1,6 +1,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -namespace: postgres-operator +namespace: crunchy-poc-monitoring labels: - includeSelectors: true