Skip to content

Commit 1ac60ba

Browse files
committed
Map additional environment keys from a config map
1 parent ccb4b64 commit 1ac60ba

File tree

4 files changed

+15
-3
lines changed

4 files changed

+15
-3
lines changed

Charts/ldtteam-authentication-server/templates/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
apiVersion: v1
33
kind: ConfigMap
44
metadata:
5-
name: {{ include "ldtteam-authentication-server.fullname" . }}
5+
name: {{ include "ldtteam-authentication-server.fullname" . }}-appsettings
66
labels:
77
{{- include "ldtteam-authentication-server.labels" . | nindent 4 }}
88
data:

Charts/ldtteam-authentication-server/templates/deployment.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ spec:
5353
mountPath: /app/privateKey.pem
5454
readOnly: true
5555
subPath: privateKey.pem
56+
envFrom:
57+
- configMapRef:
58+
name: {{ include "ldtteam-authentication-server.fullname" . }}-environment
5659
env:
5760
{{- include "ldtteam-authentication-server.envFromSecret" (merge (dict "Secret" "Discord.BotToken") .) | nindent 12}}
5861
{{- include "ldtteam-authentication-server.envFromSecret" (merge (dict "Secret" "Discord.ClientSecret") .) | nindent 12}}
@@ -66,7 +69,7 @@ spec:
6669
volumes:
6770
- name: appsettings
6871
configMap:
69-
name: {{ include "ldtteam-authentication-server.fullname" . }}
72+
name: {{ include "ldtteam-authentication-server.fullname" . }}-appsettings
7073
- name: secrets
7174
secret:
7275
secretName: {{ include "ldtteam-authentication-server.fullname" . }}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Contains the app configuration for the authentication server
2+
apiVersion: v1
3+
kind: ConfigMap
4+
metadata:
5+
name: {{ include "ldtteam-authentication-server.fullname" . }}-environment
6+
labels:
7+
{{- include "ldtteam-authentication-server.labels" . | nindent 4 }}
8+
data:
9+
{{- toYaml .Values.environment | nindent 2 }}

Charts/ldtteam-authentication-server/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ autoscaling:
5858
targetCPUUtilizationPercentage: 80
5959
targetMemoryUtilizationPercentage: 80
6060

61-
extraEnv: []
61+
environment:
6262

6363
postgresql:
6464
enabled: true

0 commit comments

Comments
 (0)