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

Helm 3 changed release name parameter of helm template #6019

Closed
AndiDog opened this issue Jul 12, 2019 · 4 comments
Closed

Helm 3 changed release name parameter of helm template #6019

AndiDog opened this issue Jul 12, 2019 · 4 comments

Comments

@AndiDog
Copy link
Contributor

AndiDog commented Jul 12, 2019

Helm 2:

helm template [flags] CHART

Helm v3.0.0-alpha.1:

helm template [NAME] [CHART] [flags]

This makes usage incompatible:

$ helm template --name my-release-name path/to/chart
Error: unknown flag: --name

and having two positional (= unnamed) arguments is not a good idea in general since the order can be mistaken. I recommend reintroducing {-n,--name}.

@karuppiah7890
Copy link
Contributor

karuppiah7890 commented Jul 12, 2019

@AndiDog First off, I think it's pretty fine for it to be incompatible considering the version change is a major version change v2 -> v3

About the order being mistaken, for me it doesn't sound like a solid reason. And even if it's considered as a solid reason, there will be some set of people saying otherwise - to use arguments instead of flags. The helm maintainers cannot satisfy everyone with both the features. I think users need to understand their opinions.

Apart from this, some things to notice or think about:

  1. Consider the upgrade sub command which has release name as an argument in both v2 and v3. I think it's great to keep both template, install and upgrade sub command consistent.

  2. In v2, helm template and install have release name as an optional flag and if it's not specified, it uses a generated name. I wasn't comfortable with this when doing production deployments and for install, from what I know, release names cannot be renamed which makes the situation a hassle. In v3, this cannot happen as in v3, release name is a required argument, and if you want generated name, you specify a flag for it and then you can omit the release name.

  3. Many tools take up "main input" as arguments (required/optional) and take flags as input for modifying behavior. Check rg, fd tools for examples. I think "main input" is a very relative word. Of course it's up to the tool's builder to choose what's best for their tool, users and the UX

And for me personally, it felt weird to have the release name as a flag rather than an argument.

@bacongobbler
Copy link
Member

The release name was made mandatory as part of Helm 3. Helm will not auto-generate a name for you unless you use the --generate-name flag.

So, to replicate the same behaviour, use helm template --generate-name ....

@ronenmagid
Copy link

--generate-name doesn't work even for helm 3. I've spent 2 hours trying to install a package. Still can't do it. I've never seen such a poorly executed CLI tool in my life. It was written by a sadist.

@hickeyma
Copy link
Contributor

@ronenmagid You could use the --help flag with the command you want to use. The docs could help you as well: https://helm.sh/docs/intro/using_helm/#helm-install-installing-a-package

There is also a section on changes from Helm 2: https://helm.sh/docs/faq/#changes-since-helm-2

If you any ideas for improving this then raise an issue with your suggestions. You can work on the PR as well if you like.

Hope this helps.

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

5 participants