Open
Conversation
…ward API environment values
philipp94831
requested changes
Feb 12, 2026
| {{- $root := . -}} | ||
| - name: ENV_PREFIX | ||
| value: {{ .Values.configurationEnvPrefix }}_ | ||
| {{ if .Values.envValueFrom }} |
Member
There was a problem hiding this comment.
Suggested change
| {{ if .Values.envValueFrom }} | |
| {{- if .Values.envValueFrom }} |
| - name: ENV_PREFIX | ||
| value: {{ .Values.configurationEnvPrefix }}_ | ||
| {{ if .Values.envValueFrom }} | ||
| {{ toYaml .Values.envValueFrom }} |
Member
There was a problem hiding this comment.
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
Member
There was a problem hiding this comment.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
envValuesFromto helperenvValuesFromto default valuesResolves #413