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 { 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) args, err := flags.Parse(&opts)
if err != nil { if err != nil {
if e, ok := err.(*flags.Error); ok { if e, ok := err.(*flags.Error); ok {

View File

@@ -29,7 +29,9 @@ $(function () {
reportError("Failed to get tool version", xhr) reportError("Failed to get tool version", xhr)
}).done(function (data) { }).done(function (data) {
fillToolVersion(data) fillToolVersion(data)
if (data.LimitedToNamespace) {
$("#limitNamespace").show().find("span").text(data.LimitedToNamespace) $("#limitNamespace").show().find("span").text(data.LimitedToNamespace)
}
}) })
}) })

View File

@@ -1,5 +1,5 @@
name: "dashboard" name: "dashboard"
version: "0.2.5" version: "0.2.6"
usage: "A simplified way of working with Helm" usage: "A simplified way of working with Helm"
description: "View HELM situation in nice web UI" description: "View HELM situation in nice web UI"
command: "$HELM_PLUGIN_DIR/bin/helm-dashboard" command: "$HELM_PLUGIN_DIR/bin/helm-dashboard"