From ddf8d7cbcbacdb3b1c277f7a3a1495034b386cf3 Mon Sep 17 00:00:00 2001 From: Josh Santos Date: Wed, 18 Dec 2024 21:24:37 +0700 Subject: [PATCH 1/2] Update environment variable name in kubernetes deployment docs Signed-off-by: Josh Santos --- docs/deployment/k8s.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/deployment/k8s.md b/docs/deployment/k8s.md index 46ba273e14..a2939dcae7 100644 --- a/docs/deployment/k8s.md +++ b/docs/deployment/k8s.md @@ -387,8 +387,8 @@ $ yarn build-image --tag backstage:1.0.0 ``` There is no special wiring needed to access the PostgreSQL service. Since it's -running on the same cluster, Kubernetes will inject `POSTGRES_SERVICE_HOST` and -`POSTGRES_SERVICE_PORT` environment variables into our Backstage container. +running on the same cluster, Kubernetes will inject `POSTGRES_HOST` and +`POSTGRES_PORT` environment variables into our Backstage container. These can be used in the Backstage `app-config.yaml` along with the secrets. Apply this to `app-config.production.yaml` as well if you have one: ```yaml @@ -396,8 +396,8 @@ backend: database: client: pg connection: - host: ${POSTGRES_SERVICE_HOST} - port: ${POSTGRES_SERVICE_PORT} + host: ${POSTGRES_HOST} + port: ${POSTGRES_PORT} user: ${POSTGRES_USER} password: ${POSTGRES_PASSWORD} ``` From 45962b004f7ef4621a9f0fecc238503ee834fe77 Mon Sep 17 00:00:00 2001 From: Josh Santos Date: Wed, 18 Dec 2024 21:30:37 +0700 Subject: [PATCH 2/2] Update deployment env vars Signed-off-by: Josh Santos Run prettier for docs Signed-off-by: Josh Santos --- docs/deployment/k8s.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/deployment/k8s.md b/docs/deployment/k8s.md index a2939dcae7..1a225d6d12 100644 --- a/docs/deployment/k8s.md +++ b/docs/deployment/k8s.md @@ -210,6 +210,11 @@ spec: envFrom: - secretRef: name: postgres-secrets + env: + - name: POSTGRES_HOST + value: postgres.backstage + - name: POSTGRES_PORT + value: '5432' volumeMounts: - mountPath: /var/lib/postgresql/data name: postgresdb