2023-09-17 22:50:17 +02:00
|
|
|
apiVersion: cli.kyverno.io/v1alpha1
|
|
|
|
kind: Test
|
|
|
|
metadata:
|
|
|
|
name: kyverno-test.yaml
|
2022-03-16 09:56:47 +05:30
|
|
|
policies:
|
2023-09-01 17:50:11 +02:00
|
|
|
- image-example.yaml
|
2022-03-16 09:56:47 +05:30
|
|
|
resources:
|
2023-09-01 17:50:11 +02:00
|
|
|
- resources.yaml
|
2022-03-16 09:56:47 +05:30
|
|
|
results:
|
2023-09-01 17:50:11 +02:00
|
|
|
- kind: Pod
|
2023-09-14 21:36:32 +02:00
|
|
|
policy: check-image-base
|
2023-09-01 17:50:11 +02:00
|
|
|
resources:
|
|
|
|
- test-pod-with-trusted-registry
|
|
|
|
result: pass
|
2023-09-14 21:36:32 +02:00
|
|
|
rule: check-image-base-rule
|
2023-09-01 17:50:11 +02:00
|
|
|
- kind: Pod
|
2023-09-14 21:36:32 +02:00
|
|
|
policy: images
|
2023-09-01 17:50:11 +02:00
|
|
|
resources:
|
2023-09-14 21:36:32 +02:00
|
|
|
- test-pod-with-non-root-user-image
|
2023-09-01 17:50:11 +02:00
|
|
|
- test-pod-with-trusted-registry
|
|
|
|
result: pass
|
2023-09-14 21:36:32 +02:00
|
|
|
rule: only-allow-trusted-images
|