Skip to content

Commit

Permalink
feat(sd_changed_at): [#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 edcdf44 commit 8e40287
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 19 deletions.
16 changes: 0 additions & 16 deletions os2mo/templates/integrations/sd-changed-at/config.yaml

This file was deleted.

7 changes: 4 additions & 3 deletions os2mo/templates/integrations/sd-changed-at/deployment.yaml
Expand Up @@ -91,9 +91,10 @@ spec:
secretKeyRef:
name: {{ .Values.sd_changed_at.sd_secret_name }}
key: sd_institution
envFrom:
- configMapRef:
name: sd-changed-at
{{- range $name, $value := .Values.sd_changed_at.environment }}
- name: {{ $name }}
value: {{ $value | quote }}
{{- end }}
ports:
- containerPort: 5000
resources:
Expand Down

0 comments on commit 8e40287

Please sign in to comment.