diff --git a/components/hydra-cnpg-database/patches/hydra-janitor-cronjob.yaml b/components/hydra-cnpg-database/patches/hydra-janitor-cronjob.yaml index a8f576e..c5e4447 100644 --- a/components/hydra-cnpg-database/patches/hydra-janitor-cronjob.yaml +++ b/components/hydra-cnpg-database/patches/hydra-janitor-cronjob.yaml @@ -1,21 +1,29 @@ - op: add - path: "/spec/jobTemplate/spec/template/spec/containers/0/env/-" + path: "/spec/template/spec/containers/0/env/-" value: name: HYDRA_DATABASE_USER valueFrom: secretKeyRef: - name: hydra-postgres-user + name: hydra-postgres-app key: username - op: add - path: "/spec/jobTemplate/spec/template/spec/containers/0/env/-" + path: "/spec/template/spec/containers/0/env/-" value: name: HYDRA_DATABASE_PASSWORD valueFrom: secretKeyRef: - name: hydra-postgres-user + name: hydra-postgres-app key: password - op: add - path: "/spec/jobTemplate/spec/template/spec/containers/0/env/-" + path: "/spec/template/spec/containers/0/env/-" + value: + name: HYDRA_DATABASE_SERVICE_NAME + valueFrom: + secretKeyRef: + name: hydra-postgres-app + key: host +- op: add + path: "/spec/template/spec/containers/0/env/-" value: name: DSN - value: "postgres://$(HYDRA_DATABASE_USER):$(HYDRA_DATABASE_PASSWORD)@$(HYDRA_DATABASE_SERVICE_NAME)-rw:5432/hydra?sslmode=disable" \ No newline at end of file + value: "postgres://$(HYDRA_DATABASE_USER):$(HYDRA_DATABASE_PASSWORD)@$(HYDRA_DATABASE_SERVICE_NAME):5432/hydra?sslmode=disable" diff --git a/components/hydra-cnpg-database/resources/hydra-cnpg-cluster.yaml b/components/hydra-cnpg-database/resources/hydra-cnpg-cluster.yaml index cfb39e9..8d910f1 100644 --- a/components/hydra-cnpg-database/resources/hydra-cnpg-cluster.yaml +++ b/components/hydra-cnpg-database/resources/hydra-cnpg-cluster.yaml @@ -5,13 +5,9 @@ metadata: spec: instances: 3 primaryUpdateStrategy: unsupervised - superuserSecret: - name: hydra-postgres-admin bootstrap: initdb: database: hydra owner: hydra - secret: - name: hydra-postgres-user storage: size: 2Gi