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

Add CRI v1 proto #96387

Merged
merged 1 commit into from
Nov 12, 2020
Merged

Add CRI v1 proto #96387

merged 1 commit into from
Nov 12, 2020

Conversation

mrunalp
Copy link
Contributor

@mrunalp mrunalp commented Nov 9, 2020

@derekwaynecarr @SergeyKanzhelev @saschagrunert @mikebrow

Signed-off-by: Mrunal Patel mpatel@redhat.com

What type of PR is this?
/kind feature

What this PR does / why we need it:

Add CRI v1beta proto and generated code.
We need both v1beta1 and v1alpha2 side by side so that
containerd and CRI-O could be updated. Once the runtimes
are updated and in the CI, we can switch the kubelet
to use v1beta1.

Does this PR introduce a user-facing change?:

None

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

None

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/feature Categorizes issue or PR as related to a new feature. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. 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. labels Nov 9, 2020
@k8s-ci-robot
Copy link
Contributor

@mrunalp: This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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.

@k8s-ci-robot k8s-ci-robot added needs-priority Indicates a PR lacks a `priority/foo` label and requires one. area/kubelet sig/node Categorizes an issue or PR as relevant to SIG Node. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Nov 9, 2020
function generate_code() {
RUNTIME_API_VERSION="$1"
KUBE_REMOTE_RUNTIME_PATH="${KUBE_REMOTE_RUNTIME_ROOT}/${RUNTIME_API_VERSION}"
PATH="${gogopath}:${PATH}" \
Copy link
Member

Choose a reason for hiding this comment

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

not sure how it works in bash. PATH is a global variable. first call will set the first version. Second - will have the first version already set and add a new runtime to the end. Would it pick up the second runtime at all?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moving out of the function.

@@ -0,0 +1,55 @@
/*
Copyright 2016 The Kubernetes Authors.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Copyright 2016 The Kubernetes Authors.
Copyright 2020 The Kubernetes Authors.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@@ -0,0 +1,1338 @@
/*
Copyright 2018 The Kubernetes Authors.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Copyright 2018 The Kubernetes Authors.
Copyright 2020 The Kubernetes Authors.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

//
// WARNING: Log management and how kubelet should interface with the
// container logs are under active discussion in
// https://issues.k8s.io/24677. There *may* be future change of direction
Copy link
Member

Choose a reason for hiding this comment

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

this issue is closed. Should we keep the warning around?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Dropped the warning.

// If the runtime handler is unknown, this request should be rejected. An
// empty string should select the default handler, equivalent to the
// behavior before this feature was added.
// See https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// See https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md
// See https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class/README.md

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed, thanks!


// LinuxContainerResources specifies Linux specific configuration for
// resources.
// TODO: Consider using Resources from opencontainers/runtime-spec/specs-go
Copy link
Member

Choose a reason for hiding this comment

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

Are we keeping TODO in beta?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Dropped the TODO.


// Variables for interactive containers, these have very specialized
// use-cases (e.g. debugging).
// TODO: Determine if we need to continue supporting these fields that are
Copy link
Member

Choose a reason for hiding this comment

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

should we keep this TODO in beta?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, dropped.

// StopContainer stops a running container with a grace period (i.e., timeout).
// This call is idempotent, and must not return an error if the container has
// already been stopped.
// TODO: what must the runtime do after the grace period is reached?
Copy link
Member

Choose a reason for hiding this comment

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

should we keep TODO in beta?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Replaced TODO by a line describing that the runtime should kill on grace period expiration.

@SergeyKanzhelev
Copy link
Member

/lgtm
/retest

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

thx for updating/removing the todo's I had a todo to do that and got swamped :-)

@dims
Copy link
Member

dims commented Nov 10, 2020

/milestone v1.20

@k8s-ci-robot k8s-ci-robot added this to the v1.20 milestone Nov 10, 2020
@mrunalp
Copy link
Contributor Author

mrunalp commented Nov 10, 2020

/hold we are discussing some options in sig-node to potentially rename the package to v1 to avoid multiple hops.

@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 10, 2020
@cpuguy83
Copy link
Contributor

This seems a little rushed to try and pull this off for v1.20. What's the benefit in doing it now vs waiting for v1.21?

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 10, 2020
@mrunalp mrunalp changed the title Add CRI v1beta1 proto Add CRI v1 proto Nov 10, 2020
Add CRI v1 proto and generated code.
We need both v1 and v1alpha2 side by side so that
containerd and CRI-O could be updated. Once the runtimes
are updated and in the CI, we can switch the kubelet
to use v1 in 1.21 .

We are jumping to v1, so we have to avoid multiple hops to get
to GA. The package could stay v1 and declare CRI support to
be at beta and eventually GA.

Signed-off-by: Mrunal Patel <mpatel@redhat.com>
@mrunalp
Copy link
Contributor Author

mrunalp commented Nov 10, 2020

/retest

@mrunalp
Copy link
Contributor Author

mrunalp commented Nov 10, 2020

This seems a little rushed to try and pull this off for v1.20. What's the benefit in doing it now vs waiting for v1.21?

We need a cycle to allow runtimes to support v1 before they can be brought back into CI and change the kubelet code. See - #96325 (comment)

@mrunalp
Copy link
Contributor Author

mrunalp commented Nov 10, 2020

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 10, 2020
@cpuguy83
Copy link
Contributor

Thanks @mrunalp, that makes sense then.

Copy link
Member

@saschagrunert saschagrunert left a comment

Choose a reason for hiding this comment

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

/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 11, 2020
@dims
Copy link
Member

dims commented Nov 11, 2020

/approve
/hold

@mrunalp please remove hold when you are ready

@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 11, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dims, mrunalp, saschagrunert

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 11, 2020
@mrunalp
Copy link
Contributor Author

mrunalp commented Nov 11, 2020

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 11, 2020
@k8s-ci-robot k8s-ci-robot merged commit 9d2a226 into kubernetes:master Nov 12, 2020
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 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. 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. release-note-none Denotes a PR that doesn't merit a release note. sig/node Categorizes an issue or PR as relevant to SIG Node. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants