We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d2bdde9 commit c2a01d1Copy full SHA for c2a01d1
main.go
@@ -148,10 +148,15 @@ func setupManager(
148
149
// limit Manager to cerberus namespace
150
NewCache: func(config *rest.Config, opts controllercache.Options) (controllercache.Cache, error) {
151
+ operatorNamespace := os.Getenv("OPERATOR_NAMESPACE")
152
+ if operatorNamespace == "" {
153
+ operatorNamespace = "cerberus-operator-system"
154
+ }
155
+
156
opts.ByObject = make(map[client.Object]controllercache.ByObject)
157
opts.ByObject[&v1.Secret{}] = controllercache.ByObject{
158
Namespaces: map[string]controllercache.Config{
- "cerberus-operator-system": {},
159
+ operatorNamespace: {},
160
},
161
}
162
0 commit comments