roboll / helmfile

Deploy Kubernetes Helm Charts
MIT License
4.05k stars 565 forks source link

Release namespace in conjunction with labels selector #2087

Open gakesson opened 2 years ago

gakesson commented 2 years ago

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 commented 2 years ago

@mumoshu any thoughts on this?

NHLJang commented 1 month ago

@gakesson I think you should raise the ticket again in new repo. This repository is not active anymore.