gimlet-io / capacitor

A general purpose UI for FluxCD.
Apache License 2.0
565 stars 18 forks source link

BUG: Releases in non-default namespaces not always visible #72

Closed jborg closed 6 months ago

jborg commented 6 months ago

I noticed that some but not all pods from releases installed in a namespace other than "default" do not show up in Capacitor.

It turns out that if a release is installed a non-default namespace Capacitor would incorrectly detect the corresponding artifacts as belonging to the "default" namespace unless the chart templates explicitly set the "metadata.namespace" attribtue even though that is not required.

Installing the "podinfo" chart in a non-default namespace is a good way to reproduce this.

laszlocph commented 6 months ago

I was able to reproduce this issue. Seems like the Helm client sets the namespace to the namespace that is set in kubecontext. This has tricked me many times before, not sure why it works like that.

But, your code, your repro case everything was amazing. Thank you so much for taking the time.

Merging.