We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ea53d5c commit 342abf7Copy full SHA for 342abf7
main.go
@@ -75,6 +75,13 @@ func main() {
75
76
ctrl.SetLogger(zap.New(zap.UseFlagOptions(&opts)))
77
78
+ var namespaces map[string]cache.Config
79
+ if namespace != "" {
80
+ namespaces = map[string]cache.Config{
81
+ namespace: {},
82
+ }
83
84
+
85
mgr, err := manager.New(ctrl.GetConfigOrDie(), manager.Options{
86
Scheme: scheme,
87
Metrics: metricsserver.Options{
@@ -87,9 +94,7 @@ func main() {
94
LeaderElection: enableLeaderElection,
88
95
LeaderElectionID: "4012c7fa.cluster.x-k8s.io",
89
96
Cache: cache.Options{
90
- DefaultNamespaces: map[string]cache.Config{
91
- namespace: {},
92
- },
97
+ DefaultNamespaces: namespaces,
93
98
},
99
})
100
if err != nil {
0 commit comments