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

Promote admissionreview to v1 #80231

Merged
merged 5 commits into from
Aug 2, 2019

Conversation

liggitt
Copy link
Member

@liggitt liggitt commented Jul 16, 2019

What this PR does / why we need it:

  • Promotes the AdmissionReview API types to v1 with no schema changes
  • Updates the webhook dispatcher to be able to send/receive v1 AdmissionReview objects
  • Tightens response validation for v1 AdmissionReview objects to verify apiVersion/kind/response.patchType/response.uid
  • Adds integration tests to exercise registering for v1 webhooks receiving/returning v1 AdmissionReview objects

Which issue(s) this PR fixes:
Fixes #79893

Does this PR introduce a user-facing change?:

The `AdmissionReview` API sent to and received from admission webhooks has been promoted to `admission.k8s.io/v1`. Webhooks can specify a preference for receiving `v1` AdmissionReview objects with `admissionReviewVersions: ["v1","v1beta1"]`, and must respond with an API object in the same `apiVersion` they are sent. When webhooks use `admission.k8s.io/v1`, the following additional validation is performed on their responses:
* `response.patch` and `response.patchType` are not permitted from validating admission webhooks
* `apiVersion: "admission.k8s.io/v1"` is required
* `kind: "AdmissionReview"` is required
* `response.uid: "<value of request.uid>"` is required
* `response.patchType: "JSONPatch"` is required (if `response.patch` is set)

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. 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. labels Jul 16, 2019
@liggitt liggitt changed the title WIP - Promote admissionreview to v1 **What type of PR is this?** /kind api-change /kind feature WIP - Promote admissionreview to v1 Jul 16, 2019
@liggitt
Copy link
Member Author

liggitt commented Jul 16, 2019

/kind feature
/kind api-change
/priority important-soon
/sig api-machinery
/milestone v1.16

@k8s-ci-robot k8s-ci-robot added this to the v1.16 milestone Jul 16, 2019
@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. area/apiserver area/kubectl area/test sig/auth Categorizes an issue or PR as relevant to SIG Auth. sig/cli Categorizes an issue or PR as relevant to SIG CLI. sig/testing Categorizes an issue or PR as relevant to SIG Testing. approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jul 16, 2019
@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jul 16, 2019
@liggitt
Copy link
Member Author

liggitt commented Aug 1, 2019

@liggitt
Copy link
Member Author

liggitt commented Aug 1, 2019

/hold
for API ack from @smarterclayton

@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 Aug 1, 2019
@smarterclayton
Copy link
Contributor

API LGTM

/approve
/lgtm

Unhold at your leisure

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 1, 2019
@jpbetz
Copy link
Contributor

jpbetz commented Aug 1, 2019

/lgtm

@liggitt
Copy link
Member Author

liggitt commented Aug 1, 2019

/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 Aug 1, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: liggitt, smarterclayton

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 merged commit c981c65 into kubernetes:master Aug 2, 2019
@liggitt liggitt deleted the admissionreview-v1 branch August 2, 2019 01:29
@roycaihw
Copy link
Member

/area admission-control

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/admission-control area/apiserver area/kubectl area/kubelet area/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API 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/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/auth Categorizes an issue or PR as relevant to SIG Auth. sig/cli Categorizes an issue or PR as relevant to SIG CLI. 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.
Projects
Status: API review completed, 1.16
Development

Successfully merging this pull request may close these issues.

Promote AdmissionReview API to v1
6 participants