use secret ref instead of files

This commit is contained in:
bom 2021-09-24 15:35:57 +02:00
parent 9dcf65a85b
commit 1d3ebe20ae

View file

@ -12,12 +12,21 @@ spec:
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
command: ["/entrypoint-start-and-wait.sh"] command: ["/entrypoint-start-and-wait.sh"]
env: env:
- name: POSTGRES_USER_FILE - name: POSTGRES_USER
value: /var/run/secrets/cloud-secrets/postgres-user valueFrom:
- name: POSTGRES_DB_FILE secretKeyRef:
value: /var/run/secrets/cloud-secrets/postgres-db name: postgres-secret
- name: POSTGRES_PASSWORD_FILE key: postgres-user
value: /var/run/secrets/cloud-secrets/postgres-password - name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: postgres-secret
key: postgres-password
- name: POSTGRES_DB
valueFrom:
configMapKeyRef:
name: postgres-config
key: postgres-db
- name: POSTGRES_HOST - name: POSTGRES_HOST
value: "postgresql-service:5432" value: "postgresql-service:5432"
- name: POSTGRES_SERVICE - name: POSTGRES_SERVICE