Skip to content

Commit

Permalink
Disable configure-cloud-routes and external service/route programming…
Browse files Browse the repository at this point in the history
… support when using k3s stub cloud controller

Resolves warning 3 from k3s-io#2471

Signed-off-by: Brad Davidson <[email protected]>
  • Loading branch information
brandond committed Nov 4, 2020
1 parent e109f13 commit 4395e55
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
3 changes: 3 additions & 0 deletions manifests/ccm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,6 @@ subjects:
- kind: User
name: cloud-controller-manager
namespace: kube-system
- kind: ServiceAccount
name: cloud-controller-manager
namespace: kube-system
7 changes: 7 additions & 0 deletions pkg/daemons/control/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,18 @@ func controllerManager(cfg *config.Control, runtime *config.ControlRuntime) erro
"address": localhostIP.String(),
"bind-address": localhostIP.String(),
"secure-port": "0",
"cloud-provider": version.Program,
"use-service-account-credentials": "true",
"cluster-signing-cert-file": runtime.ClientCA,
"cluster-signing-key-file": runtime.ClientCAKey,
}
if cfg.NoLeaderElect {
argsMap["leader-elect"] = "false"
}
if !cfg.DisableCCM {
argsMap["configure-cloud-routes"] = "false"
argsMap["controllers"] = "*,-service,-route"
}

args := config.GetArgsList(argsMap, cfg.ExtraControllerArgs)
logrus.Infof("Running kube-controller-manager %s", config.ArgString(args))
Expand Down Expand Up @@ -909,6 +914,8 @@ func cloudControllerManager(ctx context.Context, cfg *config.Control, runtime *c
argsMap := map[string]string{
"kubeconfig": runtime.KubeConfigCloudController,
"allocate-node-cidrs": "true",
"configure-cloud-routes": "false",
"controllers": "*,-service,-route",
"cluster-cidr": cfg.ClusterIPRange.String(),
"bind-address": localhostIP.String(),
"secure-port": "0",
Expand Down
2 changes: 1 addition & 1 deletion pkg/deploy/zz_generated_bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4395e55

Please sign in to comment.