Add documentation for podpreset opt-out annotation

This adds the annotation for having the podpreset admission controller
to skip (opt-out) manipulating the pod spec.

Also, the annotation format for what presets have acted on a pod has
been modified to add a prefix of "podpreset-". The new naming makes it such
that there is no chance of collision with the newly introduced opt-out
annotation (or future ones yet to be added).

Opt-out annotation PR:
kubernetes/kubernetes#44965
This commit is contained in:
Jeff Peeler
2017-06-13 11:00:43 -04:00
committed by Andrew Chen
parent bea52c8e5c
commit c1c6faf59b
@@ -51,7 +51,7 @@ Kubernetes modifies the Pod Spec.
Kubernetes annotates the resulting modified pod spec to show that it was Kubernetes annotates the resulting modified pod spec to show that it was
modified by a `PodPreset`. The annotation is of the form modified by a `PodPreset`. The annotation is of the form
`podpreset.admission.kubernetes.io/<pod-preset name>": "<resource version>"`. `podpreset.admission.kubernetes.io/podpreset-<pod-preset name>": "<resource version>"`.
## Enable Pod Preset ## Enable Pod Preset
@@ -63,6 +63,12 @@ following
1. You have enabled the admission controller `PodPreset` 1. You have enabled the admission controller `PodPreset`
1. You have defined your pod presets 1. You have defined your pod presets
## Disable Pod Preset for a pod
There may be instances where you wish for a pod to not be altered by any pod
preset mutations. For these events, one can add an annotation in the pod spec
of the form: `podpreset.admission.kubernetes.io/exclude: "true"`.
## Create a Pod Preset ## Create a Pod Preset
### Simple Pod Spec Example ### Simple Pod Spec Example