Skip to content

feat: support tempalte parameterization for helm#8911

Merged
ericzzzzzzz merged 1 commit intoGoogleContainerTools:mainfrom
ericzzzzzzz:helm-comments-paramerization
Jun 26, 2023
Merged

feat: support tempalte parameterization for helm#8911
ericzzzzzzz merged 1 commit intoGoogleContainerTools:mainfrom
ericzzzzzzz:helm-comments-paramerization

Conversation

@ericzzzzzzz
Copy link
Copy Markdown
Contributor

@ericzzzzzzz ericzzzzzzz commented Jun 23, 2023

Fixes: #8912

Description

  • support comment-style template parameterization for helm
  • The new # from-param will take effect on helm rendered manifests result, if # from-param value is provided, and that means it will override original helm native templated value provided though value file. If not value is not provide, the helm render behaves as the same as no # from-param added in templated files.

@codecov
Copy link
Copy Markdown

codecov bot commented Jun 23, 2023

Codecov Report

Merging #8911 (b83cfce) into main (290280e) will decrease coverage by 6.65%.
The diff coverage is 48.91%.

@@            Coverage Diff             @@
##             main    #8911      +/-   ##
==========================================
- Coverage   70.48%   63.84%   -6.65%     
==========================================
  Files         515      624     +109     
  Lines       23150    31815    +8665     
==========================================
+ Hits        16317    20311    +3994     
- Misses       5776     9976    +4200     
- Partials     1057     1528     +471     
Impacted Files Coverage Δ
cmd/skaffold/app/cmd/completion.go 13.04% <0.00%> (-1.25%) ⬇️
cmd/skaffold/app/cmd/config/list.go 65.21% <ø> (ø)
cmd/skaffold/app/cmd/config/set.go 88.72% <ø> (ø)
cmd/skaffold/app/cmd/config/util.go 54.28% <ø> (ø)
cmd/skaffold/app/cmd/credits.go 100.00% <ø> (ø)
cmd/skaffold/app/cmd/credits/export.go 0.00% <0.00%> (ø)
cmd/skaffold/app/cmd/deploy.go 40.90% <0.00%> (-12.94%) ⬇️
cmd/skaffold/app/cmd/generate_pipeline.go 60.00% <ø> (ø)
cmd/skaffold/app/cmd/inspect_modules.go 65.00% <ø> (ø)
cmd/skaffold/app/cmd/inspect_profiles.go 66.66% <ø> (ø)
... and 40 more

... and 415 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@ericzzzzzzz ericzzzzzzz marked this pull request as ready for review June 26, 2023 14:38
@ericzzzzzzz
Copy link
Copy Markdown
Contributor Author

kokoro ci is broken, not related to changes.

@ericzzzzzzz ericzzzzzzz merged commit e4e28ba into GoogleContainerTools:main Jun 26, 2023
@adriantr
Copy link
Copy Markdown

adriantr commented Jan 5, 2024

@ericzzzzzzz can you confirm that this should work with skaffold render --set <param>=<value> with the latest skaffold version?

I'm having troubles with getting it to work:

- name: 'ADRIAN_TEST'
  value: {{ .Values.backendTimeout | quote }} # from-param: ${adrian}

still ends up with templated value from .Values instead of the one passed through --set

@ericzzzzzzz
Copy link
Copy Markdown
Contributor Author

hi @adriantr

To use template parameterization for helm

  • the render command must be passed with --build-artifacts flag to provide build results for post render stage, as the replacement happens on helm post render stage and if no build artifacts are provided the stage won't happen.
  • in skaffold config, manifests stanza must be used for helm instead of relying on skaffold to populate information under deploy sanza to manifests stanza -- The population is a historial problem.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

support parameterization with comments for helm

3 participants