Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add additionalEnv helm settings #12080

Merged
merged 1 commit into from
Feb 15, 2024
Merged

Add additionalEnv helm settings #12080

merged 1 commit into from
Feb 15, 2024

Conversation

alpeb
Copy link
Member

@alpeb alpeb commented Feb 14, 2024

Add additionalEnv helm settings to the proxy and controller manifests alongside the existing experimentalEnv ones.

Add `additionalEnv` helm settings to the proxy and controller manifests
alongside the existing `experimentalEnv` ones.
@alpeb alpeb requested a review from a team as a code owner February 14, 2024 21:45
Copy link
Member

@olix0r olix0r left a comment

Choose a reason for hiding this comment

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

non-blocking suggestions

Comment on lines +211 to +219
{{- if or (.Values.destinationController).additionalEnv (.Values.destinationController).experimentalEnv }}
env:
{{- with (.Values.destinationController).additionalEnv }}
{{- toYaml . | nindent 8 -}}
{{- end }}
{{- with (.Values.destinationController).experimentalEnv }}
{{- toYaml . | nindent 8 -}}
{{- end }}
{{- end }}
Copy link
Member

Choose a reason for hiding this comment

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

tioli, I think we could minimize this with something like

        {{- with .Values.destinationController | concat .experimentalEnv .additionalEnv }}

I haven't tested this specific syntax but the general idea should avoid duplication. Here and throughout. Furthermore, we could consider using a partial here to reduce boilerplate

Copy link
Member Author

Choose a reason for hiding this comment

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

It appears with cannot be used in a pipe. So we have to replicate .Values.destinationController on the right. And concat will error if one of its args is nil, so we have to pipe to default list "" both vars. So the one liner ends up being not pretty.

@alpeb alpeb merged commit 9ac1caa into main Feb 15, 2024
36 checks passed
@alpeb alpeb deleted the alpeb/additional-env-vars branch February 15, 2024 19:26
UsingCoding added a commit to ispringtech/linkerd2 that referenced this pull request Mar 28, 2024
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.

None yet

3 participants