helm-secrets icon indicating copy to clipboard operation
helm-secrets copied to clipboard

helm secret "invalid option" issue with helm3

Open nomis-rzp opened this issue 4 years ago • 7 comments

With helm3 while running the helm secret ... command its giving the following error

Command: helm secrets install -n myrelease ./mychart-f ./mychart/secrets.yaml Error:

Error: unknown flag: --client
helm install: invalid option -- n
helm install: invalid option -- f
Error: plugin "secrets" exited with error

Output of helm version: version.BuildInfo{Version:"v3.0.0-beta.3", GitCommit:"5cb923eecbe80d1ad76399aee234717c11931d9a", GitTreeState:"clean", GoVersion:"go1.12.9"}

Could you please let me know if this is a known issue, or if I am missing anything here?

nomis-rzp avatar Sep 19 '19 09:09 nomis-rzp

helm v3 doesn't have --client flag, this it fails for you

try to clone the repo and remove --client --short in https://github.com/futuresimple/helm-secrets/blob/master/secrets.sh#L389

rimusz avatar Sep 19 '19 09:09 rimusz

It throws another error

helm install: invalid option -- n
Error: plugin "secrets" exited with error

nomis-rzp avatar Sep 19 '19 12:09 nomis-rzp

let's leave that to plugin maintainers to answer

rimusz avatar Sep 19 '19 13:09 rimusz

Patching secrets.sh to remove the --client parameter worked fine for me. Basically, Helm 3 doesn't have a server component so there's no need to specify that you need the client's version.

It throws another error

helm install: invalid option -- n Error: plugin "secrets" exited with error

I think the reason you are getting an error is because you are using the -n parameter to give the release a name. However, on Helm 3, this is no longer an option and is an argument that needs to be provided when calling helm install.

I would patch secrets.sh and try:

helm secrets install myrelease ./mychart -f ./mychart/secrets.yaml

etcinit avatar Oct 10 '19 07:10 etcinit

Helm v3.0.0 has been released! https://helm.sh/blog/helm-3-released/

Also the --client flag has been added for backwards-compatibility https://github.com/helm/helm/pull/6868

Does that change the status of this issue? Not able to test with helm secrets at the moment

scottrigby avatar Nov 13 '19 17:11 scottrigby

I am able to run helm secrets install release_name -f values.yaml -f secrets.yaml . with:

version.BuildInfo{Version:"v3.0.0", GitCommit:"e29ce2a54e96cd02ccfce88bee4f58bb6e2a28b6", GitTreeState:"clean", GoVersion:"go1.13.4"}

@nomis-rzp, I was having the same issue as you running Helm v3.0.0-beta.3, if you upgrade to v.3.0.0, it should work!

tblazina avatar Nov 29 '19 15:11 tblazina

I'm having issue with helm secrets using helm v3

version.BuildInfo{Version:"v3.0.0",GitCommit:"e29ce2a54e96cd02ccfce88bee4f58bb6e2a28b6", GitTreeState:"clean", GoVersion:"go1.13.4"}

this is the error:

Error: unable to build kubernetes objects from release manifest: error validating "": error validating data: [unknown object type "nil" in Secret.data.AWS_ACCESS_KEY_ID

Any idea? for helm v2 was working fine.

graidelak avatar May 08 '20 15:05 graidelak