Skip to content

Commit

Permalink
Explain how to enable dry run for a webhook
Browse files Browse the repository at this point in the history
  • Loading branch information
jennybuckley committed Nov 21, 2018
1 parent c4727ce commit 703e9af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion content/en/docs/reference/using-api/api-concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ Clients that receive a response in `application/vnd.kubernetes.protobuf` that do

Dry run is triggered by setting the `dryRun` query parameter. This parameter is a string, working as an enum, and in 1.13 the only accepted values are:

* `All`: Every stage runs as normal, except for the final storage stage. Admission controllers are run to check that the request is valid, mutating controllers mutate the request, merge is performed on `PATCH`, fields are defaulted, and schema validation occurs. The changes are not persisted to the underlying storage, but the final object which would have been persisted is still returned to the user, along with the normal status code. If the request would trigger an admission controller which would have side effects, the request will be failed rather than risk an unwanted side effect. Admission webhooks can now declare (in their configuration object) that they do not have side effects to prevent this. All built in admission control plugins support dry run.
* `All`: Every stage runs as normal, except for the final storage stage. Admission controllers are run to check that the request is valid, mutating controllers mutate the request, merge is performed on `PATCH`, fields are defaulted, and schema validation occurs. The changes are not persisted to the underlying storage, but the final object which would have been persisted is still returned to the user, along with the normal status code. If the request would trigger an admission controller which would have side effects, the request will be failed rather than risk an unwanted side effect. Admission webhooks can now declare in their [configuration object](/docs/reference/generated/kubernetes-api/v1.13/#webhook-v1beta1-admissionregistration-k8s-io) that they do not have side effects to prevent this, by setting the sideEffects field. If a webhook actually does have side effects, then it should also be modified to understand the `DryRun` field in AdmissionReview, and prevent side effects on dry run requests. All built in admission control plugins support dry run.
* Leave the value empty, which is also the default: Keep the default modifying behavior.

For example:
Expand Down

0 comments on commit 703e9af

Please sign in to comment.