1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-09 17:37:12 +00:00
kyverno/test/cli/registry/kyverno-test.yaml
Netanel Kadosh cef7be1fdc
feat: Add Manifest Index to ImageRegistry context (#9883)
* feat: Add Manifest Index to ImageRegistry context

Signed-off-by: Netanel Kadosh <kadoshnetanel@gmail.com>

* test: adding manifest list tests

Signed-off-by: Netanel Kadosh <kadoshnetanel@gmail.com>

---------

Signed-off-by: Netanel Kadosh <kadoshnetanel@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
2024-11-14 08:10:25 +00:00

35 lines
763 B
YAML

apiVersion: cli.kyverno.io/v1alpha1
kind: Test
metadata:
name: kyverno-test.yaml
policies:
- image-example.yaml
resources:
- resources.yaml
results:
- kind: Pod
policy: check-image-base
resources:
- test-pod-with-trusted-registry
result: pass
rule: check-image-base-rule
- kind: Pod
policy: check-manifest-list
resources:
- test-pod-with-single-arch-no-index
result: fail
rule: check-manifest-list-rule
- kind: Pod
policy: check-manifest-list
resources:
- test-pod-with-trusted-registry
- test-pod-with-single-arch-index
result: pass
rule: check-manifest-list-rule
- kind: Pod
policy: images
resources:
- test-pod-with-non-root-user-image
- test-pod-with-trusted-registry
result: pass
rule: only-allow-trusted-images