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

kubeadm: annotate CRI socket on kubelet-finalize phase #85419

Closed
wants to merge 1 commit into from
Closed

kubeadm: annotate CRI socket on kubelet-finalize phase #85419

wants to merge 1 commit into from

Conversation

ereslibre
Copy link
Contributor

@ereslibre ereslibre commented Nov 18, 2019

What type of PR is this?
/kind bug

What this PR does / why we need it:
When running kubeadm init phase upload-config kubelet the current
logic will try to read the config file and patch the node annotation
for the CRI socket.

Ideally, this logic should not be triggered under this phase, because
uploading the kubelet configuration to the cluster and patching the
current node CRI socket annotation are two different things.

Now that we introduced the kubelet-finalize phase, make this logic
happen under this phase on init. The rest (join, upgrade) are left
untouched.

Which issue(s) this PR fixes:
Fixes kubernetes/kubeadm#1924

Does this PR introduce a user-facing change?:

NONE

/priority backlog
/cc @kubernetes/sig-cluster-lifecycle-pr-reviews

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. kind/bug Categorizes issue or PR as related to a bug. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. priority/backlog Higher priority than priority/awaiting-more-evidence. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. area/kubeadm labels Nov 18, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ereslibre

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 Nov 18, 2019
When running `kubeadm init phase upload-config kubelet` the current
logic will try to read the config file and patch the node annotation
for the CRI socket.

Ideally, this logic should not be triggered under this phase, because
uploading the kubelet configuration to the cluster and patching the
current node CRI socket annotation are two different things.

Now that we introduced the `kubelet-finalize` phase, make this logic
happen under this phase on init. The rest (join, upgrade) are left
untouched.
@ereslibre
Copy link
Contributor Author

After some discussion with @neolit123 we might want to take different approaches here:

  • Keep as it is, annotate-cri-socket, however this creates some future expectations on keeping this subphase (keep reading).

  • If we want to keep the CRI annotation, maybe make this phase experimental-annotate-cri-socket so we can remove it altogether in the future, since CRI annotation has been mentioned several times in the past to not be really required.

  • If we decide to remove CRI annotations altogether, then this PR needs to be adapted to remove the annotation logic. This would imply that kubeadm would need to autodetect the CRI socket on every execution.

I think it's reasonable to delegate this discussion post KubeCon, so folks can give their opinion.

@k8s-ci-robot
Copy link
Contributor

@ereslibre: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-kubernetes-integration 8f40148 link /test pull-kubernetes-integration

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Copy link
Contributor

@rosti rosti left a comment

Choose a reason for hiding this comment

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

Thanks @ereslibre !
Code-wise it looks good. However, hiding the CRI annotation in another phase was deliberate when designing all the phases. This is a technical detail that can change.
Even now the CRI can be obtained from the kubelet command line parameters. In the future it is best to obtain it from the local kubeadm component config file (provided that a new field for the CRI socket is introduced).
Is re-annotation such a big problem for you? Let's discuss this on the next office hours.
/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 19, 2019
@ereslibre
Copy link
Contributor Author

Is re-annotation such a big problem for you? Let's discuss this on the next office hours.

Let's discuss during next office hours. It's not a big deal, but it feels a bit arbitrary that we are patching the CRI socket during the upload config phase. In my opinion it would be better to extract it (even if we prefix the new phase with experimental-, so we are free to remove it in the future when we plan to get rid of this annotation completely).

@ereslibre
Copy link
Contributor Author

Also, using experimental- for something that is not experimental but knowlingly will be removed might seem a bit "rule bending"... let's discuss it.

@rosti
Copy link
Contributor

rosti commented Nov 19, 2019

The idea is that at some point the kubelet component config will have a CRI socket field in it. Thus the action of "storing kubelet's CRI socket" will take place during the upload config phase.

@neolit123
Copy link
Member

@rosti @ereslibre

However, hiding the CRI annotation in another phase was deliberate when designing all the phases

we can still add it as a separate phase, but make the phase hidden. the phase runner supports this.

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Feb 22, 2020
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Mar 23, 2020
@fejta-bot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

@k8s-ci-robot
Copy link
Contributor

@fejta-bot: Closed this PR.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

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. area/kubeadm cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/bug Categorizes issue or PR as related to a bug. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. priority/backlog Higher priority than priority/awaiting-more-evidence. release-note-none Denotes a PR that doesn't merit a release note. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

do not annotate the Node CRI socket in the "init upload-config" phase
5 participants