diff --git a/postgres-deploy.yaml b/postgres-deploy.yaml index e843226..c6d5aa5 100644 --- a/postgres-deploy.yaml +++ b/postgres-deploy.yaml @@ -26,8 +26,14 @@ spec: - containerPort: 5432 env: - name: POSTGRES_USER - value: "postgres" + valueFrom: + secretKeyRef: + name: postgres-secret + key: POSTGRES_USER - name: POSTGRES_PASSWORD - value: "postgres" + valueFrom: + secretKeyRef: + name: postgres-secret + key: POSTGRES_PASSWORD - name: POSTGRES_HOST_AUTH_METHOD value: trust diff --git a/postgres-secret.yaml b/postgres-secret.yaml new file mode 100644 index 0000000..08f5e99 --- /dev/null +++ b/postgres-secret.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +kind: Secret +metadata: + name: postgres-secret +type: Opaque +data: + POSTGRES_USER: cG9zdGdyZXM= # base64-encoded value for "postgres" + POSTGRES_PASSWORD: cG9zdGdyZXM= # base64-encoded value for "postgres"