Merge pull request #48817 from DonaldKellett/fix/cel-reject-gitrepo-volumes
Fix sample CEL expression in volumes.md
This commit is contained in:
commit
fc9802d5a6
|
|
@ -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/).
|
[ValidatingAdmissionPolicy](/docs/reference/access-authn-authz/validating-admission-policy/).
|
||||||
You can use the following Common Expression Language (CEL) expression as
|
You can use the following Common Expression Language (CEL) expression as
|
||||||
part of a policy to reject use of `gitRepo` volumes:
|
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 >}}
|
{{< /warning >}}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue