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

support for more helm template args #4926

Merged
merged 7 commits into from
Feb 1, 2023

Conversation

natasha41575
Copy link
Contributor

@natasha41575 natasha41575 commented Dec 12, 2022

Fix #4219
Fix #3816
Fix #3831
Fix #4914

And a few other args for helm template. I added an krusty test for the multiple values files as that one is the more complicated bit, and a unit test for the rest to ensure that the flags are getting added to the helm template invocation correctly.

As a note, I have already made a lot of these changes to the kpt render-helm-chart KRM function which forks off the kustomize plugin, so we can think of this PR as finally pushing those changes upstream.

@natasha41575 natasha41575 added this to the v5.0.0 milestone Dec 12, 2022
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Dec 12, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: natasha41575

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Dec 12, 2022
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 12, 2022
@natasha41575 natasha41575 force-pushed the helmSupport branch 2 times, most recently from f19e212 to dfc606a Compare December 12, 2022 19:43
@natasha41575
Copy link
Contributor Author

/test kustomize-presubmit-master

@k8s-ci-robot
Copy link
Contributor

@natasha41575: This PR has multiple commits, and the default merge method is: merge.
You can request commits to be squashed using the label: tide/merge-method-squash

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@natasha41575 natasha41575 added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Dec 12, 2022
@natasha41575 natasha41575 force-pushed the helmSupport branch 3 times, most recently from 9804a00 to 5a399b3 Compare December 12, 2022 22:34
api/types/helmchartargs.go Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 14, 2023
@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 23, 2023
Copy link
Contributor

@yuwenma yuwenma left a comment

Choose a reason for hiding this comment

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

Do you want to add the charts example to api/krusty/charts dir?

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jan 31, 2023
api/types/helmchartargs_test.go Outdated Show resolved Hide resolved
api/types/helmchartargs.go Outdated Show resolved Hide resolved
api/types/helmchartargs.go Show resolved Hide resolved
api/krusty/helmchartinflationgenerator_test.go Outdated Show resolved Hide resolved
fs := th.GetFSys()
require.NoError(t, fs.MkdirAll(filepath.Join(thDir, "templates")))

copyFileIntoHarness(th, filepath.Join(chartDir, "Chart.yaml"), filepath.Join(thDir, "Chart.yaml"))
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this series essentially copying the full the directory contents, or are we avoiding some files? Fwiw I see kyaml has a CopyDir.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks! I wasn't aware of the CopyDir in kyaml. I changed CopyDir to accept an fSys argument and used it. (I also updated localize to use kyaml.CopyDir instead of writing its own)

Edit: Looks like localize has some other assumptions that it makes actually, so I'm going to leave that alone

Copy link
Contributor

Choose a reason for hiding this comment

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

I didn't know about it either fwiw... I just guessed that it might exist (we do so much FS manipulation!), searched for it and got lucky. 😄

@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 1, 2023
@natasha41575 natasha41575 force-pushed the helmSupport branch 3 times, most recently from d2b2027 to 8527545 Compare February 1, 2023 17:42
@KnVerey
Copy link
Contributor

KnVerey commented Feb 1, 2023

/lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/helm cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
None yet
5 participants