Skip to content

Fix support for DELETE#146

Merged
maxsmythe merged 1 commit into
open-policy-agent:masterfrom
ritazh:fix-delete
Jun 21, 2019
Merged

Fix support for DELETE#146
maxsmythe merged 1 commit into
open-policy-agent:masterfrom
ritazh:fix-delete

Conversation

@ritazh
Copy link
Copy Markdown
Member

@ritazh ritazh commented Jun 19, 2019

Signed-off-by: Rita Zhang rita.z.zhang@gmail.com

Fixes #144

  • Return error message to user when operation is DELETE and k8s is prior to v1.15.0
  • When operation is DELETE and oldObject is not nil for k8s v1.15+, populate admission request object with oldObject before passing the request to validation and review

NOTE:

  • I did not add admissionregistrationv1beta1.DELETE to the validation webhook config by default. Users can do that manually after it is deployed. Do we need a flag to enable DELETE by default as part of the initial deployment?

Signed-off-by: Rita Zhang <rita.z.zhang@gmail.com>
@ritazh ritazh requested a review from maxsmythe June 19, 2019 20:48
@maxsmythe maxsmythe merged commit 710822d into open-policy-agent:master Jun 21, 2019
@maxsmythe
Copy link
Copy Markdown
Contributor

Sorry, just noticed the DELETE question. There is some reservation about enabling DELETE by default in that there could be risk of landing users in an unrecoverable state. We would need to think through the possibilities and make sure there is an escape hatch if such a state is possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support DELETE operations

2 participants