ImagePolicyWebhook: config can be embedded (#15233)

All admission control plugins support two modes for specifying their
configuration: linking to an external file using the `path` key in the
shared admission configuration file, or directly embedding the
configuration using the `configuration` key in the shared admission
configuration file.

This commit makes the ImagePolicyWebhook documentation mention the
embedded configuration option.
This commit is contained in:
Taahir Ahmed 2019-07-24 08:26:17 -07:00 committed by Kubernetes Prow Robot
parent 31cbc5e982
commit 51de06b36a
1 changed files with 16 additions and 0 deletions

View File

@ -249,6 +249,22 @@ plugins:
...
```
Alternatively, you can embed the configuration directly in the file:
```yaml
apiVersion: apiserver.k8s.io/v1alpha1
kind: AdmissionConfiguration
plugins:
- name: ImagePolicyWebhook
configuration:
imagePolicy:
kubeConfigFile: /path/to/file
allowTTL: 50
denyTTL: 50
retryBackoff: 500
defaultAllow: true
```
The ImagePolicyWebhook config file must reference a [kubeconfig](/docs/concepts/cluster-administration/authenticate-across-clusters-kubeconfig/) formatted file which sets up the connection to the backend. It is required that the backend communicate over TLS.
The kubeconfig file's cluster field must point to the remote service, and the user field must contain the returned authorizer.