-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Support templated release names in helm render #5751
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5751 +/- ##
=======================================
Coverage 70.87% 70.87%
=======================================
Files 421 421
Lines 16087 16090 +3
=======================================
+ Hits 11401 11404 +3
Misses 3850 3850
Partials 836 836
Continue to review full report at Codecov.
|
@@ -256,9 +256,13 @@ func (h *Deployer) Render(ctx context.Context, out io.Writer, builds []graph.Art | |||
renderedManifests := new(bytes.Buffer) | |||
|
|||
for _, r := range h.Releases { | |||
args := []string{"template", chartSource(r)} | |||
releaseName, err := util.ExpandEnvTemplateOrFail(r.Name, nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is releaseName
the only field that needs this change?
Wasn't sure if these fields referenced in our-docs/the-bug might need changes as well:
deploy.helm.releases.setValueTemplates
deploy.helm.releases.name
deploy.helm.releases.namespace
If so, perhaps we can add some Github Issues regarding the other required fixes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is an excellent question — I looked for other uses of r.Name
, but should have checked the others.
- releases.namespace is expanded in
releaseNamespace()
- setValueTemplates is expanded in
constructOverrideArgs()
So I think we're good.
LGTM |
Side note: |
|
Fixes: #5671
Description
This PR causes the Helm deployer's
Render()
needs to expand the release name. It cleans up the unusedenvs
field in the tests.User facing changes (remove if N/A)
render
for Helm now supports templated release names