postfinance / kubenurse

Kubernetes network monitoring
MIT License
407 stars 39 forks source link

fix(helm): chart should respect `-n <namespace>` flag #53

Closed zbindenren closed 1 year ago

zbindenren commented 1 year ago

Namespace should be configured via -n helm flag.

I kept the namespace value in values.yaml for backward compatibility reasons. But it would probably be better to set as

namespace: ""

Then, per default, the Releases.Namespace value is taken and you still can overwrite it in values.yaml.

Currently, if someone wants to install the helm chart, it gets installed in kube-system namespace. Even if you specify -n other-namespace . You have to actively set namespace: "" in values.yaml to make it installable in a different namespace via helm flags.

@djboris9 let me know what you think.

Edit:

Best practices is discussed here. I get the feeling that namespace: {{ .Releases.Namespace }} would be best.

coveralls commented 1 year ago

Pull Request Test Coverage Report for Build 3320802895


Totals Coverage Status
Change from base Build 3318277956: 0.0%
Covered Lines: 428
Relevant Lines: 531

💛 - Coveralls
djboris9 commented 1 year ago

Nice solution @zbindenren :beers: