Skip to content

Commit

Permalink
[INTERNAL] Get watched namespaces from env variable (#75)
Browse files Browse the repository at this point in the history
(cherry picked from commit de6500b)
  • Loading branch information
dobrerazvan authored and aguzovatii committed Jun 3, 2024
1 parent 254cc1c commit 7f2632a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,12 @@ func main() {
watchedNamespaces := make(map[string]cache.Config)
if namespaces != "" {
namespaceList = strings.Split(namespaces, ",")
for i := range namespaceList {
watchedNamespaces[strings.TrimSpace(namespaceList[i])] = cache.Config{}
}
} else {
namespaces = os.Getenv("WATCH_NAMESPACE")
namespaceList = strings.Split(namespaces, ",")
}
for i := range namespaceList {
watchedNamespaces[strings.TrimSpace(namespaceList[i])] = cache.Config{}
}

// hash the watched namespaces to allow for more than one operator deployment per namespace
Expand Down

0 comments on commit 7f2632a

Please sign in to comment.