From f2cb2349666ecd46f24145c49b5f42bbc189c9b4 Mon Sep 17 00:00:00 2001 From: Glenn Franxman Date: Tue, 3 Sep 2024 23:59:31 -0400 Subject: [PATCH] feat: reorder environment variables in k8s django config (#350) Rearranged the order in which the environment variables are loaded in the Kubernetes configuration file for Django. Environment variables will now be loaded from 'app-config' ConfigMap first, followed by the 'secrets-config'. This allows the local secrets config to override the app-config and not the other way around. --- {{cookiecutter.project_slug}}/k8s/base/django.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/{{cookiecutter.project_slug}}/k8s/base/django.yaml b/{{cookiecutter.project_slug}}/k8s/base/django.yaml index 26156733..8c1ee07a 100644 --- a/{{cookiecutter.project_slug}}/k8s/base/django.yaml +++ b/{{cookiecutter.project_slug}}/k8s/base/django.yaml @@ -36,10 +36,10 @@ spec: - name: http-server containerPort: 8000 envFrom: - - secretRef: - name: secrets-config - configMapRef: name: app-config + - secretRef: + name: secrets-config livenessProbe: httpGet: path: /healthz @@ -76,7 +76,7 @@ spec: image: backend:latest command: ["python", "manage.py", "migrate"] envFrom: - - secretRef: - name: secrets-config - configMapRef: name: app-config + - secretRef: + name: secrets-config