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

set skipPhases in Init and JoinConfiguration #3624

Merged
merged 1 commit into from
May 21, 2024

Conversation

nojnhuh
Copy link
Contributor

@nojnhuh nojnhuh commented May 21, 2024

Fixes #3606.

This PR moves the --skip-phases flag from the kubeadm init and kubeadm join commands to the config file for recent versions of Kubernetes to allow users to patch them from a Cluster config. Older (< 1.23) versions of Kubernetes will still specify the --skip-phases flag for those commands for compatibility.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 21, 2024
@@ -117,18 +118,31 @@ func joinWorkers(

// runKubeadmJoin executes kubeadm join command
func runKubeadmJoin(logger log.Logger, node nodes.Node) error {
// run kubeadm join
// TODO(bentheelder): this should be using the config file
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BenTheElder It seemed like this was the last missing piece for this TODO. Please let me know if there's still a gap here where this comment is still valuable.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep! thanks for fixing my ancient TODO 😅

@@ -166,6 +170,14 @@ func (c *ConfigData) Derive() {
runtimeConfig = append(runtimeConfig, fmt.Sprintf("%s=%s", k, v))
}
c.RuntimeConfigString = strings.Join(runtimeConfig, ",")

// skip preflight checks, as these have undesirable side effects
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO(bentheelder): write a fairer note here. this old comment kinda reads like they're a useless feature and that's not accurate, it's just not a good match for kind (we pre-pull images ourselves, we intentionally run in environments with swap on, etc. I wouldn't skip these if running kubeadm init directly on a linux host.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(also the 1.13+ comment is now redundant, we stopped supporting Kubernetes < 1.15 in https://github.com/kubernetes-sigs/kind/releases/tag/v0.16.0)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can rewrite those old comments in a follow-up

@BenTheElder Sorry if you were still getting to this, but I took the liberty of making these changes here: #3632

Copy link
Member

@BenTheElder BenTheElder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve
thank you!

we can rewrite those old comments in a follow-up

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 21, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: BenTheElder, nojnhuh

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 21, 2024
@k8s-ci-robot k8s-ci-robot merged commit a9d681b into kubernetes-sigs:main May 21, 2024
29 checks passed
@nojnhuh nojnhuh deleted the skip-phases branch May 21, 2024 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to skipPhases: addons/coredns
4 participants