-
Notifications
You must be signed in to change notification settings - Fork 1.6k
kubeadm: Add kubelet instance configuration to configure CRI socket for each node #4658
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
Conversation
HirazawaUi
commented
May 23, 2024
- One-line PR description: Add kubelet instance configuration to configure CRI socket for each node.
- Issue link: Add kubelet instance configuration to configure CRI socket for each node #4654
- Other comments:
746488e
to
53e0fb5
Compare
ddc3eb1
to
40a8912
Compare
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.
@HirazawaUi thanks for starting work on the KEP.
- the formatting is inconsistent. sometimes you use quotes around names sometimes not. some quotes are not closed. sometimes cri is not uppercase. please make everything consistent.
- we shouldn't talk about the --cri-scoket flag, you can instead just the kubeadm CRI socket option, the kubelet CRI socket option, the CRI socket node annotation
- this KEP has two important goals that are not so clear 1) don't write the --container-runtime-endpoint flag in the kubeadm-flags.env file 2) stop writing the annotation on the Node object, please make these clearer in the Goals section
- i think the plan for init/join/upgrade is not very clear across the different kubeadm versions until this feature graduates
feature freeze is in two weeks June 14th
https://github.com/kubernetes/sig-release/tree/master/releases/release-1.31
keps/sig-cluster-lifecycle/kubeadm/4656-add-instance-configuration/README.md
Outdated
Show resolved
Hide resolved
keps/sig-cluster-lifecycle/kubeadm/4656-add-instance-configuration/README.md
Outdated
Show resolved
Hide resolved
keps/sig-cluster-lifecycle/kubeadm/4656-add-instance-configuration/README.md
Outdated
Show resolved
Hide resolved
keps/sig-cluster-lifecycle/kubeadm/4656-add-instance-configuration/README.md
Outdated
Show resolved
Hide resolved
keps/sig-cluster-lifecycle/kubeadm/4656-add-instance-configuration/README.md
Outdated
Show resolved
Hide resolved
keps/sig-cluster-lifecycle/kubeadm/4656-add-instance-configuration/README.md
Outdated
Show resolved
Hide resolved
keps/sig-cluster-lifecycle/kubeadm/4656-add-instance-configuration/README.md
Outdated
Show resolved
Hide resolved
keps/sig-cluster-lifecycle/kubeadm/4656-add-instance-configuration/README.md
Outdated
Show resolved
Hide resolved
keps/sig-cluster-lifecycle/kubeadm/4656-add-instance-configuration/README.md
Outdated
Show resolved
Hide resolved
keps/sig-cluster-lifecycle/kubeadm/4656-add-instance-configuration/README.md
Outdated
Show resolved
Hide resolved
|
||
## Drawbacks | ||
|
||
## Alternatives |
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.
how about using a feature gate, and why is that not our first choice?
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.
I initially thought that this feature would be invisible to ordinary users, and feature gate would increase its complexity (and I'm not sure whether it makes sense to use feature gate on kubeadm), so I implemented it in multiple versions to control version skew and compatibility.
If we use feature gate, then the Design Details
will become relatively simple. We only need to implement the feature and use feature gate to control whether it is enabled. There is no need to use multiple versions implemented to consider compatibility and version skew.
Let me think and redesign it based on feature gate.
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.
if the feature gate is the main approach what alternatives do we have? this section "alternatives" must include one or more alternatives that are not the primary choice of the KEP.
55ea8f6
to
8b0eaf4
Compare
@neolit123 Thanks, I have fixed according to your suggestion. |
keps/sig-cluster-lifecycle/kubeadm/4656-add-instance-configuration/README.md
Outdated
Show resolved
Hide resolved
keps/sig-cluster-lifecycle/kubeadm/4656-add-instance-configuration/README.md
Outdated
Show resolved
Hide resolved
keps/sig-cluster-lifecycle/kubeadm/4656-add-instance-configuration/README.md
Outdated
Show resolved
Hide resolved
#3983 adds support for a drop-in kubelet configuration directory. It allows override the configuration for the Kubelet located at In this KEP, we may need to consider how to work well with the feature in the context of the kubeadm tool. |
i prefer to not mix core functionality in kubeadm with 3983, because kubeadm already has the patches mechanism and it's an older feature. if the user uses also 3983, those files will take precedence. |
Ok, if the current KEP can't be approved before the freeze, I will continue to push it in v1.32. |
82459f9
to
080c92f
Compare
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.
Overall LGTM.
+1 for this approach. Sorry for the late response.
keps/sig-cluster-lifecycle/kubeadm/4656-add-kubelet-instance-configuration/README.md
Show resolved
Hide resolved
keps/sig-cluster-lifecycle/kubeadm/4656-add-kubelet-instance-configuration/README.md
Show resolved
Hide resolved
080c92f
to
e069c54
Compare
@HirazawaUi release cycle 1.32 just started. would you be able to continue working on this? |
Yes, I can still work on it and am waiting for further review of this PR |
thanks, i think end date for KEPs is 10th of October. |
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.
thanks for the updates @HirazawaUi !
i added a few final comments from me but this seems good to become alpha in 1.32.
keps/sig-cluster-lifecycle/kubeadm/4656-add-kubelet-instance-configuration/README.md
Show resolved
Hide resolved
keps/sig-cluster-lifecycle/kubeadm/4656-add-kubelet-instance-configuration/README.md
Show resolved
Hide resolved
keps/sig-cluster-lifecycle/kubeadm/4656-add-kubelet-instance-configuration/README.md
Show resolved
Hide resolved
authors: | ||
- "@HirazawaUi" | ||
owning-sig: sig-cluster-lifecycle | ||
status: provisional |
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.
please mark as implementable
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.
still applies ^
should be:
status: implementable
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.
It seems that we cannot mark the status as implementable, because if the status of a KEP is marked as implementable, we will verify that its related PRR file exists.
ref:
enhancements/pkg/kepval/approval.go
Lines 100 to 107 in 48f928a
func isPRRRequired(kep *api.Proposal) (required bool, err error) { | |
logrus.Debug("checking if PRR is required") | |
required = kep.Status == api.ImplementableStatus || kep.Status == api.ImplementedStatus | |
if !required { | |
return false, nil | |
} | |
keps/sig-cluster-lifecycle/kubeadm/4656-add-kubelet-instance-configuration/kep.yaml
Outdated
Show resolved
Hide resolved
keps/sig-cluster-lifecycle/kubeadm/4656-add-kubelet-instance-configuration/README.md
Show resolved
Hide resolved
ping @HirazawaUi we are not as strict about the deadline of 10th Oct, but that's the official enhancement freeze. |
e069c54
to
03b2fe6
Compare
@neolit123 the update has been made. Please review it again. If it gets merged, I will try to recall some details about it from memory and complete the implementation of the PR as soon as possible :) |
keps/sig-cluster-lifecycle/kubeadm/4656-add-kubelet-instance-configuration/kep.yaml
Outdated
Show resolved
Hide resolved
did you forget to add the latest changes? (check my latest comments on the various threads) |
03b2fe6
to
8e6851f
Compare
Ah, I'm sorry for my carelessness, I don't even know why I did that yesterday, but when I marked the status of the KEP as implementable, the validation procedure of the KEP will not pass because it requires a PRR file |
we don't do PRR for kubeadm. check this existing KEP; use 0.0 for latest milestone. |
|
||
## Proposal | ||
|
||
We will add a new file `/var/lib/kubelet/instance-config.yaml` to customize the CRI socket of each node. This file will be merged with `/var/lib/kubelet/config.yaml` in the process of kubeadm init/join in a similar way to `kubeletconfiguration patch target` (refer to its code implementation), If the user uses the `--patch` args, the patch file provided by the user will be given priority. |
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.
We will add a new file `/var/lib/kubelet/instance-config.yaml` to customize the CRI socket of each node. This file will be merged with `/var/lib/kubelet/config.yaml` in the process of kubeadm init/join in a similar way to `kubeletconfiguration patch target` (refer to its code implementation), If the user uses the `--patch` args, the patch file provided by the user will be given priority. | |
We will add a new file `/var/lib/kubelet/instance-config.yaml` to customize the CRI socket of each node. This file will be merged with `/var/lib/kubelet/config.yaml` in the process of kubeadm init/join by using the `kubeletconfiguration` patch target. If the user uses the `kubeletconfiguration` with `--patches`, the patch file provided by the user will be given priority. |
some minor issues to fix.
8e6851f
to
78771bf
Compare
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.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: HirazawaUi, neolit123 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 |