File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -187,10 +187,6 @@ func main() {
187187 },
188188 }
189189
190- if watchedNsCache := getDefaultWatchedNamespacesCacheOptions (); watchedNsCache != nil {
191- options .Cache .DefaultNamespaces = watchedNsCache
192- }
193-
194190 // Use transformers to strip data from Secrets and ConfigMaps
195191 // that are not tracked by the operator to reduce memory usage.
196192 if strings .ToLower (os .Getenv ("DISABLE_MEMORY_OPTIMIZATION" )) != "true" {
@@ -203,14 +199,18 @@ func main() {
203199 }
204200 }
205201
202+ if watchedNsCache := getDefaultWatchedNamespacesCacheOptions (); watchedNsCache != nil {
203+ options .Cache .DefaultNamespaces = watchedNsCache
204+ }
205+
206206 mgr , err := ctrl .NewManager (ctrl .GetConfigOrDie (), options )
207207 if err != nil {
208208 setupLog .Error (err , "unable to start manager" )
209209 os .Exit (1 )
210210 }
211211
212212 var client crclient.Client
213- if strings .ToLower (os .Getenv ("DISABLE_MEMORY_OPTIMIZATION" )) = = "true" {
213+ if strings .ToLower (os .Getenv ("DISABLE_MEMORY_OPTIMIZATION" )) ! = "true" {
214214 liveClient , err := crclient .New (ctrl .GetConfigOrDie (), crclient.Options {Scheme : mgr .GetScheme ()})
215215 if err != nil {
216216 setupLog .Error (err , "unable to create live client" )
You can’t perform that action at this time.
0 commit comments