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

feat: add template support for chartPath #8645

Conversation

aniskhan001
Copy link
Contributor

Fixes: #8626

Description
The skaffold render command doesn't support templating on chartPath field at the moment.
This PR attempts to enable templating on chartPath field.

I have added a basic unit test, please review it and let me know if I need to add/adjust something there.

User facing changes
We would get the following error when there is a template/environment variable

std out err: %!(EXTRA *errors.errorString=Error: repo kubernetes not found
exit status 1
)

With this PR, template/environment variables should render successfully.

@codecov
Copy link

codecov bot commented Apr 7, 2023

Codecov Report

Merging #8645 (0af4ac7) into main (290280e) will decrease coverage by 6.33%.
The diff coverage is 54.47%.

@@            Coverage Diff             @@
##             main    #8645      +/-   ##
==========================================
- Coverage   70.48%   64.15%   -6.33%     
==========================================
  Files         515      615     +100     
  Lines       23150    30796    +7646     
==========================================
+ Hits        16317    19758    +3441     
- Misses       5776     9556    +3780     
- Partials     1057     1482     +425     
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 39 more

... and 395 files with indirect coverage changes

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

Copy link
Contributor

@aaron-prindle aaron-prindle left a comment

Choose a reason for hiding this comment

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

@aniskhan001 thanks for the PR here! LGTM

I will update the page here:
https://skaffold.dev/docs/environment/templating/

as well to include this information in a separate PR. Thanks again!

@aaron-prindle aaron-prindle merged commit 4c73c82 into GoogleContainerTools:main Apr 10, 2023
14 checks passed
@aniskhan001 aniskhan001 deleted the 8626-add-chartpath-templating branch April 11, 2023 16:09
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 templating in the chartPath field
2 participants