Skip to content

Commit fedebad

Browse files
committed
ImagePolicyWebhook: config can be embedded
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.
1 parent 23a4be1 commit fedebad

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

content/en/docs/reference/access-authn-authz/admission-controllers.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,22 @@ plugins:
249249
...
250250
```
251251

252+
Alternatively, you can embed the configuration directly in the file:
253+
254+
```yaml
255+
apiVersion: apiserver.k8s.io/v1alpha1
256+
kind: AdmissionConfiguration
257+
plugins:
258+
- name: ImagePolicyWebhook
259+
configuration:
260+
imagePolicy:
261+
kubeConfigFile: /path/to/file
262+
allowTTL: 50
263+
denyTTL: 50
264+
retryBackoff: 500
265+
defaultAllow: true
266+
```
267+
252268
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.
253269

254270
The kubeconfig file's cluster field must point to the remote service, and the user field must contain the returned authorizer.

0 commit comments

Comments
 (0)