Skip to content

Commit

Permalink
Don't take Helm's default namespace into account
Browse files Browse the repository at this point in the history
  • Loading branch information
undera committed Nov 6, 2022
1 parent 9a144c1 commit 15ce917
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
7 changes: 6 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 3 additions & 1 deletion pkg/dashboard/static/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ $(function () {
reportError("Failed to get tool version", xhr)
}).done(function (data) {
fillToolVersion(data)
$("#limitNamespace").show().find("span").text(data.LimitedToNamespace)
if (data.LimitedToNamespace) {
$("#limitNamespace").show().find("span").text(data.LimitedToNamespace)
}
})
})

Expand Down
2 changes: 1 addition & 1 deletion plugin.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: "dashboard"
version: "0.2.5"
version: "0.2.6"
usage: "A simplified way of working with Helm"
description: "View HELM situation in nice web UI"
command: "$HELM_PLUGIN_DIR/bin/helm-dashboard"
Expand Down

0 comments on commit 15ce917

Please sign in to comment.