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

Admission response alt #55829

Merged
merged 1 commit into from
Nov 18, 2017

Conversation

cheftako
Copy link
Member

@cheftako cheftako commented Nov 16, 2017

What this PR does / why we need it: This reflects the imperative nature of AdmissionReview. It adds AdmissionRequest and AdmissionResponse in place of status/spec. The AdmissionResponse the allows the mutating webhook to send back a json path with the mutated version of the requested object.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Ref #kubernetes/enhancements#492

Special notes for your reviewer:Port of caesarxuchao's fix with outcome of #55729

Release note:

action-required: please update your admission webhook to use the latest [Admission API](https://github.com/kubernetes/api/tree/master/admission).

`admission/v1alpha1#AdmissionReview` now contains `AdmissionRequest` and `AdmissionResponse`. `AdmissionResponse` includes a `Patch` field to allow mutating webhooks to send json patch to the apiserver.

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Nov 16, 2017
@k8s-github-robot k8s-github-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API labels Nov 16, 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 Nov 16, 2017
@cheftako cheftako force-pushed the admissionResponseAlt branch 2 times, most recently from 767883b to 49de924 Compare November 16, 2017 02:32
@cheftako
Copy link
Member Author

/test pull-kubernetes-e2e-gce

Copy link
Member

@lavalamp lavalamp left a comment

Choose a reason for hiding this comment

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

Just a few thoughts.

// AdmissionRequest describes the admission.Attributes for the admission request.
type AdmissionRequest struct {
// UID is an identifier for the individual request. It allows us to distinguish instances of requests which are
// otherwise identical (parallel requests, requests when earlier requests did not modify etc)
Copy link
Member

Choose a reason for hiding this comment

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

// It is suitable for correlating log entries between the webhook and apiserver, for either auditing or debugging.

?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

Copy link
Member

Choose a reason for hiding this comment

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

Is it unique to the webhook request or to the originating user request (would two webhooks get the same uid for calls resulting from a single user request, or would they each get their own unique uid)?

Copy link
Member

Choose a reason for hiding this comment

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

They should each get their own, I think--if we did a UID per request then we'd probably also want a nonce or something here.

Copy link
Member

Choose a reason for hiding this comment

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

sounds ok, should clarify that in the field doc

Patch []byte
// PatchType indicates the form the Patch will take. Currently we only support "JSONPatch".
// +optional
PatchType string
Copy link
Member

Choose a reason for hiding this comment

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

We often make special types for this, and define constants.

type PatchType string

const (
  PatchTypeJSONPatch PatchType = "JSONPatch"
)

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

// AdmissionReviewStatus describes the status of the admission request.
type AdmissionReviewStatus struct {
// AdmissionResponse describes an admission response.
type AdmissionResponse struct {
// Allowed indicates whether or not the admission request was permitted.
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 add UID here too?

Copy link
Member Author

Choose a reason for hiding this comment

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

I feel that the UID belongs with the request of the metadata about the request (UserInfo, Operation, Namespace etc). If we are not copying them into the response then it doesn't feel right to copy just the UID in. (If we want to abstract them into a type and reflect that in both request/response, I would be fine with that)

Copy link
Member

Choose a reason for hiding this comment

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

If we are not copying them into the response then it doesn't feel right to copy just the UID in.

Not sure I follow... the point of the uid is to identify the unique request, right? If the point of echoing is to bind the response to a particular request, the uid seems like the right thing to copy (it implies the rest of the request fields)

Copy link
Member Author

Choose a reason for hiding this comment

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

So from the discussions I was in, it seems we want things like UserInfo, Operation, Namespace coming back from the Webhook to the KAS (Just like we want the UID coming back). I'm not objecting to putting the UID in the Response field, so much as saying that I think all the fields want round tripping should be dealt with consistently. So we should either leave all of the in the "Request" field for the return trip (so the KAS can confirm the request the webhook operated on) or we should have the webhook copy all of the fields we want in the return trip into the "Response" object. At that point I would suggest we just package them up to make copying them over a but easier and tidier.

@caesarxuchao caesarxuchao assigned lavalamp and unassigned yifan-gu and pwittrock Nov 16, 2017
// Since this admission controller is non-mutating the webhook should avoid setting this in its response to avoid the
// cost of deserializing it.
// Request describes the attributes for the admission request.
Request AdmissionRequest `json:"request,omitempty" protobuf:"bytes,1,opt,name=request"`
Copy link
Member

Choose a reason for hiding this comment

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

Should Request be optional?

Do you make it required because the UID/Kind/Resource are required even if the AdmissionReview is a response from the webhook?

Copy link
Member Author

Choose a reason for hiding this comment

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

I made it non optional so as you suggest fields like UID/Kind/Resource are present on the response and could be validated by the KAS.

Copy link
Member

@liggitt liggitt Nov 17, 2017

Choose a reason for hiding this comment

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

Things required in the response should probably be in the response portion of the object, and the request optional to echo. The unique identifier makes particular sense.

// Name is the name of the object as presented in the request. On a CREATE operation, the client may omit name and
// rely on the server to generate the name. If that is the case, this method will return the empty string.
// +optional
Name string
Copy link
Member

Choose a reason for hiding this comment

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

This is violating our API convention that the empty value of an optional field has to be nil. But I guess we don't care anymore since there are so many violations in our code base.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is reflecting the optionality of what was already in the API. I agree we need to come up with a consistent story on what and when we are going to do about our large base of optional/non-pointer fields.

Copy link
Member

Choose a reason for hiding this comment

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

"If that is the case, this method will return the empty string." ...so, it's not really optional, is it?

@cheftako cheftako force-pushed the admissionResponseAlt branch 2 times, most recently from f448fea to 281563a Compare November 16, 2017 22:15
@cheftako
Copy link
Member Author

/assign @deads2k @liggitt

Patch []byte
// PatchType indicates the form the Patch will take. Currently we only support "JSONPatch".
// +optional
PatchType PatchType
Copy link
Member

Choose a reason for hiding this comment

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

Could you make this field a pointer? Validating webhooks will leave this field nil.

Also could you add validation code to check that this field is either nil or equal to PatchTypeJSONPatch?

@cheftako
Copy link
Member Author

/test pull-kubernetes-bazel-build

// Status is filled in by the webhook and indicates whether the admission request should be permitted.
// +optional
Status AdmissionReviewStatus `json:"status,omitempty" protobuf:"bytes,2,opt,name=status"`
Response AdmissionResponse `json:"response,omitempty" protobuf:"bytes,2,opt,name=response"`
Copy link
Member

@liggitt liggitt Nov 17, 2017

Choose a reason for hiding this comment

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

The field name and protobuf tag changes throughout mean any existing webhook impl or protobuf client cannot correctly decode the content.

I think that's acceptable given the API and feature was alpha, but worth a check against the deprecation policy,

Copy link
Member

Choose a reason for hiding this comment

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

Yeah I think it should be OK.

@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 17, 2017
sttts pushed a commit to sttts/apiextensions-apiserver that referenced this pull request Nov 18, 2017
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Adding mutating webhook admission plugin

Ref #kubernetes/enhancements#492

I made a change to the API to plumb the `Patch` into the response. I'll rebase onto the actual API once kubernetes/kubernetes#55829 is merged.

We should update the release notes to point to the user docs when we have any.

```release-note
Added mutation supports to admission webhooks.
```

TODO:
- [ ] update test image to v6 after #55829 is merged
- [ ] rename the GenericAdmissionWebhook to ValidatingAdmissionWebhook
- [ ] reduce json marshal/unmarshal roundtrip: kubernetes/kubernetes#54892 (comment)
- [ ] move the matching function to a common package that validating and mutating webhooks can both import.
- [ ] handle namespace GET failure gracefully for fail open webhook?

Kubernetes-commit: 638add6ddfb6d2f9fbc3224d0ce1e8cab9aa3049
sttts pushed a commit to sttts/apiserver that referenced this pull request Nov 27, 2017
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Adding mutating webhook admission plugin

Ref #kubernetes/enhancements#492

I made a change to the API to plumb the `Patch` into the response. I'll rebase onto the actual API once kubernetes/kubernetes#55829 is merged.

We should update the release notes to point to the user docs when we have any.

```release-note
Added mutation supports to admission webhooks.
```

TODO: 
- [ ] update test image to v6 after #55829 is merged
- [ ] rename the GenericAdmissionWebhook to ValidatingAdmissionWebhook
- [ ] reduce json marshal/unmarshal roundtrip: kubernetes/kubernetes#54892 (comment)
- [ ] move the matching function to a common package that validating and mutating webhooks can both import.
- [ ] handle namespace GET failure gracefully for fail open webhook?

Kubernetes-commit: 638add6ddfb6d2f9fbc3224d0ce1e8cab9aa3049
sttts pushed a commit to sttts/kube-aggregator that referenced this pull request Nov 27, 2017
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Adding mutating webhook admission plugin

Ref #kubernetes/enhancements#492

I made a change to the API to plumb the `Patch` into the response. I'll rebase onto the actual API once kubernetes/kubernetes#55829 is merged.

We should update the release notes to point to the user docs when we have any.

```release-note
Added mutation supports to admission webhooks.
```

TODO:
- [ ] update test image to v6 after #55829 is merged
- [ ] rename the GenericAdmissionWebhook to ValidatingAdmissionWebhook
- [ ] reduce json marshal/unmarshal roundtrip: kubernetes/kubernetes#54892 (comment)
- [ ] move the matching function to a common package that validating and mutating webhooks can both import.
- [ ] handle namespace GET failure gracefully for fail open webhook?

Kubernetes-commit: 638add6ddfb6d2f9fbc3224d0ce1e8cab9aa3049
sttts pushed a commit to sttts/sample-apiserver that referenced this pull request Nov 27, 2017
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Adding mutating webhook admission plugin

Ref #kubernetes/enhancements#492

I made a change to the API to plumb the `Patch` into the response. I'll rebase onto the actual API once kubernetes/kubernetes#55829 is merged.

We should update the release notes to point to the user docs when we have any.

```release-note
Added mutation supports to admission webhooks.
```

TODO:
- [ ] update test image to v6 after #55829 is merged
- [ ] rename the GenericAdmissionWebhook to ValidatingAdmissionWebhook
- [ ] reduce json marshal/unmarshal roundtrip: kubernetes/kubernetes#54892 (comment)
- [ ] move the matching function to a common package that validating and mutating webhooks can both import.
- [ ] handle namespace GET failure gracefully for fail open webhook?

Kubernetes-commit: 638add6ddfb6d2f9fbc3224d0ce1e8cab9aa3049
sttts pushed a commit to sttts/apiextensions-apiserver that referenced this pull request Nov 27, 2017
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Adding mutating webhook admission plugin

Ref #kubernetes/enhancements#492

I made a change to the API to plumb the `Patch` into the response. I'll rebase onto the actual API once kubernetes/kubernetes#55829 is merged.

We should update the release notes to point to the user docs when we have any.

```release-note
Added mutation supports to admission webhooks.
```

TODO:
- [ ] update test image to v6 after #55829 is merged
- [ ] rename the GenericAdmissionWebhook to ValidatingAdmissionWebhook
- [ ] reduce json marshal/unmarshal roundtrip: kubernetes/kubernetes#54892 (comment)
- [ ] move the matching function to a common package that validating and mutating webhooks can both import.
- [ ] handle namespace GET failure gracefully for fail open webhook?

Kubernetes-commit: 638add6ddfb6d2f9fbc3224d0ce1e8cab9aa3049
sttts pushed a commit to sttts/apiserver that referenced this pull request Nov 28, 2017
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Adding mutating webhook admission plugin

Ref #kubernetes/enhancements#492

I made a change to the API to plumb the `Patch` into the response. I'll rebase onto the actual API once kubernetes/kubernetes#55829 is merged.

We should update the release notes to point to the user docs when we have any.

```release-note
Added mutation supports to admission webhooks.
```

TODO: 
- [ ] update test image to v6 after #55829 is merged
- [ ] rename the GenericAdmissionWebhook to ValidatingAdmissionWebhook
- [ ] reduce json marshal/unmarshal roundtrip: kubernetes/kubernetes#54892 (comment)
- [ ] move the matching function to a common package that validating and mutating webhooks can both import.
- [ ] handle namespace GET failure gracefully for fail open webhook?

Kubernetes-commit: 638add6ddfb6d2f9fbc3224d0ce1e8cab9aa3049
sttts pushed a commit to sttts/kube-aggregator that referenced this pull request Nov 28, 2017
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Adding mutating webhook admission plugin

Ref #kubernetes/enhancements#492

I made a change to the API to plumb the `Patch` into the response. I'll rebase onto the actual API once kubernetes/kubernetes#55829 is merged.

We should update the release notes to point to the user docs when we have any.

```release-note
Added mutation supports to admission webhooks.
```

TODO:
- [ ] update test image to v6 after #55829 is merged
- [ ] rename the GenericAdmissionWebhook to ValidatingAdmissionWebhook
- [ ] reduce json marshal/unmarshal roundtrip: kubernetes/kubernetes#54892 (comment)
- [ ] move the matching function to a common package that validating and mutating webhooks can both import.
- [ ] handle namespace GET failure gracefully for fail open webhook?

Kubernetes-commit: 638add6ddfb6d2f9fbc3224d0ce1e8cab9aa3049
sttts pushed a commit to sttts/sample-apiserver that referenced this pull request Nov 28, 2017
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Adding mutating webhook admission plugin

Ref #kubernetes/enhancements#492

I made a change to the API to plumb the `Patch` into the response. I'll rebase onto the actual API once kubernetes/kubernetes#55829 is merged.

We should update the release notes to point to the user docs when we have any.

```release-note
Added mutation supports to admission webhooks.
```

TODO:
- [ ] update test image to v6 after #55829 is merged
- [ ] rename the GenericAdmissionWebhook to ValidatingAdmissionWebhook
- [ ] reduce json marshal/unmarshal roundtrip: kubernetes/kubernetes#54892 (comment)
- [ ] move the matching function to a common package that validating and mutating webhooks can both import.
- [ ] handle namespace GET failure gracefully for fail open webhook?

Kubernetes-commit: 638add6ddfb6d2f9fbc3224d0ce1e8cab9aa3049
sttts pushed a commit to sttts/apiextensions-apiserver that referenced this pull request Nov 28, 2017
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Adding mutating webhook admission plugin

Ref #kubernetes/enhancements#492

I made a change to the API to plumb the `Patch` into the response. I'll rebase onto the actual API once kubernetes/kubernetes#55829 is merged.

We should update the release notes to point to the user docs when we have any.

```release-note
Added mutation supports to admission webhooks.
```

TODO:
- [ ] update test image to v6 after #55829 is merged
- [ ] rename the GenericAdmissionWebhook to ValidatingAdmissionWebhook
- [ ] reduce json marshal/unmarshal roundtrip: kubernetes/kubernetes#54892 (comment)
- [ ] move the matching function to a common package that validating and mutating webhooks can both import.
- [ ] handle namespace GET failure gracefully for fail open webhook?

Kubernetes-commit: 638add6ddfb6d2f9fbc3224d0ce1e8cab9aa3049
sttts pushed a commit to sttts/apiserver that referenced this pull request Nov 28, 2017
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Adding mutating webhook admission plugin

Ref #kubernetes/enhancements#492

I made a change to the API to plumb the `Patch` into the response. I'll rebase onto the actual API once kubernetes/kubernetes#55829 is merged.

We should update the release notes to point to the user docs when we have any.

```release-note
Added mutation supports to admission webhooks.
```

TODO: 
- [ ] update test image to v6 after #55829 is merged
- [ ] rename the GenericAdmissionWebhook to ValidatingAdmissionWebhook
- [ ] reduce json marshal/unmarshal roundtrip: kubernetes/kubernetes#54892 (comment)
- [ ] move the matching function to a common package that validating and mutating webhooks can both import.
- [ ] handle namespace GET failure gracefully for fail open webhook?

Kubernetes-commit: 638add6ddfb6d2f9fbc3224d0ce1e8cab9aa3049
sttts pushed a commit to sttts/kube-aggregator that referenced this pull request Nov 28, 2017
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Adding mutating webhook admission plugin

Ref #kubernetes/enhancements#492

I made a change to the API to plumb the `Patch` into the response. I'll rebase onto the actual API once kubernetes/kubernetes#55829 is merged.

We should update the release notes to point to the user docs when we have any.

```release-note
Added mutation supports to admission webhooks.
```

TODO:
- [ ] update test image to v6 after #55829 is merged
- [ ] rename the GenericAdmissionWebhook to ValidatingAdmissionWebhook
- [ ] reduce json marshal/unmarshal roundtrip: kubernetes/kubernetes#54892 (comment)
- [ ] move the matching function to a common package that validating and mutating webhooks can both import.
- [ ] handle namespace GET failure gracefully for fail open webhook?

Kubernetes-commit: 638add6ddfb6d2f9fbc3224d0ce1e8cab9aa3049
sttts pushed a commit to sttts/sample-apiserver that referenced this pull request Nov 28, 2017
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Adding mutating webhook admission plugin

Ref #kubernetes/enhancements#492

I made a change to the API to plumb the `Patch` into the response. I'll rebase onto the actual API once kubernetes/kubernetes#55829 is merged.

We should update the release notes to point to the user docs when we have any.

```release-note
Added mutation supports to admission webhooks.
```

TODO:
- [ ] update test image to v6 after #55829 is merged
- [ ] rename the GenericAdmissionWebhook to ValidatingAdmissionWebhook
- [ ] reduce json marshal/unmarshal roundtrip: kubernetes/kubernetes#54892 (comment)
- [ ] move the matching function to a common package that validating and mutating webhooks can both import.
- [ ] handle namespace GET failure gracefully for fail open webhook?

Kubernetes-commit: 638add6ddfb6d2f9fbc3224d0ce1e8cab9aa3049
sttts pushed a commit to sttts/apiextensions-apiserver that referenced this pull request Nov 28, 2017
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Adding mutating webhook admission plugin

Ref #kubernetes/enhancements#492

I made a change to the API to plumb the `Patch` into the response. I'll rebase onto the actual API once kubernetes/kubernetes#55829 is merged.

We should update the release notes to point to the user docs when we have any.

```release-note
Added mutation supports to admission webhooks.
```

TODO:
- [ ] update test image to v6 after #55829 is merged
- [ ] rename the GenericAdmissionWebhook to ValidatingAdmissionWebhook
- [ ] reduce json marshal/unmarshal roundtrip: kubernetes/kubernetes#54892 (comment)
- [ ] move the matching function to a common package that validating and mutating webhooks can both import.
- [ ] handle namespace GET failure gracefully for fail open webhook?

Kubernetes-commit: 638add6ddfb6d2f9fbc3224d0ce1e8cab9aa3049
sttts pushed a commit to sttts/apiserver that referenced this pull request Nov 28, 2017
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Adding mutating webhook admission plugin

Ref #kubernetes/enhancements#492

I made a change to the API to plumb the `Patch` into the response. I'll rebase onto the actual API once kubernetes/kubernetes#55829 is merged.

We should update the release notes to point to the user docs when we have any.

```release-note
Added mutation supports to admission webhooks.
```

TODO: 
- [ ] update test image to v6 after #55829 is merged
- [ ] rename the GenericAdmissionWebhook to ValidatingAdmissionWebhook
- [ ] reduce json marshal/unmarshal roundtrip: kubernetes/kubernetes#54892 (comment)
- [ ] move the matching function to a common package that validating and mutating webhooks can both import.
- [ ] handle namespace GET failure gracefully for fail open webhook?

Kubernetes-commit: 638add6ddfb6d2f9fbc3224d0ce1e8cab9aa3049
sttts pushed a commit to sttts/kube-aggregator that referenced this pull request Nov 28, 2017
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Adding mutating webhook admission plugin

Ref #kubernetes/enhancements#492

I made a change to the API to plumb the `Patch` into the response. I'll rebase onto the actual API once kubernetes/kubernetes#55829 is merged.

We should update the release notes to point to the user docs when we have any.

```release-note
Added mutation supports to admission webhooks.
```

TODO:
- [ ] update test image to v6 after #55829 is merged
- [ ] rename the GenericAdmissionWebhook to ValidatingAdmissionWebhook
- [ ] reduce json marshal/unmarshal roundtrip: kubernetes/kubernetes#54892 (comment)
- [ ] move the matching function to a common package that validating and mutating webhooks can both import.
- [ ] handle namespace GET failure gracefully for fail open webhook?

Kubernetes-commit: 638add6ddfb6d2f9fbc3224d0ce1e8cab9aa3049
sttts pushed a commit to sttts/sample-apiserver that referenced this pull request Nov 28, 2017
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Adding mutating webhook admission plugin

Ref #kubernetes/enhancements#492

I made a change to the API to plumb the `Patch` into the response. I'll rebase onto the actual API once kubernetes/kubernetes#55829 is merged.

We should update the release notes to point to the user docs when we have any.

```release-note
Added mutation supports to admission webhooks.
```

TODO:
- [ ] update test image to v6 after #55829 is merged
- [ ] rename the GenericAdmissionWebhook to ValidatingAdmissionWebhook
- [ ] reduce json marshal/unmarshal roundtrip: kubernetes/kubernetes#54892 (comment)
- [ ] move the matching function to a common package that validating and mutating webhooks can both import.
- [ ] handle namespace GET failure gracefully for fail open webhook?

Kubernetes-commit: 638add6ddfb6d2f9fbc3224d0ce1e8cab9aa3049
sttts pushed a commit to sttts/apiextensions-apiserver that referenced this pull request Nov 28, 2017
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Adding mutating webhook admission plugin

Ref #kubernetes/enhancements#492

I made a change to the API to plumb the `Patch` into the response. I'll rebase onto the actual API once kubernetes/kubernetes#55829 is merged.

We should update the release notes to point to the user docs when we have any.

```release-note
Added mutation supports to admission webhooks.
```

TODO:
- [ ] update test image to v6 after #55829 is merged
- [ ] rename the GenericAdmissionWebhook to ValidatingAdmissionWebhook
- [ ] reduce json marshal/unmarshal roundtrip: kubernetes/kubernetes#54892 (comment)
- [ ] move the matching function to a common package that validating and mutating webhooks can both import.
- [ ] handle namespace GET failure gracefully for fail open webhook?

Kubernetes-commit: 638add6ddfb6d2f9fbc3224d0ce1e8cab9aa3049
sttts pushed a commit to sttts/apiserver that referenced this pull request Nov 28, 2017
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Adding mutating webhook admission plugin

Ref #kubernetes/enhancements#492

I made a change to the API to plumb the `Patch` into the response. I'll rebase onto the actual API once kubernetes/kubernetes#55829 is merged.

We should update the release notes to point to the user docs when we have any.

```release-note
Added mutation supports to admission webhooks.
```

TODO: 
- [ ] update test image to v6 after #55829 is merged
- [ ] rename the GenericAdmissionWebhook to ValidatingAdmissionWebhook
- [ ] reduce json marshal/unmarshal roundtrip: kubernetes/kubernetes#54892 (comment)
- [ ] move the matching function to a common package that validating and mutating webhooks can both import.
- [ ] handle namespace GET failure gracefully for fail open webhook?

Kubernetes-commit: 638add6ddfb6d2f9fbc3224d0ce1e8cab9aa3049
sttts pushed a commit to sttts/kube-aggregator that referenced this pull request Nov 28, 2017
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Adding mutating webhook admission plugin

Ref #kubernetes/enhancements#492

I made a change to the API to plumb the `Patch` into the response. I'll rebase onto the actual API once kubernetes/kubernetes#55829 is merged.

We should update the release notes to point to the user docs when we have any.

```release-note
Added mutation supports to admission webhooks.
```

TODO:
- [ ] update test image to v6 after #55829 is merged
- [ ] rename the GenericAdmissionWebhook to ValidatingAdmissionWebhook
- [ ] reduce json marshal/unmarshal roundtrip: kubernetes/kubernetes#54892 (comment)
- [ ] move the matching function to a common package that validating and mutating webhooks can both import.
- [ ] handle namespace GET failure gracefully for fail open webhook?

Kubernetes-commit: 638add6ddfb6d2f9fbc3224d0ce1e8cab9aa3049
sttts pushed a commit to sttts/sample-apiserver that referenced this pull request Nov 28, 2017
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Adding mutating webhook admission plugin

Ref #kubernetes/enhancements#492

I made a change to the API to plumb the `Patch` into the response. I'll rebase onto the actual API once kubernetes/kubernetes#55829 is merged.

We should update the release notes to point to the user docs when we have any.

```release-note
Added mutation supports to admission webhooks.
```

TODO:
- [ ] update test image to v6 after #55829 is merged
- [ ] rename the GenericAdmissionWebhook to ValidatingAdmissionWebhook
- [ ] reduce json marshal/unmarshal roundtrip: kubernetes/kubernetes#54892 (comment)
- [ ] move the matching function to a common package that validating and mutating webhooks can both import.
- [ ] handle namespace GET failure gracefully for fail open webhook?

Kubernetes-commit: 638add6ddfb6d2f9fbc3224d0ce1e8cab9aa3049
sttts pushed a commit to sttts/apiextensions-apiserver that referenced this pull request Nov 28, 2017
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Adding mutating webhook admission plugin

Ref #kubernetes/enhancements#492

I made a change to the API to plumb the `Patch` into the response. I'll rebase onto the actual API once kubernetes/kubernetes#55829 is merged.

We should update the release notes to point to the user docs when we have any.

```release-note
Added mutation supports to admission webhooks.
```

TODO:
- [ ] update test image to v6 after #55829 is merged
- [ ] rename the GenericAdmissionWebhook to ValidatingAdmissionWebhook
- [ ] reduce json marshal/unmarshal roundtrip: kubernetes/kubernetes#54892 (comment)
- [ ] move the matching function to a common package that validating and mutating webhooks can both import.
- [ ] handle namespace GET failure gracefully for fail open webhook?

Kubernetes-commit: 638add6ddfb6d2f9fbc3224d0ce1e8cab9aa3049
k8s-publishing-bot pushed a commit to k8s-publishing-bot/apiserver that referenced this pull request Nov 29, 2017
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Adding mutating webhook admission plugin

Ref #kubernetes/enhancements#492

I made a change to the API to plumb the `Patch` into the response. I'll rebase onto the actual API once kubernetes/kubernetes#55829 is merged.

We should update the release notes to point to the user docs when we have any.

```release-note
Added mutation supports to admission webhooks.
```

TODO: 
- [ ] update test image to v6 after #55829 is merged
- [ ] rename the GenericAdmissionWebhook to ValidatingAdmissionWebhook
- [ ] reduce json marshal/unmarshal roundtrip: kubernetes/kubernetes#54892 (comment)
- [ ] move the matching function to a common package that validating and mutating webhooks can both import.
- [ ] handle namespace GET failure gracefully for fail open webhook?

Kubernetes-commit: 638add6ddfb6d2f9fbc3224d0ce1e8cab9aa3049
k8s-publishing-bot pushed a commit to k8s-publishing-bot/kube-aggregator that referenced this pull request Nov 29, 2017
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Adding mutating webhook admission plugin

Ref #kubernetes/enhancements#492

I made a change to the API to plumb the `Patch` into the response. I'll rebase onto the actual API once kubernetes/kubernetes#55829 is merged.

We should update the release notes to point to the user docs when we have any.

```release-note
Added mutation supports to admission webhooks.
```

TODO:
- [ ] update test image to v6 after #55829 is merged
- [ ] rename the GenericAdmissionWebhook to ValidatingAdmissionWebhook
- [ ] reduce json marshal/unmarshal roundtrip: kubernetes/kubernetes#54892 (comment)
- [ ] move the matching function to a common package that validating and mutating webhooks can both import.
- [ ] handle namespace GET failure gracefully for fail open webhook?

Kubernetes-commit: 638add6ddfb6d2f9fbc3224d0ce1e8cab9aa3049
k8s-publishing-bot pushed a commit to k8s-publishing-bot/sample-apiserver that referenced this pull request Nov 29, 2017
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Adding mutating webhook admission plugin

Ref #kubernetes/enhancements#492

I made a change to the API to plumb the `Patch` into the response. I'll rebase onto the actual API once kubernetes/kubernetes#55829 is merged.

We should update the release notes to point to the user docs when we have any.

```release-note
Added mutation supports to admission webhooks.
```

TODO:
- [ ] update test image to v6 after #55829 is merged
- [ ] rename the GenericAdmissionWebhook to ValidatingAdmissionWebhook
- [ ] reduce json marshal/unmarshal roundtrip: kubernetes/kubernetes#54892 (comment)
- [ ] move the matching function to a common package that validating and mutating webhooks can both import.
- [ ] handle namespace GET failure gracefully for fail open webhook?

Kubernetes-commit: 638add6ddfb6d2f9fbc3224d0ce1e8cab9aa3049
k8s-publishing-bot pushed a commit to k8s-publishing-bot/apiextensions-apiserver that referenced this pull request Nov 29, 2017
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Adding mutating webhook admission plugin

Ref #kubernetes/enhancements#492

I made a change to the API to plumb the `Patch` into the response. I'll rebase onto the actual API once kubernetes/kubernetes#55829 is merged.

We should update the release notes to point to the user docs when we have any.

```release-note
Added mutation supports to admission webhooks.
```

TODO:
- [ ] update test image to v6 after #55829 is merged
- [ ] rename the GenericAdmissionWebhook to ValidatingAdmissionWebhook
- [ ] reduce json marshal/unmarshal roundtrip: kubernetes/kubernetes#54892 (comment)
- [ ] move the matching function to a common package that validating and mutating webhooks can both import.
- [ ] handle namespace GET failure gracefully for fail open webhook?

Kubernetes-commit: 638add6ddfb6d2f9fbc3224d0ce1e8cab9aa3049
k8s-publishing-bot pushed a commit to k8s-publishing-bot/apiserver that referenced this pull request Dec 7, 2017
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Adding mutating webhook admission plugin

Ref #kubernetes/enhancements#492

I made a change to the API to plumb the `Patch` into the response. I'll rebase onto the actual API once kubernetes/kubernetes#55829 is merged.

We should update the release notes to point to the user docs when we have any.

```release-note
Added mutation supports to admission webhooks.
```

TODO: 
- [ ] update test image to v6 after #55829 is merged
- [ ] rename the GenericAdmissionWebhook to ValidatingAdmissionWebhook
- [ ] reduce json marshal/unmarshal roundtrip: kubernetes/kubernetes#54892 (comment)
- [ ] move the matching function to a common package that validating and mutating webhooks can both import.
- [ ] handle namespace GET failure gracefully for fail open webhook?

Kubernetes-commit: 638add6ddfb6d2f9fbc3224d0ce1e8cab9aa3049
k8s-publishing-bot pushed a commit to k8s-publishing-bot/kube-aggregator that referenced this pull request Dec 7, 2017
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Adding mutating webhook admission plugin

Ref #kubernetes/enhancements#492

I made a change to the API to plumb the `Patch` into the response. I'll rebase onto the actual API once kubernetes/kubernetes#55829 is merged.

We should update the release notes to point to the user docs when we have any.

```release-note
Added mutation supports to admission webhooks.
```

TODO:
- [ ] update test image to v6 after #55829 is merged
- [ ] rename the GenericAdmissionWebhook to ValidatingAdmissionWebhook
- [ ] reduce json marshal/unmarshal roundtrip: kubernetes/kubernetes#54892 (comment)
- [ ] move the matching function to a common package that validating and mutating webhooks can both import.
- [ ] handle namespace GET failure gracefully for fail open webhook?

Kubernetes-commit: 638add6ddfb6d2f9fbc3224d0ce1e8cab9aa3049
k8s-publishing-bot pushed a commit to k8s-publishing-bot/sample-apiserver that referenced this pull request Dec 7, 2017
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Adding mutating webhook admission plugin

Ref #kubernetes/enhancements#492

I made a change to the API to plumb the `Patch` into the response. I'll rebase onto the actual API once kubernetes/kubernetes#55829 is merged.

We should update the release notes to point to the user docs when we have any.

```release-note
Added mutation supports to admission webhooks.
```

TODO:
- [ ] update test image to v6 after #55829 is merged
- [ ] rename the GenericAdmissionWebhook to ValidatingAdmissionWebhook
- [ ] reduce json marshal/unmarshal roundtrip: kubernetes/kubernetes#54892 (comment)
- [ ] move the matching function to a common package that validating and mutating webhooks can both import.
- [ ] handle namespace GET failure gracefully for fail open webhook?

Kubernetes-commit: 638add6ddfb6d2f9fbc3224d0ce1e8cab9aa3049
k8s-publishing-bot pushed a commit to k8s-publishing-bot/apiextensions-apiserver that referenced this pull request Dec 7, 2017
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Adding mutating webhook admission plugin

Ref #kubernetes/enhancements#492

I made a change to the API to plumb the `Patch` into the response. I'll rebase onto the actual API once kubernetes/kubernetes#55829 is merged.

We should update the release notes to point to the user docs when we have any.

```release-note
Added mutation supports to admission webhooks.
```

TODO:
- [ ] update test image to v6 after #55829 is merged
- [ ] rename the GenericAdmissionWebhook to ValidatingAdmissionWebhook
- [ ] reduce json marshal/unmarshal roundtrip: kubernetes/kubernetes#54892 (comment)
- [ ] move the matching function to a common package that validating and mutating webhooks can both import.
- [ ] handle namespace GET failure gracefully for fail open webhook?

Kubernetes-commit: 638add6ddfb6d2f9fbc3224d0ce1e8cab9aa3049
openshift-publish-robot pushed a commit to openshift/kubernetes-sample-apiserver that referenced this pull request Jan 14, 2019
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Adding mutating webhook admission plugin

Ref #kubernetes/enhancements#492

I made a change to the API to plumb the `Patch` into the response. I'll rebase onto the actual API once kubernetes/kubernetes#55829 is merged.

We should update the release notes to point to the user docs when we have any.

```release-note
Added mutation supports to admission webhooks.
```

TODO: 
- [ ] update test image to v6 after #55829 is merged
- [ ] rename the GenericAdmissionWebhook to ValidatingAdmissionWebhook
- [ ] reduce json marshal/unmarshal roundtrip: kubernetes/kubernetes#54892 (comment)
- [ ] move the matching function to a common package that validating and mutating webhooks can both import.
- [ ] handle namespace GET failure gracefully for fail open webhook?

Kubernetes-commit: 638add6ddfb6d2f9fbc3224d0ce1e8cab9aa3049
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. 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/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. 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. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants