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

Add flag --enable-helm #3784

Merged
merged 1 commit into from
Apr 12, 2021
Merged

Conversation

monopole
Copy link
Contributor

@monopole monopole commented Apr 8, 2021

This PR adds two command line flags to kustomize build

--enable-helm
--helm-command /path/to/helm

and changes behavior accordingly.

Please read examples/chart.md in this PR.

That file has been activated as an end-to-end test.
The helm plugin tests have also been activated.

Flags

Kustomize won't spawn a helm subprocess unless --enable-helm is
specified.

The helm command defaults to simply helm, and it must be on the
user's PATH. To override this requires use of the --helm-command flag.
This is a command line parameter rather than a config parameter to
mitigate config download risks.

Fields

The existing kustomization field HelmChartInflationGenerator is still
mostly honored, but now deprecated.

It's replaced by two new fields, explained in detail in this PR's helmchartargs.go file.
The fields have been split into two groups, HelmCharts and
HelmGlobals, with the former containing chart specific info, and the
latter containing general helm options.

The HelmBin, ExtraArgs from the HelmChartInflationGenerator field
are ignored because they represent a security risk which bears further examination.
The purpose served by HelmBin is now served by the --helm-command flag.

Also, the ReleaseNamespace field is ignored, as it doesn't work in
helm's template mode, and kustomize has it's own way of specifying
namespace.

ALLOW_MODULE_SPAN

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: monopole

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 approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Apr 8, 2021
@monopole monopole requested review from natasha41575 and removed request for mengqiy April 8, 2021 04:34
@monopole
Copy link
Contributor Author

monopole commented Apr 8, 2021

/test kustomize-presubmit-master

@monopole monopole force-pushed the flagEnableHelm branch 3 times, most recently from 2bb7584 to cebda71 Compare April 8, 2021 19:59
@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 Apr 8, 2021
@monopole monopole changed the title Add flag --enable-helm WIP Add flag --enable-helm Apr 9, 2021
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 9, 2021
@monopole monopole force-pushed the flagEnableHelm branch 13 times, most recently from c2f8b35 to 76faa15 Compare April 11, 2021 00:53
@monopole monopole requested review from KnVerey and removed request for natasha41575 April 12, 2021 02:46
@monopole monopole changed the title WIP Add flag --enable-helm Add flag --enable-helm Apr 12, 2021
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 12, 2021
@monopole
Copy link
Contributor Author

/retest

@monopole monopole force-pushed the flagEnableHelm branch 4 times, most recently from 8feb8e8 to f2d1679 Compare April 12, 2021 18:19
@monopole monopole force-pushed the flagEnableHelm branch 2 times, most recently from 828cd18 to 4add711 Compare April 12, 2021 20:39
@Shell32-Natsu
Copy link
Contributor

/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. 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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants