-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
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 |
---|---|---|
|
@@ -107,6 +107,10 @@ type DerivedConfigData struct { | |
IPv6 bool | ||
// kubelet cgroup driver, based on kubernetes version | ||
CgroupDriver string | ||
// JoinSkipPhases are the skipPhases values for the JoinConfiguration. | ||
JoinSkipPhases []string | ||
// InitSkipPhases are the skipPhases values for the InitConfiguration. | ||
InitSkipPhases []string | ||
BenTheElder marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
|
||
type FeatureGate struct { | ||
|
@@ -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 | ||
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. 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 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. (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) 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.
@BenTheElder Sorry if you were still getting to this, but I took the liberty of making these changes here: #3632 |
||
// and don't tell us much. requires kubeadm 1.22+ | ||
c.JoinSkipPhases = []string{"preflight"} | ||
c.InitSkipPhases = []string{"preflight"} | ||
if c.KubeProxyMode == string(config.NoneProxyMode) { | ||
c.InitSkipPhases = append(c.InitSkipPhases, "addon/kube-proxy") | ||
} | ||
} | ||
|
||
// See docs for these APIs at: | ||
|
@@ -380,6 +392,12 @@ nodeRegistration: | |
node-ip: "{{ .NodeAddress }}" | ||
provider-id: "kind://{{.NodeProvider}}/{{.ClusterName}}/{{.NodeName}}" | ||
node-labels: "{{ .NodeLabels }}" | ||
{{ if .InitSkipPhases -}} | ||
skipPhases: | ||
{{ range $phase := .InitSkipPhases -}} | ||
- "{{ $phase }}" | ||
{{- end }} | ||
{{- end }} | ||
--- | ||
# no-op entry that exists solely so it can be patched | ||
apiVersion: kubeadm.k8s.io/v1beta3 | ||
|
@@ -403,6 +421,12 @@ discovery: | |
apiServerEndpoint: "{{ .ControlPlaneEndpoint }}" | ||
token: "{{ .Token }}" | ||
unsafeSkipCAVerification: true | ||
{{ if .JoinSkipPhases -}} | ||
skipPhases: | ||
{{ range $phase := .JoinSkipPhases -}} | ||
- "{{ $phase }}" | ||
{{- end }} | ||
{{- end }} | ||
--- | ||
apiVersion: kubelet.config.k8s.io/v1beta1 | ||
kind: KubeletConfiguration | ||
|
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.
@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.
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.
yep! thanks for fixing my ancient TODO 😅