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

Make CRI v1 the default and allow a fallback to v1alpha2 #106501

Merged
merged 2 commits into from Nov 18, 2021

Conversation

ehashman
Copy link
Member

What type of PR is this?

/kind feature

What this PR does / why we need it:

Picks up from #106006 - @saschagrunert is OOO.

Which issue(s) this PR fixes:

Beta implementation for kubernetes/enhancements#2040

Special notes for your reviewer:

Identical to #106006 but rebased against latest master and adds unit test suggested in #106006 (comment)

/assign @liggitt @mrunalp

Does this PR introduce a user-facing change?

CRI v1 is now the project default. If a container runtime does not support the v1 API, Kubernetes will fall back to the v1alpha2 implementation.

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

- [KEP]: https://github.com/kubernetes/enhancements/issues/2040

saschagrunert and others added 2 commits November 17, 2021 11:05
This patch makes the CRI `v1` API the new project-wide default version.
To allow backwards compatibility, a fallback to `v1alpha2` has been added
as well. This fallback can either used by automatically determined by
the kubelet.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
See kubernetes#106006 (comment)

Co-Authored-By: Jordan Liggitt <liggitt@google.com>
@k8s-ci-robot k8s-ci-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Nov 17, 2021
@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Nov 17, 2021
@ehashman
Copy link
Member Author

/sig node
/priority important-soon
/triage accepted

@k8s-ci-robot k8s-ci-robot added sig/node Categorizes an issue or PR as relevant to SIG Node. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Nov 17, 2021
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. area/kubelet area/test sig/network Categorizes an issue or PR as relevant to SIG Network. sig/testing Categorizes an issue or PR as relevant to SIG Testing. labels Nov 17, 2021
@liggitt
Copy link
Member

liggitt commented Nov 17, 2021

/approve
for vendor update

Thanks for pulling in the equality unit test check

will defer the node API approval to node folks

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ehashman, liggitt, mrunalp

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 17, 2021
@mrunalp
Copy link
Contributor

mrunalp commented Nov 17, 2021

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 17, 2021
@reylejano
Copy link
Member

/milestone v1.23

@k8s-ci-robot k8s-ci-robot added this to the v1.23 milestone Nov 17, 2021
@ehashman
Copy link
Member Author

flake #106367

/test pull-kubernetes-node-e2e-containerd

@ehashman
Copy link
Member Author

/skip

@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Nov 17, 2021

@ehashman: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-kubernetes-e2e-aks-engine-windows-containerd 31c4273 link false /test pull-kubernetes-e2e-aks-engine-windows-containerd

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.

@k8s-triage-robot
Copy link

The Kubernetes project has merge-blocking tests that are currently too flaky to consistently pass.

This bot retests PRs for certain kubernetes repos according to the following rules:

  • The PR does have any do-not-merge/* labels
  • The PR does not have the needs-ok-to-test label
  • The PR is mergeable (does not have a needs-rebase label)
  • The PR is approved (has cncf-cla: yes, lgtm, approved labels)
  • The PR is failing tests required for merge

You can:

/retest

@k8s-ci-robot k8s-ci-robot merged commit d766ab8 into kubernetes:master Nov 18, 2021
saschagrunert added a commit to saschagrunert/kubernetes that referenced this pull request Dec 3, 2021
We should not touch the dockershim ahead of removal and therefore
default to `v1alpha2` CRI instead of `v1`.

Partially reverts changes from kubernetes#106501

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
saschagrunert added a commit to saschagrunert/kubernetes that referenced this pull request Dec 3, 2021
We should not touch the dockershim ahead of removal and therefore
default to `v1alpha2` CRI instead of `v1`.

Partially reverts changes from kubernetes#106501

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
@wyuan1704
Copy link

Hi @ehashman, this PR is a great example for migrating CRI v1alpha2 to v1. pkg/kubelet/cri/remote/conversion.go and
something in pkg/kubelet/cri/remote/remote_image.go like determineAPIVersion are the common code for the migration. Do you mind porting those common things to https://github.com/kubernetes/cri-api/tree/master/pkg/apis/runtime?

@liggitt
Copy link
Member

liggitt commented Feb 8, 2022

I wouldn't recommend that… that would immediately attract external callers and remove our ability to easily drop this code when the v1 and v1alpha2 types diverge, which was the plan for this

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/kubelet area/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/network Categorizes an issue or PR as relevant to SIG Network. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants