|
67 | 67 | profilerAddress string
|
68 | 68 | syncPeriod time.Duration
|
69 | 69 | concurrency int
|
| 70 | + restConfigQPS float32 |
| 71 | + restConfigBurst int |
70 | 72 | healthAddr string
|
71 | 73 | webhookPort int
|
72 | 74 | webhookCertDir string
|
@@ -99,6 +101,10 @@ func initFlags(fs *pflag.FlagSet) {
|
99 | 101 | "Bind address to expose the pprof profiler (e.g. localhost:6060)")
|
100 | 102 | fs.DurationVar(&syncPeriod, "sync-period", 10*time.Minute,
|
101 | 103 | "The minimum interval at which watched resources are reconciled (e.g. 15m)")
|
| 104 | + fs.Float32Var(&restConfigQPS, "kube-api-qps", 20, |
| 105 | + "Maximum queries per second from the controller client to the Kubernetes API server. Defaults to 20") |
| 106 | + fs.IntVar(&restConfigBurst, "kube-api-burst", 30, |
| 107 | + "Maximum number of queries that should be allowed in one burst from the controller client to the Kubernetes API server. Default 30") |
102 | 108 | fs.StringVar(&healthAddr, "health-addr", ":9440",
|
103 | 109 | "The address the health endpoint binds to.")
|
104 | 110 | fs.IntVar(&webhookPort, "webhook-port", 9443,
|
@@ -139,6 +145,8 @@ func main() {
|
139 | 145 | }
|
140 | 146 |
|
141 | 147 | restConfig := ctrl.GetConfigOrDie()
|
| 148 | + restConfig.QPS = restConfigQPS |
| 149 | + restConfig.Burst = restConfigBurst |
142 | 150 | restConfig.UserAgent = remote.DefaultClusterAPIUserAgent("cluster-api-docker-controller-manager")
|
143 | 151 | ctrlOptions := ctrl.Options{
|
144 | 152 | Scheme: myscheme,
|
|
0 commit comments