Skip to content

Commit

Permalink
feat(manager elevator): [#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 2317af6 commit f88b298
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 20 deletions.

This file was deleted.

Expand Up @@ -54,10 +54,10 @@ spec:
- name: SENTRY_ENVIRONMENT
value: {{ .Values.sentry.environment | quote }}
{{ end }}
envFrom:
# The configMap is capable of handling JSON ENVs
- configMapRef:
name: manager-engagement-elevator-config
{{- range $name, $value := .Values.manager_engagement_elevator.environment }}
- name: {{ $name }}
value: {{ $value | quote }}
{{- end }}
ports:
- containerPort: 8000
resources:
Expand Down

0 comments on commit f88b298

Please sign in to comment.