2024-05-06 13:28:39 +03:00
|
|
|
apiVersion: chainsaw.kyverno.io/v1alpha1
|
|
|
|
kind: Test
|
|
|
|
metadata:
|
|
|
|
name: conditions
|
|
|
|
spec:
|
|
|
|
steps:
|
2024-10-03 13:56:30 +02:00
|
|
|
- name: create policy
|
|
|
|
use:
|
|
|
|
template: ../../_step-templates/create-policy.yaml
|
|
|
|
with:
|
|
|
|
bindings:
|
|
|
|
- name: file
|
|
|
|
value: policy.yaml
|
|
|
|
- name: wait policy ready
|
|
|
|
use:
|
|
|
|
template: ../../_step-templates/cluster-policy-ready.yaml
|
|
|
|
with:
|
|
|
|
bindings:
|
|
|
|
- name: name
|
|
|
|
value: max-containers
|
2024-05-06 13:28:39 +03:00
|
|
|
- name: step-02
|
|
|
|
try:
|
|
|
|
- apply:
|
|
|
|
file: failing-exception.yaml
|
|
|
|
- apply:
|
|
|
|
file: passing-exception.yaml
|
|
|
|
- finally:
|
|
|
|
- sleep:
|
|
|
|
duration: 5s
|
|
|
|
name: step-03
|
|
|
|
try:
|
|
|
|
- apply:
|
|
|
|
file: good-deployment.yaml
|