mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-09 09:26:54 +00:00
* 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>
35 lines
763 B
YAML
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
|