helm
helm copied to clipboard
Refactor template and fix some bugs
trafficstars
What this PR does / why we need it:
fixes #11550 conveniently: fixes #11321 fixes #11481
Special notes for your reviewer: what did I do?
- refactor
helm templaterelated code in template.go - remove
--output-dirrelated code in methodrenderResourcesand move--output-dirrelated test case totemplate_test.go. - remove useless parameters and mark them deprecated in
Install. - do
--show-onlyfile filter for crds and hooks. - fix bugs mentioned by issues.
- fix incorrect test case add more test case about
helm template. - fix if we set
OutputDirIncludeCRDsin install action when using SDK, it will miss manifest or add redundancy CRDs in the generated release.
If applicable: - [x] this PR contains unit tests
- [x] this PR has been tested for backwards compatibility
@joejulian looks like a valuable PR. I think we can discuss it at the meeting.
I have opened this PR & issue for three months, Although I will merge the code every time the main branch is updated, with more and more conflicts, I can no longer maintain it (It is unlikely to be merged too). I will close it.
BTW:methodrenderResources have ten parameters now.
https://github.com/helm/helm/blob/5abcf74227bfe8e5a3dbf105fe62e7b12deb58d2/pkg/action/action.go#L106