incorrect arg parsing with helm plugins
- Dominant language
- Go
- Stars
- 30.2k
- Forks
- 7.8k
- Avg merge
- 20h 58m
- Merged PRs (30d)
- 36
Description
Hi,
a user of the helm-secrets plugin reports an issue with `--kube-insecure-skip-tls-verify` since helm 3.16.
https://github.com/jkroepke/helm-secrets/issues/492
It turn out that this boolean flag was ignored before (https://github.com/helm/helm/pull/12856). I expect that the internal behavior was broken before.
From my point of view, if `--kube-insecure-skip-tls-verify` is set, the value after the flag is parsed wrongly and lead to unexpected behavior.
Here is a [simple plugin](https://github.com/jkroepke/helm-arg-demo-plugin/blob/main/plugin.yaml) to indicate the issue:
```shell
# helm plugin install https://github.com/jkroepke/helm-arg-demo-plugin
Installed plugin: arg-demo
# helm arg-demo
Hello World
# helm arg-demo --kube-insecure-skip-tls-verify
Hello World
# helm arg-demo --kube-insecure-skip-tls-verify --version 1.0.3
Error: unknown flag: --version
# helm --debug arg-demo --kube-insecure-skip-tls-verify=true --version 1.0.3
Hello World --version 1.0.3
# helm --debug arg-demo --kube-insecure-skip-tls-verify true --version 1.0.3
Hello World --version 1.0.3
```
A workaround exists: A explicit boolean value must be set after the flag.
Contributor guide
Assessment
This issue has not been assessed yet.