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

apiserver: wire OpenAPI into sample-apiserver #79843

Merged
merged 7 commits into from Jul 13, 2019

Conversation

@sttts
Copy link
Contributor

commented Jul 5, 2019

This PR add OpenAPI generator to code-generator scripts, and generated and wires the spec in sample-apiserver.

Note: this intentionally checks in the codegen and sample-apiserver spec because the former is a good place to track changes to tooling and the later because an (compilable) example needs it to be checked in. The reason we don't do that at the top-level is because API PRs often conflict at the spec file. This is not the case for codegen and sample-apiserver.

This is also prerequisite for proper separation of the delegated API server specs in #74133, which will also clean up technical debt we took when adding CRD openapi publishing, to create the apiextensions-apiserver spec.

The sample-apiserver gains support for OpenAPI v2 spec serving at `/openapi/v2`.

The `generate-internal-groups.sh` script in k8s.io/code-generator will generate OpenAPI definitions by default in `pkg/generated/openapi`. Additional API group dependencies can be added via `OPENAPI_EXTRA_PACKAGES=<group>/<version> <group2>/<version2>...`.

@k8s-ci-robot k8s-ci-robot requested review from fejta and lavalamp Jul 5, 2019

@sttts sttts force-pushed the sttts:sttts-sample-apiserver-openapi branch from fb82192 to effa450 Jul 5, 2019

@sttts sttts changed the title apiserver: wire OpenAPI generation for delegated server apiserver: wire OpenAPI into sample-apiserver Jul 5, 2019

@sttts

This comment has been minimized.

Copy link
Contributor Author

commented Jul 5, 2019

/assign @cblecker

For the build/ change.

@sttts

This comment has been minimized.

Copy link
Contributor Author

commented Jul 5, 2019

/assign @nikhita

for the sample-apiserver and code-gen change.

@sttts sttts force-pushed the sttts:sttts-sample-apiserver-openapi branch from effa450 to f9ad2a7 Jul 5, 2019

@yue9944882
Copy link
Member

left a comment

LGTM, i didn't see any openapi marker tags in the example models tho...

@sttts sttts force-pushed the sttts:sttts-sample-apiserver-openapi branch from f9ad2a7 to 9492371 Jul 5, 2019

@sttts

This comment has been minimized.

Copy link
Contributor Author

commented Jul 5, 2019

@yue9944882 because we had them already there. But dysfunctional.

@sttts sttts force-pushed the sttts:sttts-sample-apiserver-openapi branch from 9492371 to e6b5b96 Jul 5, 2019

@cblecker

This comment has been minimized.

Copy link
Member

commented Jul 12, 2019

Reviewed and mostly looks sane. One open question, otherwise LGTM.

@sttts sttts force-pushed the sttts:sttts-sample-apiserver-openapi branch from a2dcbd6 to 6984173 Jul 12, 2019

@k8s-ci-robot k8s-ci-robot added needs-rebase and removed lgtm labels Jul 12, 2019

@sttts sttts force-pushed the sttts:sttts-sample-apiserver-openapi branch from 6984173 to d015cfd Jul 12, 2019

@liggitt

This comment has been minimized.

Copy link
Member

commented Jul 12, 2019

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm label Jul 12, 2019

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

commented Jul 12, 2019

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fejta, liggitt, sttts

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

@fejta-bot

This comment has been minimized.

Copy link

commented Jul 12, 2019

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

mvladev and others added some commits Jun 25, 2018

code-generator: call openapi-gen from generate-internal-groups.sh
OpenAPI schema is a requirement for API Servers to be used with API Aggregation
and for kubectl to talk to them.
openapi: commit low-change code-gen+sample-apiserver specs
The former is used as a smoke test to notice changes. The latter is supposed to be published and therefore must be commited. Both do not change much.

@sttts sttts force-pushed the sttts:sttts-sample-apiserver-openapi branch from d015cfd to 406fbf7 Jul 12, 2019

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

commented Jul 12, 2019

New changes are detected. LGTM label has been removed.

@k8s-ci-robot k8s-ci-robot removed the lgtm label Jul 12, 2019

@sttts sttts added the lgtm label Jul 12, 2019

@sttts

This comment has been minimized.

Copy link
Contributor Author

commented Jul 12, 2019

Rebased on changed ObjectMeta comment.

@spiffxp

This comment has been minimized.

Copy link
Member

commented Jul 13, 2019

/lgtm

@k8s-ci-robot k8s-ci-robot merged commit 6cd0392 into kubernetes:master Jul 13, 2019

23 checks passed

cla/linuxfoundation sttts authorized
Details
pull-kubernetes-bazel-build Job succeeded.
Details
pull-kubernetes-bazel-test Job succeeded.
Details
pull-kubernetes-conformance-image-test Skipped.
pull-kubernetes-cross Job succeeded.
Details
pull-kubernetes-dependencies Job succeeded.
Details
pull-kubernetes-e2e-gce Job succeeded.
Details
pull-kubernetes-e2e-gce-100-performance Job succeeded.
Details
pull-kubernetes-e2e-gce-csi-serial Skipped.
pull-kubernetes-e2e-gce-device-plugin-gpu Job succeeded.
Details
pull-kubernetes-e2e-gce-iscsi Skipped.
pull-kubernetes-e2e-gce-iscsi-serial Skipped.
pull-kubernetes-e2e-gce-storage-slow Skipped.
pull-kubernetes-godeps Skipped.
pull-kubernetes-integration Job succeeded.
Details
pull-kubernetes-kubemark-e2e-gce-big Job succeeded.
Details
pull-kubernetes-local-e2e Skipped.
pull-kubernetes-node-e2e Job succeeded.
Details
pull-kubernetes-node-e2e-containerd Job succeeded.
Details
pull-kubernetes-typecheck Job succeeded.
Details
pull-kubernetes-verify Job succeeded.
Details
pull-publishing-bot-validate Job succeeded.
Details
tide In merge pool.
Details

@sttts sttts deleted the sttts:sttts-sample-apiserver-openapi branch Jul 13, 2019

@liggitt liggitt added this to the v1.16 milestone Aug 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.