Don't take Helm's default namespace into account

This commit is contained in:
Andrei Pohilko
2022-11-06 16:40:53 +00:00
parent 9a144c1c6f
commit 15ce9170f3
3 changed files with 10 additions and 3 deletions

View File

@@ -53,7 +53,12 @@ func main() {
}
func parseFlags() options {
opts := options{Namespace: os.Getenv("HELM_NAMESPACE")}
ns := os.Getenv("HELM_NAMESPACE")
if ns == "default" {
ns = ""
}
opts := options{Namespace: ns}
args, err := flags.Parse(&opts)
if err != nil {
if e, ok := err.(*flags.Error); ok {