Skip to content

Commit

Permalink
Changed variable name to watch namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
dhhuynh2 authored and milero committed Mar 23, 2022
1 parent 66bebfa commit 39f32a0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cmd/wordpress-operator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ func main() {
HealthProbeBindAddress: options.HealthProbeBindAddress,
}

if options.ScopedNamespace != "" {
opt.Namespace = options.ScopedNamespace
if options.WatchNamespace != "" {
opt.Namespace = options.WatchNamespace
}

// Create a new Cmd to provide shared dependencies and start components
Expand Down
3 changes: 2 additions & 1 deletion pkg/cmd/options/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ var (
// HealthProbeBindAddress is the TCP address that the controller should bind to for serving health probes.
HealthProbeBindAddress = ":8081"

ScopedNamespace = os.Getenv("SCOPED_NAMESPACE")
// WatchNamespace sets the Namespace field, which restricts the manager's cache to watch objects in the desired namespace.
WatchNamespace = os.Getenv("WATCH_NAMESPACE")
)

func namespace() string {
Expand Down

0 comments on commit 39f32a0

Please sign in to comment.