Skip to content

Commit

Permalink
kubeadm: fix dry-run for kubelet-wait-bootstrap phase
Browse files Browse the repository at this point in the history
  • Loading branch information
chrischdi committed Feb 3, 2025
1 parent fc268ec commit 65839db
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/kubeadm/app/cmd/phases/join/kubelet.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,11 @@ func runKubeletWaitBootstrapPhase(c workflow.RunData) (returnErr error) {
return err
}

if cfg.DryRun {
fmt.Println("[kubelet-wait] Would wait for the kubelet to be bootstrapped")
return nil
}

bootstrapKubeConfigFile := filepath.Join(data.KubeConfigDir(), kubeadmconstants.KubeletBootstrapKubeConfigFileName)
// Deletes the bootstrapKubeConfigFile, so the credential used for TLS bootstrap is removed from disk
defer func() {
Expand Down

0 comments on commit 65839db

Please sign in to comment.