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

[WIP] Add a Canonical RuntimeClass CRD #73828

Open
wants to merge 3 commits into
base: master
from

Conversation

@tallclair
Copy link
Member

tallclair commented Feb 7, 2019

What type of PR is this?
/kind cleanup

What this PR does / why we need it:
A statically typed API should have an official CRD that is kept in sync with that API. This PR adds that canonical CRD definition, as well as a binary (go-bindata) version, and adds tests to ensure the various CRD sources are kept in sync with the typed API.

Does this PR introduce a user-facing change?:

NONE

/sig node
/sig api-machinery
/priority important-soon

/assign @haiyanmeng @caesarxuchao

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

k8s-ci-robot commented Feb 7, 2019

@tallclair: GitHub didn't allow me to assign the following users: haiyanmeng.

Note that only kubernetes members and repo collaborators can be assigned and that issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

What type of PR is this?
/kind cleanup

What this PR does / why we need it:
A statically typed API should have an official CRD that is kept in sync with that API. This PR adds that canonical CRD definition, as well as a binary (go-bindata) version, and adds tests to ensure the various CRD sources are kept in sync with the typed API.

Does this PR introduce a user-facing change?:

NONE

/sig node
/sig api-machinery
/priority important-soon

/assign @haiyanmeng @caesarxuchao

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

This comment has been minimized.

Copy link
Contributor

k8s-ci-robot commented Feb 7, 2019

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: tallclair
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: smarterclayton

If they are not already assigned, you can assign the PR to them by writing /assign @smarterclayton in a comment when ready.

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

@@ -0,0 +1,53 @@
#!/usr/bin/env bash

This comment has been minimized.

@haiyanmeng

haiyanmeng Feb 11, 2019

Contributor

This seems to be mostly the same with https://github.com/kubernetes/kubernetes/blob/master/hack/generate-bindata.sh.

Can we reuse https://github.com/kubernetes/kubernetes/blob/master/hack/generate-bindata.sh somehow?

does node-api need its own generate-bindata.sh?

This comment has been minimized.

@haiyanmeng

haiyanmeng Feb 11, 2019

Contributor

What is the purpose of the generated bindata?

This comment has been minimized.

@tallclair

tallclair Feb 11, 2019

Author Member

Can we reuse https://github.com/kubernetes/kubernetes/blob/master/hack/generate-bindata.sh somehow?

Unfortunately, it's common practice to copy hack/ scripts into related kubernetes repos. The relationship between staging & kubernetes/kubernetes is confusing, but my understanding is that it should be functional as an independent repo.

This comment has been minimized.

@tallclair

tallclair Feb 11, 2019

Author Member

What is the purpose of the generated bindata?

The bindata essentially packages raw data files into go code so that they're included as part of the go binary. This way, the CRD can be included simply by importing this package.


// RuntimeClassCRD returns the CRD defining the node-api.k8s.io/RuntimeClass resource.
func RuntimeClassCRD() (*apiextensionsv1beta1.CustomResourceDefinition, error) {
raw, err := pkgApisNodeCrdRuntimeclass_crdYamlBytes()

This comment has been minimized.

@haiyanmeng

haiyanmeng Feb 11, 2019

Contributor

the definition of pkgApisNodeCrdRuntimeclass_crdYamlBytes seems to be missing.

This comment has been minimized.

@tallclair

tallclair Feb 11, 2019

Author Member

It's defined in the generated bindata.go file.

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

k8s-ci-robot commented Feb 11, 2019

@tallclair: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-kubernetes-godeps 8e828f3 link /test pull-kubernetes-godeps
pull-kubernetes-verify 8e828f3 link /test pull-kubernetes-verify
pull-kubernetes-e2e-gce 8e828f3 link /test pull-kubernetes-e2e-gce

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.

@tallclair tallclair changed the title Add a Canonical RuntimeClass CRD [WIP] Add a Canonical RuntimeClass CRD Feb 14, 2019

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

k8s-ci-robot commented Feb 17, 2019

@tallclair: PR needs rebase.

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