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

Plugin shadows --version option of helm install and helm template #5

Open
jarhill0 opened this issue Jun 26, 2020 · 0 comments
Open

Comments

@jarhill0
Copy link

Both helm install and helm template support a --version option used to specify the version of a chart to install:

--version string             specify the exact chart version to install. If this is not specified, the latest version is installed

Unfortunately the current version of this package intercepts the --version argument and passes it to kubeval, which makes it impossible to give this argument to helm template:

case "$1" in
--version|--help)
$HELM_PLUGIN_DIR/bin/kubeval $1
exit
;;

It would be great if there were a way to pass the --version argument to helm. I think the best way to achieve this would be by supporting the "end of options" flag, which is --. Using the -- sends all arguments after it to helm without intercepting any of them.

I imagine the usage would look like:

helm kubeval myChart -- --version 1.0

This would pass the --version 1.0 argument to helm, rather than printing the kubeval version.

The current version of run.sh nearly supports this. It has an eoo variable which it checks (complete with an appropriate else case), but it never actually checks for -- or sets eoo to 1.

jarhill0 added a commit to jarhill0/helm-kubeval that referenced this issue Jun 26, 2020
All parameters after the -- flag will be passed directly to helm.

Fixes instrumenta#5
jarhill0 added a commit to jarhill0/helm-kubeval that referenced this issue Jun 27, 2020
All parameters after the -- flag will be passed directly to helm.

Fixes instrumenta#5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant