use config ref

This commit is contained in:
jem 2021-05-28 17:06:39 +02:00
parent 48be734cfc
commit 388ca2e50f
3 changed files with 8 additions and 3 deletions

View file

@ -5,6 +5,7 @@ metadata:
labels:
app: postgres
data:
postgres-db: keycloak
postgresql.conf: |
max_connections = 1000
shared_buffers = 512MB

View file

@ -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

View file

@ -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