From 5ac34a1f41cd0d7f41e6408372bb9f0699c40ad7 Mon Sep 17 00:00:00 2001 From: Kinara Shah Date: Fri, 3 Dec 2021 17:05:21 -0800 Subject: [PATCH] pass authorization-kubeconfig and authentication-kubeconfig for 1.22 controller manager must start with proper authorization and authentication kubeconfig in args starting 1.22. k8s 1.22 has disabled insecure serving for kube controller manager. --- cluster/plan.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cluster/plan.go b/cluster/plan.go index c8435bfc..81195b84 100644 --- a/cluster/plan.go +++ b/cluster/plan.go @@ -381,6 +381,8 @@ func (c *Cluster) BuildKubeControllerProcess(host *hosts.Host, serviceOptions v3 if matchedRange { Binds = util.RemoveZFromBinds(Binds) + CommandArgs["authentication-kubeconfig"] = CommandArgs["kubeconfig"] + CommandArgs["authorization-kubeconfig"] = CommandArgs["kubeconfig"] } for arg, value := range c.Services.KubeController.ExtraArgs { @@ -818,6 +820,8 @@ func (c *Cluster) BuildSchedulerProcess(host *hosts.Host, serviceOptions v3.Kube if matchedRange { Binds = util.RemoveZFromBinds(Binds) + CommandArgs["authentication-kubeconfig"] = CommandArgs["kubeconfig"] + CommandArgs["authorization-kubeconfig"] = CommandArgs["kubeconfig"] } Binds = append(Binds, c.Services.Scheduler.ExtraBinds...)