Fix sample CEL expression in volumes.md

Fix sample CEL expression for rejecting gitRepo volumes in volumes.md
This commit is contained in:
Donald Sebastian Leung 2024-11-23 14:59:37 +08:00 committed by GitHub
parent 804dadbe59
commit 38e7774e77
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -325,7 +325,7 @@ You can restrict the use of `gitRepo` volumes in your cluster using
[ValidatingAdmissionPolicy](/docs/reference/access-authn-authz/validating-admission-policy/).
You can use the following Common Expression Language (CEL) expression as
part of a policy to reject use of `gitRepo` volumes:
`has(object.spec.volumes) || !object.spec.volumes.exists(v, has(v.gitRepo))`.
`!has(object.spec.volumes) || !object.spec.volumes.exists(v, has(v.gitRepo))`.
{{< /warning >}}