diff --git a/src/main/resources/postgres/config.yaml b/src/main/resources/postgres/config.yaml index 799cc45..4006743 100644 --- a/src/main/resources/postgres/config.yaml +++ b/src/main/resources/postgres/config.yaml @@ -5,6 +5,7 @@ metadata: labels: app: postgres data: + postgres-db: keycloak postgresql.conf: | max_connections = 1000 shared_buffers = 512MB diff --git a/src/main/resources/postgres/deployment.yaml b/src/main/resources/postgres/deployment.yaml index 143d376..9b9578a 100644 --- a/src/main/resources/postgres/deployment.yaml +++ b/src/main/resources/postgres/deployment.yaml @@ -20,13 +20,15 @@ spec: - name: POSTGRES_USER value: "psql-user" - name: POSTGRES_DB - value: "keycloak" + valueFrom: + configMapKeyRef: + name: postgres-config + key: postgres-db - name: POSTGRES_PASSWORD value: "psql-pw" ports: - containerPort: 5432 name: postgresql - cmd: volumeMounts: - name: postgres-config-volume mountPath: /etc/postgresql/postgresql.conf diff --git a/src/test/cljc/dda/k8s_keycloak/postgres_test.cljc b/src/test/cljc/dda/k8s_keycloak/postgres_test.cljc index 26e8e83..5ccf16c 100644 --- a/src/test/cljc/dda/k8s_keycloak/postgres_test.cljc +++ b/src/test/cljc/dda/k8s_keycloak/postgres_test.cljc @@ -19,7 +19,9 @@ :name "postgresql" :env [{:name "POSTGRES_USER", :value "psqluser"} - {:name "POSTGRES_DB", :value "keycloak"} + {:name "POSTGRES_DB", :valueFrom + {:configMapKeyRef + {:name "postgres-config", :key "postgres-db"}}} {:name "POSTGRES_PASSWORD", :value "test1234"}] :ports [{:containerPort 5432, :name "postgresql"}] :cmd nil