Skip to content

Support Downward API in Helm charts#414

Open
disrvptor wants to merge 1 commit intobakdata:masterfrom
disrvptor:feature/downward-api
Open

Support Downward API in Helm charts#414
disrvptor wants to merge 1 commit intobakdata:masterfrom
disrvptor:feature/downward-api

Conversation

@disrvptor
Copy link

  • Added to envValuesFrom to helper
  • Added to envValuesFrom to default values
  • Updated readme files with the new environment block

Resolves #413

{{- $root := . -}}
- name: ENV_PREFIX
value: {{ .Values.configurationEnvPrefix }}_
{{ if .Values.envValueFrom }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{{ if .Values.envValueFrom }}
{{- if .Values.envValueFrom }}

- name: ENV_PREFIX
value: {{ .Values.configurationEnvPrefix }}_
{{ if .Values.envValueFrom }}
{{ toYaml .Values.envValueFrom }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be better to have a map like approach here. So name is the key and valueFrom is the value. That way merging multiple value.yaml files is possible which is a pattern we often use

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{{ toYaml .Values.envValueFrom }}
{{- range $key, $value := .Values.envValueFrom }}
- name: {{ $key | quote }}
valueFrom:
{{ toYaml $value | indent 4 }}
{{- end }}

should do the trick. values should look like this

envValueFrom: {}
#  NODE_NAME:
#    fieldRef:
#      fieldPath: spec.nodeName

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Downward API in Helm charts

2 participants