helmfile icon indicating copy to clipboard operation
helmfile copied to clipboard

Release namespace in conjunction with labels selector

Open gakesson opened this issue 3 years ago • 2 comments

I came across an odd behavior with respect to supplied namespaces in conjunction with labels selectors. Assume this helmfile.yaml

repositories:
- name: incubator
  url: https://charts.helm.sh/incubator
---
releases:

- name: a-release
  chart: incubator/raw
  namespace: EXPECTED-namespace
  labels:
    app: raw

Then supplying the namespace through -n yields below output:

$ helmfile -n UNEXPECTED-namespace list

NAME     	NAMESPACE         	ENABLED	LABELS 	CHART        	VERSION
a-release	EXPECTED-namespace	true   	app:raw	incubator/raw	

However, behavior is changed when using above command but also including a label selector:

$ helmfile -n UNEXPECTED-namespace -l app=raw list

NAME     	NAMESPACE           	ENABLED	LABELS                                                         	CHART        	VERSION
a-release	UNEXPECTED-namespace	true   	app:raw,chart:raw,name:a-release,namespace:UNEXPECTED-namespace	incubator/raw	

Expectation is that the release's namespace is not changed due to command being used with a label selector or not. Thoughts?

gakesson avatar Feb 17 '22 16:02 gakesson

@mumoshu any thoughts on this?

gakesson avatar Apr 11 '22 11:04 gakesson