Skip to content

Commit

Permalink
feat(orgviewer med): [#48311] template environment variables directly
Browse files Browse the repository at this point in the history
Previously, environment variables were templated into a ConfigMap which
was referenced through an `envFrom` in the deployment. Unfortunately,
Kubernetes does not restart deployments on changes to their referenced
ConfigMaps[1], so this indirection means that deployments have to be
restarted manually every time a change is made - something that is very
easy to forget in an otherwise GitOpsy workflow.

[1] kubernetes/kubernetes#22368
  • Loading branch information
caspervk committed Jun 28, 2023
1 parent 758af5c commit 54a9f78
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 18 deletions.
15 changes: 0 additions & 15 deletions os2mo/templates/orgviewer/med/configmap.yaml

This file was deleted.

8 changes: 5 additions & 3 deletions os2mo/templates/orgviewer/med/deployment.yaml
Expand Up @@ -64,9 +64,11 @@ spec:
value: {{ $value | quote }}
{{- end }}

envFrom:
- configMapRef:
name: orgviewer-med-config
{{- range $name, $value := .Values.orgviewer.med.environment }}
- name: {{ $name }}
value: {{ $value | quote }}
{{- end }}

ports:
- containerPort: 80
resources:
Expand Down

0 comments on commit 54a9f78

Please sign in to comment.