Skip to content

Commit

Permalink
fix prometheus graphs and the pod namespace env var (#2059)
Browse files Browse the repository at this point in the history
  • Loading branch information
sgalsaleh committed Aug 6, 2021
1 parent 584f7cd commit 81c9b49
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pkg/util/namespace.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package util

import "os"

var (
PodNamespace string
KotsadmNamespace string
PodNamespace string = os.Getenv("POD_NAMESPACE")
KotsadmNamespace string = os.Getenv("KOTSADM_TARGET_NAMESPACE")
)

func AppNamespace() string {
if KotsadmNamespace == "" {
if KotsadmNamespace != "" {
return KotsadmNamespace
}

Expand Down

0 comments on commit 81c9b49

Please sign in to comment.