Skip to content

Commit d3aee4a

Browse files
aogieralexmv
andcommitted
helm: Support valueFrom by setting a dict value in zulip.environment.
This is possibly useful with both `SECRET_...`[^1] and `SETTING_...`[^2][^3] values. [^1]: https://kubernetes.io/docs/tasks/inject-data-application/distribute-credentials-secure/ [^2]: https://kubernetes.io/docs/tasks/inject-data-application/environment-variable-expose-pod-information/ [^3]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/ Co-authored-by: Alex Vandiver <alexmv@zulip.com>
1 parent 140a042 commit d3aee4a

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

kubernetes/chart/zulip/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,19 @@ variables are forwarded to the Docker container, you can read more about
144144
configuring Zulip through environment variables
145145
[here](https://github.com/zulip/docker-zulip/#configuration).
146146

147+
Variables can be either a plain scalar value (i.e., a string or
148+
integer), or a projected value from a secret or configmap. For
149+
example:
150+
151+
```yaml
152+
SETTING_EXTERNAL_HOST: zulip.example.com
153+
SECRETS_email_password:
154+
valueFrom:
155+
secretKeyRef:
156+
name: email
157+
key: password
158+
```
159+
147160
### Dependencies
148161
149162
The chart uses Memcached, RabbitMQ and Redis helm charts defined in

kubernetes/chart/zulip/templates/_helpers.tpl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@ include all env variables for Zulip pods
9090
value: "{{ .Values.zulip.password }}"
9191
{{- range $key, $value := .Values.zulip.environment }}
9292
- name: {{ $key }}
93+
{{- if kindIs "map" $value }}
94+
{{- toYaml $value | nindent 2 }}
95+
{{- else }}
9396
value: {{ $value | quote }}
97+
{{- end }}
9498
{{- end }}
9599
{{- end }}

0 commit comments

Comments
 (0)