@@ -9,11 +9,8 @@ func (s *service) configureControllerManagerFlags(command *cobra.Command) {
99 flags := command .Flags ()
1010
1111 // controller manager settings
12- _ = flags .Set ("bind-address" , "0.0.0.0" )
13- _ = flags .Set ("secure-port" , "10257" )
1412 _ = flags .Set ("allocate-node-cidrs" , "true" )
1513 _ = flags .Set ("cluster-cidr" , types .DefaultPodCIDR )
16- _ = flags .Set ("v" , "0" )
1714 _ = flags .Set ("service-account-private-key-file" , s .serviceAccountKeyFile )
1815 _ = flags .Set ("kubeconfig" , s .adminKubeconfigFile )
1916 _ = flags .Set ("authentication-kubeconfig" , s .adminKubeconfigFile )
@@ -23,50 +20,51 @@ func (s *service) configureControllerManagerFlags(command *cobra.Command) {
2320 _ = flags .Set ("tls-cert-file" , s .controllerManagerCertFile )
2421 _ = flags .Set ("tls-private-key-file" , s .controllerManagerKeyFile )
2522 _ = flags .Set ("leader-elect" , "false" )
26- _ = flags .Set ("profiling" , "false" )
2723 _ = flags .Set ("use-service-account-credentials" , "true" )
2824
29- // controllers
30- _ = flags .Set ("controllers" , "deployment,replicaset,service,serviceaccount,namespace,attachdetach,endpoint,daemonset,statefulset,root-ca-certificate-publisher-controller,serviceaccount-token-controller,node-ipam-controller,endpointslice-controller,persistentvolume-binder-controller,job-controller,cronjob-controller,garbage-collector-controller,disruption,csrsigning,clusterrole-aggregation" )
25+ // Edge-optimised overrides — only applied when not in full mode.
26+ // When full mode is enabled, upstream Kubernetes defaults are used instead.
27+ if ! s .fullMode {
28+ // controllers
29+ _ = flags .Set ("controllers" , "deployment,replicaset,service,serviceaccount,namespace,attachdetach,endpoint,daemonset,statefulset,root-ca-certificate-publisher-controller,serviceaccount-token-controller,node-ipam-controller,endpointslice-controller,persistentvolume-binder-controller,job-controller,cronjob-controller,garbage-collector-controller,disruption,csrsigning,clusterrole-aggregation" )
3130
32- // thresholds
33- _ = flags .Set ("terminated-pod-gc-threshold" , "20" )
34- _ = flags .Set ("large-cluster-size-threshold" , "10" )
35- _ = flags .Set ("unhealthy-zone-threshold" , "0.7" )
31+ _ = flags . Set ( "profiling" , "false" )
32+ _ = flags .Set ("terminated-pod-gc-threshold" , "20" )
33+ _ = flags .Set ("large-cluster-size-threshold" , "10" )
34+ _ = flags .Set ("unhealthy-zone-threshold" , "0.7" )
3635
37- // sync settings
38- _ = flags .Set ("concurrent-deployment-syncs" , "2" )
39- _ = flags .Set ("concurrent-replicaset-syncs" , "2" )
40- _ = flags .Set ("concurrent-daemonset-syncs" , "2" )
41- _ = flags .Set ("concurrent-job-syncs" , "2" )
42- _ = flags .Set ("concurrent-endpoint-syncs" , "2" )
43- _ = flags .Set ("concurrent-service-endpoint-syncs" , "2" )
44- _ = flags .Set ("concurrent-gc-syncs" , "2" )
45- _ = flags .Set ("concurrent-namespace-syncs" , "2" )
46- _ = flags .Set ("concurrent-cron-job-syncs" , "2" )
47- _ = flags .Set ("concurrent-horizontal-pod-autoscaler-syncs" , "2" )
48- _ = flags .Set ("concurrent-rc-syncs" , "2" )
49- _ = flags .Set ("concurrent-resource-quota-syncs" , "2" )
50- _ = flags .Set ("concurrent-service-syncs" , "2" )
51- _ = flags .Set ("concurrent-serviceaccount-token-syncs" , "2" )
52- _ = flags .Set ("concurrent-statefulset-syncs" , "2" )
53- _ = flags .Set ("concurrent-ttl-after-finished-syncs" , "2" )
54- _ = flags .Set ("concurrent-ephemeralvolume-syncs" , "2" )
55- _ = flags .Set ("concurrent-validating-admission-policy-status-syncs" , "2" )
56- _ = flags .Set ("mirroring-concurrent-service-endpoint-syncs" , "2" )
36+ // sync settings
37+ _ = flags .Set ("concurrent-deployment-syncs" , "2" )
38+ _ = flags .Set ("concurrent-replicaset-syncs" , "2" )
39+ _ = flags .Set ("concurrent-job-syncs" , "2" )
40+ _ = flags .Set ("concurrent-endpoint-syncs" , "2" )
41+ _ = flags .Set ("concurrent-service-endpoint-syncs" , "2" )
42+ _ = flags .Set ("concurrent-gc-syncs" , "2" )
43+ _ = flags .Set ("concurrent-namespace-syncs" , "2" )
44+ _ = flags .Set ("concurrent-cron-job-syncs" , "2" )
45+ _ = flags .Set ("concurrent-horizontal-pod-autoscaler-syncs" , "2" )
46+ _ = flags .Set ("concurrent-rc-syncs" , "2" )
47+ _ = flags .Set ("concurrent-resource-quota-syncs" , "2" )
48+ _ = flags .Set ("concurrent-service-syncs" , "2" )
49+ _ = flags .Set ("concurrent-serviceaccount-token-syncs" , "2" )
50+ _ = flags .Set ("concurrent-statefulset-syncs" , "2" )
51+ _ = flags .Set ("concurrent-ttl-after-finished-syncs" , "2" )
52+ _ = flags .Set ("concurrent-ephemeralvolume-syncs" , "2" )
53+ _ = flags .Set ("concurrent-validating-admission-policy-status-syncs" , "2" )
54+ _ = flags .Set ("mirroring-concurrent-service-endpoint-syncs" , "2" )
5755
58- // sync period
59- _ = flags .Set ("horizontal-pod-autoscaler-sync-period" , "60s" )
60- _ = flags .Set ("node-monitor-period" , "60s" )
61- _ = flags .Set ("pvclaimbinder-sync-period" , "120s" )
62- _ = flags .Set ("resource-quota-sync-period" , "15m" )
63- _ = flags .Set ("namespace-sync-period" , "15m" )
64- _ = flags .Set ("route-reconciliation-period" , "60s" )
65- _ = flags .Set ("attach-detach-reconcile-sync-period" , "10m" )
66- _ = flags .Set ("node-monitor-grace-period" , "300s" )
67- _ = flags .Set ("min-resync-period" , "12h" )
56+ // sync period
57+ _ = flags .Set ("horizontal-pod-autoscaler-sync-period" , "60s" )
58+ _ = flags .Set ("node-monitor-period" , "60s" )
59+ _ = flags .Set ("pvclaimbinder-sync-period" , "120s" )
60+ _ = flags .Set ("resource-quota-sync-period" , "15m" )
61+ _ = flags .Set ("namespace-sync-period" , "15m" )
62+ _ = flags .Set ("route-reconciliation-period" , "60s" )
63+ _ = flags .Set ("attach-detach-reconcile-sync-period" , "10m" )
64+ _ = flags .Set ("node-monitor-grace-period" , "300s" )
6865
69- // api server interactions
70- _ = flags .Set ("kube-api-qps" , "50" )
71- _ = flags .Set ("kube-api-burst" , "100" )
66+ // api server interactions
67+ _ = flags .Set ("kube-api-qps" , "50" )
68+ _ = flags .Set ("kube-api-burst" , "100" )
69+ }
7270}
0 commit comments