You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -83,6 +87,7 @@ func main() { //nolint:gocyclo // easier to follow as a unit
83
87
84
88
enableManagementPolicies=app.Flag("enable-management-policies", "Enable support for Management Policies.").Default("true").Envar("ENABLE_MANAGEMENT_POLICIES").Bool()
85
89
enableChangeLogs=app.Flag("enable-changelogs", "Enable support for capturing change logs during reconciliation.").Default("false").Envar("ENABLE_CHANGE_LOGS").Bool()
90
+
enableSecretCache=app.Flag("enable-secret-cache", "Enable caching for Secrets. Disabling this can reduce memory usage at the cost of additional API server load.").Default("true").Envar("ENABLE_SECRET_CACHE").Bool()
86
91
87
92
certsDirSet=false
88
93
// we record whether the command-line option "--certs-dir" was supplied
@@ -136,11 +141,41 @@ func main() { //nolint:gocyclo // easier to follow as a unit
136
141
}
137
142
}
138
143
144
+
scheme:=runtime.NewScheme()
145
+
kingpin.FatalIfError(clientgoscheme.AddToScheme(scheme), "Cannot add client-go APIs to scheme")
146
+
kingpin.FatalIfError(clusterapis.AddToScheme(scheme), "Cannot add cluster-scoped Azure APIs to scheme")
147
+
kingpin.FatalIfError(resolverapis.BuildScheme(clusterapis.AddToSchemes), "Cannot register the cluster-scoped Azure APIs with the API resolver's runtime scheme")
148
+
kingpin.FatalIfError(namespacedapis.AddToScheme(scheme), "Cannot add namespace-scoped Azure APIs to scheme")
149
+
kingpin.FatalIfError(resolverapis.BuildScheme(namespacedapis.AddToSchemes), "Cannot register the namespace-scoped Azure APIs with the API resolver's runtime scheme")
150
+
kingpin.FatalIfError(apiextensionsv1.AddToScheme(scheme), "Cannot add api-extensions APIs to scheme")
151
+
152
+
// Secret caching is enabled by default. Disabling it trades API server
@@ -160,12 +195,6 @@ func main() { //nolint:gocyclo // easier to follow as a unit
160
195
kingpin.FatalIfError(mgr.AddReadyzCheck("webhook", mgr.GetWebhookServer().StartedChecker()), "Cannot add webhook server readyz checker to controller manager")
161
196
}
162
197
163
-
kingpin.FatalIfError(clusterapis.AddToScheme(mgr.GetScheme()), "Cannot add cluster-scoped Azure APIs to scheme")
164
-
kingpin.FatalIfError(resolverapis.BuildScheme(clusterapis.AddToSchemes), "Cannot register the cluster-scoped Azure APIs with the API resolver's runtime scheme")
165
-
kingpin.FatalIfError(namespacedapis.AddToScheme(mgr.GetScheme()), "Cannot add namespace-scoped Azure APIs to scheme")
166
-
kingpin.FatalIfError(resolverapis.BuildScheme(namespacedapis.AddToSchemes), "Cannot register the namespace-scoped Azure APIs with the API resolver's runtime scheme")
167
-
kingpin.FatalIfError(apiextensionsv1.AddToScheme(mgr.GetScheme()), "Cannot add api-extensions APIs to scheme")
@@ -83,6 +87,7 @@ func main() { //nolint:gocyclo // easier to follow as a unit
83
87
84
88
enableManagementPolicies=app.Flag("enable-management-policies", "Enable support for Management Policies.").Default("true").Envar("ENABLE_MANAGEMENT_POLICIES").Bool()
85
89
enableChangeLogs=app.Flag("enable-changelogs", "Enable support for capturing change logs during reconciliation.").Default("false").Envar("ENABLE_CHANGE_LOGS").Bool()
90
+
enableSecretCache=app.Flag("enable-secret-cache", "Enable caching for Secrets. Disabling this can reduce memory usage at the cost of additional API server load.").Default("true").Envar("ENABLE_SECRET_CACHE").Bool()
86
91
87
92
certsDirSet=false
88
93
// we record whether the command-line option "--certs-dir" was supplied
@@ -136,11 +141,41 @@ func main() { //nolint:gocyclo // easier to follow as a unit
136
141
}
137
142
}
138
143
144
+
scheme:=runtime.NewScheme()
145
+
kingpin.FatalIfError(clientgoscheme.AddToScheme(scheme), "Cannot add client-go APIs to scheme")
146
+
kingpin.FatalIfError(clusterapis.AddToScheme(scheme), "Cannot add cluster-scoped Azure APIs to scheme")
147
+
kingpin.FatalIfError(resolverapis.BuildScheme(clusterapis.AddToSchemes), "Cannot register the cluster-scoped Azure APIs with the API resolver's runtime scheme")
148
+
kingpin.FatalIfError(namespacedapis.AddToScheme(scheme), "Cannot add namespace-scoped Azure APIs to scheme")
149
+
kingpin.FatalIfError(resolverapis.BuildScheme(namespacedapis.AddToSchemes), "Cannot register the namespace-scoped Azure APIs with the API resolver's runtime scheme")
150
+
kingpin.FatalIfError(apiextensionsv1.AddToScheme(scheme), "Cannot add api-extensions APIs to scheme")
151
+
152
+
// Secret caching is enabled by default. Disabling it trades API server
@@ -160,12 +195,6 @@ func main() { //nolint:gocyclo // easier to follow as a unit
160
195
kingpin.FatalIfError(mgr.AddReadyzCheck("webhook", mgr.GetWebhookServer().StartedChecker()), "Cannot add webhook server readyz checker to controller manager")
161
196
}
162
197
163
-
kingpin.FatalIfError(clusterapis.AddToScheme(mgr.GetScheme()), "Cannot add cluster-scoped Azure APIs to scheme")
164
-
kingpin.FatalIfError(resolverapis.BuildScheme(clusterapis.AddToSchemes), "Cannot register the cluster-scoped Azure APIs with the API resolver's runtime scheme")
165
-
kingpin.FatalIfError(namespacedapis.AddToScheme(mgr.GetScheme()), "Cannot add namespace-scoped Azure APIs to scheme")
166
-
kingpin.FatalIfError(resolverapis.BuildScheme(namespacedapis.AddToSchemes), "Cannot register the namespace-scoped Azure APIs with the API resolver's runtime scheme")
167
-
kingpin.FatalIfError(apiextensionsv1.AddToScheme(mgr.GetScheme()), "Cannot add api-extensions APIs to scheme")
@@ -83,6 +87,7 @@ func main() { //nolint:gocyclo // easier to follow as a unit
83
87
84
88
enableManagementPolicies=app.Flag("enable-management-policies", "Enable support for Management Policies.").Default("true").Envar("ENABLE_MANAGEMENT_POLICIES").Bool()
85
89
enableChangeLogs=app.Flag("enable-changelogs", "Enable support for capturing change logs during reconciliation.").Default("false").Envar("ENABLE_CHANGE_LOGS").Bool()
90
+
enableSecretCache=app.Flag("enable-secret-cache", "Enable caching for Secrets. Disabling this can reduce memory usage at the cost of additional API server load.").Default("true").Envar("ENABLE_SECRET_CACHE").Bool()
86
91
87
92
certsDirSet=false
88
93
// we record whether the command-line option "--certs-dir" was supplied
@@ -136,11 +141,41 @@ func main() { //nolint:gocyclo // easier to follow as a unit
136
141
}
137
142
}
138
143
144
+
scheme:=runtime.NewScheme()
145
+
kingpin.FatalIfError(clientgoscheme.AddToScheme(scheme), "Cannot add client-go APIs to scheme")
146
+
kingpin.FatalIfError(clusterapis.AddToScheme(scheme), "Cannot add cluster-scoped Azure APIs to scheme")
147
+
kingpin.FatalIfError(resolverapis.BuildScheme(clusterapis.AddToSchemes), "Cannot register the cluster-scoped Azure APIs with the API resolver's runtime scheme")
148
+
kingpin.FatalIfError(namespacedapis.AddToScheme(scheme), "Cannot add namespace-scoped Azure APIs to scheme")
149
+
kingpin.FatalIfError(resolverapis.BuildScheme(namespacedapis.AddToSchemes), "Cannot register the namespace-scoped Azure APIs with the API resolver's runtime scheme")
150
+
kingpin.FatalIfError(apiextensionsv1.AddToScheme(scheme), "Cannot add api-extensions APIs to scheme")
151
+
152
+
// Secret caching is enabled by default. Disabling it trades API server
@@ -160,12 +195,6 @@ func main() { //nolint:gocyclo // easier to follow as a unit
160
195
kingpin.FatalIfError(mgr.AddReadyzCheck("webhook", mgr.GetWebhookServer().StartedChecker()), "Cannot add webhook server readyz checker to controller manager")
161
196
}
162
197
163
-
kingpin.FatalIfError(clusterapis.AddToScheme(mgr.GetScheme()), "Cannot add cluster-scoped Azure APIs to scheme")
164
-
kingpin.FatalIfError(resolverapis.BuildScheme(clusterapis.AddToSchemes), "Cannot register the cluster-scoped Azure APIs with the API resolver's runtime scheme")
165
-
kingpin.FatalIfError(namespacedapis.AddToScheme(mgr.GetScheme()), "Cannot add namespace-scoped Azure APIs to scheme")
166
-
kingpin.FatalIfError(resolverapis.BuildScheme(namespacedapis.AddToSchemes), "Cannot register the namespace-scoped Azure APIs with the API resolver's runtime scheme")
167
-
kingpin.FatalIfError(apiextensionsv1.AddToScheme(mgr.GetScheme()), "Cannot add api-extensions APIs to scheme")
0 commit comments