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

helm list -n <namespace> doesn't give accurate output

Open kaajrot opened this issue 2 years ago • 4 comments

Describe the bug a clear and concise description of what the bug is.

We use the spec targetNamespace for some of our helm releases to install them in a particular namespace. but the release shows up when we query kube-infrastructure namespace.

ex- helm list -n kube-infrastructure should list only the releases installed under namespace kube-infrastructure. But we get some that are installed in different namespaces.

What's your helm version?

version.BuildInfo{Version:"v3.9.0", GitCommit:"7ceeda6c585217a19a1131663d8cd1f7d641b2a7", GitTreeState:"clean", GoVersion:"go1.18.2"}

What's your kubectl version?

Client Version: version.Info{Major:"1", Minor:"24", GitVersion:"v1.24.2", GitCommit:"f66044f4361b9f1f96f0053dd46cb7dce5e990a8", GitTreeState:"clean", BuildDate:"2022-06-15T14:14:10Z", GoVersion:"go1.18.3", Compiler:"gc", Platform:"darwin/amd64"}

What's the chart version?

flux2-0.20.0

What happened?

helm list -n kube-infrastructure list helmreleases that are not installed in kube-infrastructure namespace.

What you expected to happen?

helm list -n kube-infrastructure should list only helmreleases that are installed in kube-infrastructure namespace.

Enter the command that you execute and failing/misfunctioning.

helm list -n kube-infrastructure

kaajrot avatar Jul 03 '22 13:07 kaajrot

Hello @stefanprodan, could you tag the other developers so that we could get some assistance here?

kaajrot avatar Jul 12 '22 07:07 kaajrot

What is the storageNamespace and targetNamespace you have configured on the said release?

hiddeco avatar Jul 12 '22 10:07 hiddeco

We do not have storageNamespace configured for our release.

example:

metadata:
  name: rasa-x
  namespace: kube-infrastructure
spec:
  targetNamespace: mal-development

kaajrot avatar Jul 14 '22 19:07 kaajrot

You need to set the storageNamespace to the same value as targetNamespace for Helm CLI to work, the Helm CLI is not as flexible as Flux and expects the storage and the release to be in the same namespace.

stefanprodan avatar Jul 15 '22 09:07 stefanprodan