From 7f52438dea5ba096d2f388f4bb1d8d9a2b1c3847 Mon Sep 17 00:00:00 2001 From: Dong Liu Date: Mon, 18 Sep 2017 13:17:14 +0800 Subject: [PATCH 1/2] Add default value for RouteReconciliationPeriod in cloud controller manager --- .../app/options/options.go | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/cmd/cloud-controller-manager/app/options/options.go b/cmd/cloud-controller-manager/app/options/options.go index fd379037ff..58cd3fbe9b 100644 --- a/cmd/cloud-controller-manager/app/options/options.go +++ b/cmd/cloud-controller-manager/app/options/options.go @@ -46,18 +46,19 @@ type CloudControllerManagerServer struct { func NewCloudControllerManagerServer() *CloudControllerManagerServer { s := CloudControllerManagerServer{ KubeControllerManagerConfiguration: componentconfig.KubeControllerManagerConfiguration{ - Port: ports.CloudControllerManagerPort, - Address: "0.0.0.0", - ConcurrentServiceSyncs: 1, - MinResyncPeriod: metav1.Duration{Duration: 12 * time.Hour}, - NodeMonitorPeriod: metav1.Duration{Duration: 5 * time.Second}, - ClusterName: "kubernetes", - ConfigureCloudRoutes: true, - ContentType: "application/vnd.kubernetes.protobuf", - KubeAPIQPS: 20.0, - KubeAPIBurst: 30, - LeaderElection: leaderelectionconfig.DefaultLeaderElectionConfiguration(), - ControllerStartInterval: metav1.Duration{Duration: 0 * time.Second}, + Port: ports.CloudControllerManagerPort, + Address: "0.0.0.0", + ConcurrentServiceSyncs: 1, + MinResyncPeriod: metav1.Duration{Duration: 12 * time.Hour}, + NodeMonitorPeriod: metav1.Duration{Duration: 5 * time.Second}, + ClusterName: "kubernetes", + ConfigureCloudRoutes: true, + ContentType: "application/vnd.kubernetes.protobuf", + KubeAPIQPS: 20.0, + KubeAPIBurst: 30, + LeaderElection: leaderelectionconfig.DefaultLeaderElectionConfiguration(), + ControllerStartInterval: metav1.Duration{Duration: 0 * time.Second}, + RouteReconciliationPeriod: metav1.Duration{Duration: 10 * time.Second}, }, NodeStatusUpdateFrequency: metav1.Duration{Duration: 5 * time.Minute}, } From 5af2ac5344286c3f9e84db3b16f9cda0f2df68b6 Mon Sep 17 00:00:00 2001 From: Dong Liu Date: Wed, 20 Sep 2017 15:53:22 +0800 Subject: [PATCH 2/2] Add comment for controller manager default values --- cmd/cloud-controller-manager/app/options/options.go | 2 ++ cmd/kube-controller-manager/app/options/options.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/cmd/cloud-controller-manager/app/options/options.go b/cmd/cloud-controller-manager/app/options/options.go index 58cd3fbe9b..bec9d12a34 100644 --- a/cmd/cloud-controller-manager/app/options/options.go +++ b/cmd/cloud-controller-manager/app/options/options.go @@ -45,6 +45,8 @@ type CloudControllerManagerServer struct { // NewCloudControllerManagerServer creates a new ExternalCMServer with a default config. func NewCloudControllerManagerServer() *CloudControllerManagerServer { s := CloudControllerManagerServer{ + // Part of these default values also present in 'cmd/kube-controller-manager/app/options/options.go'. + // Please keep them in sync when doing update. KubeControllerManagerConfiguration: componentconfig.KubeControllerManagerConfiguration{ Port: ports.CloudControllerManagerPort, Address: "0.0.0.0", diff --git a/cmd/kube-controller-manager/app/options/options.go b/cmd/kube-controller-manager/app/options/options.go index e5acccd066..12f6264dfb 100644 --- a/cmd/kube-controller-manager/app/options/options.go +++ b/cmd/kube-controller-manager/app/options/options.go @@ -55,6 +55,8 @@ func NewCMServer() *CMServer { } s := CMServer{ + // Part of these default values also present in 'cmd/cloud-controller-manager/app/options/options.go'. + // Please keep them in sync when doing update. KubeControllerManagerConfiguration: componentconfig.KubeControllerManagerConfiguration{ Controllers: []string{"*"}, Port: ports.ControllerManagerPort,