Add guard to the validating admission policy to stop errors when there are no volumes in the spec. This fixes errors with HTTP solver pods in cert manager. (#706)

Signed-off-by: Oliver Bassett <[email protected]>
Co-authored-by: kfox1111 <[email protected]>
This commit is contained in:
Oliver Bassett
2025-12-18 14:47:45 -08:00
committed by GitHub
co-authored by kfox1111
parent 1e1e8daa69
commit dfbbecf077
@@ -17,6 +17,7 @@ spec:
resources: ["pods"]
validations:
- expression: |
!has(object.spec.volumes) ||
!object.spec.volumes.exists(c, has(c.csi) && has(c.csi.driver) && c.csi.driver == {{ .Values.pluginName | quote }})
message: 'you may not use the upstream.csi.spiffe.io csi driver'
---