Skip to content

Commit a47e4a3

Browse files
committed
feat(helm): add env.js ConfigMap mount support
Add envJs.configMap option to mount external ConfigMap for env.js. This allows Helm deployments to use the same runtime config pattern where env.js only sets configEndpoint=true and KEYCLOAK_CLIENT_ID. IMPORTANT: The ConfigMap should be minimal - all other config comes from /api/config. See wiki: Configuration-Management
1 parent 234d281 commit a47e4a3

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed

helm/eagle-admin/templates/deployment.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,18 @@ spec:
6363
value: {{ $value | quote }}
6464
{{- end }}
6565
{{- end }}
66+
{{- if .Values.envJs.configMap }}
67+
volumeMounts:
68+
- name: env-js
69+
mountPath: /tmp/app/dist/admin/env.js
70+
subPath: env.js
71+
{{- end }}
72+
{{- if .Values.envJs.configMap }}
73+
volumes:
74+
- name: env-js
75+
configMap:
76+
name: {{ .Values.envJs.configMap }}
77+
{{- end }}
6678
dnsPolicy: ClusterFirst
6779
restartPolicy: Always
6880
securityContext: {}

helm/eagle-admin/values-prod.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ podDisruptionBudget:
2020
enabled: true
2121
minAvailable: 1
2222

23+
# Mount existing ConfigMap for env.js
24+
# IMPORTANT: ConfigMap should only contain configEndpoint=true and KEYCLOAK_CLIENT_ID
25+
# All other config comes from /api/config. See wiki: Configuration-Management
26+
envJs:
27+
configMap: "eagle-admin-env-js"
28+
2329
env:
2430
DEPLOYMENT_ENVIRONMENT: "prod"
2531
BANNER_COLOUR: ""

helm/eagle-admin/values.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,13 @@ env:
6262
REMOTE_PUBLIC_PATH: ""
6363
KEYCLOAK_CLIENT_ID: "eagle-admin-console"
6464

65+
# env.js ConfigMap - mount external ConfigMap to override built-in env.js
66+
# Set configMap name to use existing ConfigMap, leave empty to use container's built-in env.js
67+
# IMPORTANT: Only set configEndpoint=true and KEYCLOAK_CLIENT_ID in this ConfigMap
68+
# All other config comes from /api/config. See wiki: Configuration-Management
69+
envJs:
70+
configMap: "" # e.g., "eagle-admin-env-js"
71+
6572
# Pod annotations
6673
podAnnotations: {}
6774

0 commit comments

Comments
 (0)