Skip to content

Commit

Permalink
Update code snippets (#6796) (#6839)
Browse files Browse the repository at this point in the history
Signed-off-by: kevalsabhani <[email protected]>
  • Loading branch information
kevalsabhani authored Oct 15, 2024
1 parent 9e633b0 commit 11ff3c8
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,9 @@ mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{
Port: 9443,
LeaderElection: enableLeaderElection,
LeaderElectionID: "f1c5ece8.example.com",
Namespace: watchNamespace, // namespaced-scope when the value is not an empty string
Cache: cache.Options{
DefaultNamespaces: map[string]cache.Config{watchNamespace: cache.Config{}},
},
})
...
```
Expand Down Expand Up @@ -246,7 +248,9 @@ options := ctrl.Options{
Port: 9443,
LeaderElection: enableLeaderElection,
LeaderElectionID: "f1c5ece8.example.com",
Namespace: watchNamespace, // namespaced-scope when the value is not an empty string
Cache: cache.Options{
DefaultNamespaces: map[string]cache.Config{watchNamespace: cache.Config{}},
},
}
// Add support for MultiNamespace set in WATCH_NAMESPACE (e.g ns1,ns2)
Expand Down

0 comments on commit 11ff3c8

Please sign in to comment.