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

helm: Add support for passing env variables to flyteadmin using envFrom #5216

Merged
merged 5 commits into from
Nov 26, 2024

Conversation

ctso
Copy link
Contributor

@ctso ctso commented Apr 10, 2024

Tracking issue

Related to #3970

Why are the changes needed?

Users may want to pass environment variables from Secrets or ConfigMaps instead of relying on the Helm chart's flyteadmin.secrets Helm value. This is convenient when using a secrets manager such as External Secrets, for example.

What changes were proposed in this pull request?

Add a new Helm value, flyteadmin.envFrom which you can pass through directly to the underlying Deployment.

How was this patch tested?

Tested locally using helm template, it works.

Setup process

Screenshots

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Related PRs

Docs link

Copy link

welcome bot commented Apr 10, 2024

Thank you for opening this pull request! 🙌

These tips will help get your PR across the finish line:

  • Most of the repos have a PR template; if not, fill it out to the best of your knowledge.
  • Sign off your commits (Reference: DCO Guide).

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. documentation Improvements or additions to documentation enhancement New feature or request labels Apr 10, 2024
@ctso ctso force-pushed the ctso/flyte-core-chart-envfrom branch from 1cd6313 to 9ff19da Compare April 10, 2024 22:56
charts/flyte-core/templates/admin/deployment.yaml Outdated Show resolved Hide resolved
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Apr 11, 2024
Signed-off-by: Chris Soyars <[email protected]>
@ctso ctso force-pushed the ctso/flyte-core-chart-envfrom branch from fae3f59 to acf00e7 Compare April 11, 2024 15:34
@wild-endeavor
Copy link
Contributor

Should we match

?

pingsutw
pingsutw previously approved these changes Apr 11, 2024
@wild-endeavor
Copy link
Contributor

@ctso I think it would feel nicer if at least the value var names matched between single binary and flyte-core. yah?

@davidmirror-ops
Copy link
Contributor

@ctso what are we missing to ship this? There are users dealing with limitations where this feature would be helpful

@ctso
Copy link
Contributor Author

ctso commented Sep 13, 2024

I think this could be merged as-is, though it sounds like maybe we want to update the single binary chart to have the same behavior as well?

@davidmirror-ops
Copy link
Contributor

@wild-endeavor not sure I follow, what you mean is matching in flyte-core the way this section enables envVars from different sources?

envFrom:
{{- if .Values.deployment.extraEnvVarsConfigMap }}
- configMapRef:
name: {{ .Values.deployment.extraEnvVarsConfigMap }}
{{- end }}
{{- if .Values.deployment.extraEnvVarsSecret }}
- secretRef:
name: {{ .Values.deployment.extraEnvVarsSecret }}
{{- end }}

@ctso ctso dismissed stale reviews from pingsutw and pmahindrakar-oss via 1864968 November 26, 2024 17:15
Copy link

codecov bot commented Nov 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 37.03%. Comparing base (121665d) to head (21c9740).
Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5216   +/-   ##
=======================================
  Coverage   37.03%   37.03%           
=======================================
  Files        1318     1318           
  Lines      132267   132267           
=======================================
+ Hits        48980    48986    +6     
+ Misses      79028    79022    -6     
  Partials     4259     4259           
Flag Coverage Δ
unittests-datacatalog 51.58% <ø> (ø)
unittests-flyteadmin 54.10% <ø> (+0.02%) ⬆️
unittests-flytecopilot 22.23% <ø> (ø)
unittests-flytectl 62.29% <ø> (ø)
unittests-flyteidl 7.23% <ø> (ø)
unittests-flyteplugins 53.73% <ø> (ø)
unittests-flytepropeller 42.63% <ø> (ø)
unittests-flytestdlib 57.59% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@davidmirror-ops davidmirror-ops merged commit c150150 into flyteorg:master Nov 26, 2024
57 checks passed
Copy link

welcome bot commented Nov 26, 2024

Congrats on merging your first pull request! 🎉

@davidmirror-ops davidmirror-ops added the added Merged changes that add new functionality label Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
added Merged changes that add new functionality documentation Improvements or additions to documentation enhancement New feature or request lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants