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

Do not attempt to convert nil object during DELETE webhook admission #66425

Merged
merged 1 commit into from Jul 20, 2018

Conversation

@liggitt
Copy link
Member

liggitt commented Jul 20, 2018

Fixes #66412

fixes a panic when using a mutating webhook admission plugin with a DELETE operation

// if a non-empty patch was provided, and we have no object we can apply it to (e.g. a DELETE admission operation), error
if attr.VersionedObject == nil {
return apierrors.NewInternalError(fmt.Errorf("admission webhook %q attempted to modify unset object", h.Name))

This comment has been minimized.

@sttts

sttts Jul 20, 2018

Contributor

what does "modify unset object" mean to a user?

This comment has been minimized.

@liggitt

liggitt Jul 20, 2018

Author Member

clarified message

@liggitt liggitt force-pushed the liggitt:delete-admission-panic branch from fa65437 to aad0e2e Jul 20, 2018

@liggitt

This comment has been minimized.

Copy link
Member Author

liggitt commented Jul 20, 2018

/kind bug
/sig api-machinery
/priority critical-urgent
/milestone v1.11
/status approved-for-milestone

@liggitt

This comment has been minimized.

Copy link
Member Author

liggitt commented Jul 20, 2018

/retest

@sttts

This comment has been minimized.

Copy link
Contributor

sttts commented Jul 20, 2018

/lgtm

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

k8s-ci-robot commented Jul 20, 2018

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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

@k8s-github-robot

This comment has been minimized.

Copy link
Contributor

k8s-github-robot commented Jul 20, 2018

[MILESTONENOTIFIER] Milestone Pull Request: Up-to-date for process

@liggitt @sttts

Pull Request Labels
  • sig/api-machinery: Pull Request will be escalated to these SIGs if needed.
  • priority/critical-urgent: Never automatically move pull request out of a release milestone; continually escalate to contributor and SIG through all available channels.
  • kind/bug: Fixes a bug discovered during the current release.
Help
@k8s-github-robot

This comment has been minimized.

Copy link
Contributor

k8s-github-robot commented Jul 20, 2018

/test all [submit-queue is verifying that this PR is safe to merge]

@k8s-github-robot

This comment has been minimized.

Copy link
Contributor

k8s-github-robot commented Jul 20, 2018

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here.

@k8s-github-robot k8s-github-robot merged commit 0738778 into kubernetes:master Jul 20, 2018

17 of 18 checks passed

Submit Queue Required Github CI test is not green: pull-kubernetes-kubemark-e2e-gce-big
Details
cla/linuxfoundation liggitt authorized
Details
pull-kubernetes-bazel-build Job succeeded.
Details
pull-kubernetes-bazel-test Job succeeded.
Details
pull-kubernetes-cross Skipped
pull-kubernetes-e2e-gce Job succeeded.
Details
pull-kubernetes-e2e-gce-100-performance Job succeeded.
Details
pull-kubernetes-e2e-gce-device-plugin-gpu Job succeeded.
Details
pull-kubernetes-e2e-gke Skipped
pull-kubernetes-e2e-kops-aws Job succeeded.
Details
pull-kubernetes-e2e-kubeadm-gce Skipped
pull-kubernetes-integration Job succeeded.
Details
pull-kubernetes-kubemark-e2e-gce-big Job succeeded.
Details
pull-kubernetes-local-e2e Skipped
pull-kubernetes-local-e2e-containerized Skipped
pull-kubernetes-node-e2e Job succeeded.
Details
pull-kubernetes-typecheck Job succeeded.
Details
pull-kubernetes-verify Job succeeded.
Details
@fedebongio

This comment has been minimized.

Copy link
Contributor

fedebongio commented Jul 23, 2018

@k8s-ci-robot k8s-ci-robot requested a review from caesarxuchao Jul 23, 2018

@caesarxuchao

This comment has been minimized.

Copy link
Member

caesarxuchao commented Jul 23, 2018

lgtm

k8s-github-robot pushed a commit that referenced this pull request Jul 24, 2018

Kubernetes Submit Queue
Merge pull request #66426 from liggitt/automated-cherry-pick-of-#6642…
…5-upstream-release-1.11

Automatic merge from submit-queue.

Automated cherry pick of #66425: Do not attempt to convert nil object during DELETE webhook

Cherry pick of #66425 on release-1.11.

#66425: Do not attempt to convert nil object during DELETE webhook

```release-note
fixes a panic when using a mutating webhook admission plugin with a DELETE operation
```

@liggitt liggitt deleted the liggitt:delete-admission-panic branch Aug 6, 2018

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.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.