Merge pull request #48817 from DonaldKellett/fix/cel-reject-gitrepo-volumes

Fix sample CEL expression in volumes.md
This commit is contained in:
Kubernetes Prow Robot 2024-11-24 00:58:54 +00:00 committed by GitHub
commit fc9802d5a6
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 >}}