-
Notifications
You must be signed in to change notification settings - Fork 716
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update ControlPlaneKubeletLocalMode test for the feature gate being disabled and fix setup-external-ca in kinder #3157
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,6 +72,18 @@ func SetupExternalCA(c *status.Cluster, vLevel int) error { | |
return nil | ||
} | ||
|
||
generateKubeletConfWorker := func(n *status.Node) error { | ||
if err := n.Command( | ||
"/bin/sh", "-c", | ||
fmt.Sprintf("kubeadm init phase kubeconfig kubelet --control-plane-endpoint=%s --apiserver-advertise-address=%s --v=%d", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i guess that's one way of working around without post processing with sed or something else. nice. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, first wanted to do sed but noticed this works too and does not require an additional command :-) |
||
loadBalancerIP, loadBalancerIP, | ||
vLevel), | ||
).RunWithEcho(); err != nil { | ||
return errors.Wrapf(err, "could not generate a kubelet.conf on node: %s", n.Name()) | ||
} | ||
return nil | ||
} | ||
|
||
// iterate secondary CP nodes | ||
for _, n := range c.SecondaryControlPlanes() { | ||
// copy the shared kubeconfig files | ||
|
@@ -108,7 +120,7 @@ func SetupExternalCA(c *status.Cluster, vLevel int) error { | |
} | ||
|
||
// generate kubelet.conf | ||
if err := generateKubeletConf(n); err != nil { | ||
if err := generateKubeletConfWorker(n); err != nil { | ||
return err | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Failed here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's expected, it needs a commit from kubernetes/kubernetes#129956 to succeed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it.