Skip to content
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

kinder: make sure worker nodes also get a patches dir created #2706

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions kinder/pkg/cluster/manager/actions/kubeadm-join.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func KubeadmJoin(c *status.Cluster, usePhases bool, copyCertsMode CopyCertsMode,
return err
}

if err := joinWorkers(c, usePhases, discoveryMode, wait, kubeadmConfigVersion, ignorePreflightErrors, vLevel); err != nil {
if err := joinWorkers(c, usePhases, discoveryMode, wait, kubeadmConfigVersion, patchesDir, ignorePreflightErrors, vLevel); err != nil {
return err
}
return nil
Expand Down Expand Up @@ -176,14 +176,18 @@ func kubeadmJoinControlPlaneWithPhases(cp *status.Node, patchesDir, ignorePrefli
return nil
}

func joinWorkers(c *status.Cluster, usePhases bool, discoveryMode DiscoveryMode, wait time.Duration, kubeadmConfigVersion, ignorePreflightErrors string, vLevel int) (err error) {
func joinWorkers(c *status.Cluster, usePhases bool, discoveryMode DiscoveryMode, wait time.Duration, kubeadmConfigVersion, patchesDir, ignorePreflightErrors string, vLevel int) (err error) {
for _, w := range c.Workers().EligibleForActions() {
// checks pre-loaded images available on the node (this will report missing images, if any)
kubeVersion, err := w.KubeVersion()
if err != nil {
return err
}

if err := copyPatchesToNode(w, patchesDir); err != nil {
return err
}

if err := checkImagesForVersion(w, kubeVersion); err != nil {
return err
}
Expand Down