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 GroupVersionKind extension to OpenAPI operations #44787

Merged
merged 4 commits into from
May 12, 2017

Conversation

mbohlool
Copy link
Contributor

@mbohlool mbohlool commented Apr 22, 2017

Fixes: #43249
ref: #34254

Added Group/Version/Kind and Action extension to OpenAPI Operations 

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 22, 2017
@k8s-reviewable
Copy link

This change is Reviewable

@pwittrock
Copy link
Member

Woot! This is awesome.

@@ -43,7 +43,8 @@ import (
)

const (
ROUTE_META_GVK = "x-kuberentes-group-version-kind"
ROUTE_META_GVK = "x-kuberentes-group-version-kind"
ROUTE_META_ACTION = "x-kuberentes-action"
Copy link
Member

Choose a reason for hiding this comment

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

s/kuberentes/kubernetes/g?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@@ -800,6 +801,7 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag
}
for _, route := range routes {
route.Metadata(ROUTE_META_GVK, reqScope.Kind)
route.Metadata(ROUTE_META_ACTION, action.Verb)
Copy link
Member

Choose a reason for hiding this comment

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

seems like this should match the verbs used by authorization and published in discovery

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure what you mean, where can I find those verbs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@liggitt friendly ping. Can you explain what you mean here?

@mbohlool mbohlool changed the title WIP: Add GroupVersionKind extension to OpenAPI operations Add GroupVersionKind extension to OpenAPI operations Apr 26, 2017
@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 27, 2017
@k8s-github-robot k8s-github-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 27, 2017
@mbohlool mbohlool requested a review from lavalamp April 27, 2017 18:48
@mbohlool mbohlool added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-label-needed labels Apr 27, 2017
@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Apr 28, 2017

@mbohlool: The following test(s) failed:

Test name Commit Details Rerun command
Jenkins GCI GCE e2e 0d630b9 link @k8s-bot gci gce e2e test this

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.

@pwittrock
Copy link
Member

Expected test failures?

@mbohlool
Copy link
Contributor Author

mbohlool commented May 1, 2017

It constantly need rebase :( I will do a final rebase-fix tests after this got LGTM.

@mbohlool mbohlool added this to the v1.7 milestone May 1, 2017
@lavalamp lavalamp assigned lavalamp and unassigned mbohlool May 2, 2017
@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 2, 2017
k8s-github-robot pushed a commit that referenced this pull request May 5, 2017
Automatic merge from submit-queue (batch tested with PRs 43006, 45305, 45390, 45412, 45392)

Update go-restful dependency

This is required by #44787. But because both this and the changes in 44787 need constant rebase, I am trying to get this one in separately to make less rebases.

The change is only a dependency update.
@k8s-github-robot k8s-github-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 6, 2017
@mbohlool
Copy link
Contributor Author

mbohlool commented May 7, 2017

@lavalamp This PR is ready for review (tests are finally green after submitting godep update separately).

"x-kubernetes-group-version-kind": {
"Group": "",
"Version": "v1",
"Kind": "ConfigMap"
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be ConfigMapList?

Copy link
Member

Choose a reason for hiding this comment

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

The kind is not the response type, it is the resource Kind that this operation is for. So I think the Kind is correct here (operation List, resource ConfigMap). The response type is included in the non-extension portion of the API operation.

@lavalamp
Copy link
Member

lavalamp commented May 8, 2017

Just the one comment. Might not be a bad idea to also state the kind of the elements of lists?

@pwittrock
Copy link
Member

@lavalamp The List kind is present in the operation response kind. Is this sufficient, or were you linking of some other semantic??

@mbohlool
Copy link
Contributor Author

mbohlool commented May 9, 2017

I agree with @pwittrock, gvk extension is not body or response type (those are part of normal spec), they are the API object this operation operating on. These extensions are good for create category of operations on API Objects (e.g. Pod operations may accept or return Pod, PodList, etc.)

@pwittrock
Copy link
Member

Not sure what this new GH approval feature is. LGTM, will defer to Daniel for final approval.

@lavalamp
Copy link
Member

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 11, 2017
@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lavalamp, mbohlool

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot k8s-github-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 11, 2017
@k8s-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 45684, 45266, 45669, 44787, 44984)

@k8s-github-robot k8s-github-robot merged commit d437703 into kubernetes:master May 12, 2017
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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

8 participants