Skip to content

incorrect arg parsing with helm plugins #13686

@jkroepke

Description

@jkroepke

Hi,

a user of the helm-secrets plugin reports an issue with --kube-insecure-skip-tls-verify since helm 3.16.

jkroepke/helm-secrets#492

It turn out that this boolean flag was ignored before (#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 to indicate the issue:

# 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugCategorizes issue or PR as related to a bug.help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions