Skip to content

Commit

Permalink
Disable cloud route when allocate-node-cidrs is enabled
Browse files Browse the repository at this point in the history
Fixes kubernetes-retired#1336 by adding `--configure-cloud-routes=false` when `--allocate-node-cidrs=true`

Added `--cluster-name` to ensure it's set correctly on controller manager.

Grouped mandatory and optional flags together.
  • Loading branch information
c-knowles committed May 28, 2018
1 parent cb6766d commit 5a81c24
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions core/controlplane/config/templates/cloud-config-controller
Original file line number Diff line number Diff line change
Expand Up @@ -3372,17 +3372,20 @@ write_files:
command:
- /hyperkube
- controller-manager
{{/* mandatory flags below */}}
- --cloud-provider=aws
- --cluster-name={{.ClusterName}}
- --kubeconfig=/etc/kubernetes/kubeconfig/kube-controller-manager.yaml
- --leader-elect=true
- --root-ca-file=/etc/kubernetes/ssl/ca.pem
- --service-account-private-key-file=/etc/kubernetes/ssl/service-account-key.pem
- --use-service-account-credentials
{{/* optional flags below */}}
{{ if .Experimental.TLSBootstrap.Enabled }}
- --insecure-experimental-approve-all-kubelet-csrs-for-group=system:kubelet-bootstrap
- --cluster-signing-cert-file=/etc/kubernetes/ssl/worker-ca.pem
- --cluster-signing-key-file=/etc/kubernetes/ssl/worker-ca-key.pem
{{ end }}
- --root-ca-file=/etc/kubernetes/ssl/ca.pem
- --cloud-provider=aws
{{ if .Experimental.NodeMonitorGracePeriod }}
- --node-monitor-grace-period={{ .Experimental.NodeMonitorGracePeriod }}
{{end}}
Expand All @@ -3392,6 +3395,8 @@ write_files:
{{ if .Kubernetes.Networking.SelfHosting.Enabled -}}
- --allocate-node-cidrs=true
- --cluster-cidr={{.PodCIDR}}
{{/* no need to auto configure cloud routes when using flannel or canal */}}
- --configure-cloud-routes=false
{{- end }}
{{ if not .Addons.MetricsServer.Enabled -}}
- --horizontal-pod-autoscaler-use-rest-clients=false
Expand Down

0 comments on commit 5a81c24

Please sign in to comment.