2024-02-02 16:32:28 +08:00
|
|
|
apiVersion: chainsaw.kyverno.io/v1alpha1
|
|
|
|
kind: Test
|
|
|
|
metadata:
|
|
|
|
name: report-deletion
|
|
|
|
spec:
|
|
|
|
steps:
|
|
|
|
- name: step-00
|
|
|
|
try:
|
|
|
|
- apply:
|
|
|
|
file: ns.yaml
|
|
|
|
- assert:
|
|
|
|
file: ns.yaml
|
|
|
|
- name: step-01
|
|
|
|
try:
|
|
|
|
- apply:
|
|
|
|
file: pod.yaml
|
|
|
|
- assert:
|
|
|
|
file: pod.yaml
|
2024-10-03 11:57:40 +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: cpol-match-conditions-userinfo
|
2024-02-02 16:32:28 +08:00
|
|
|
- name: step-03
|
|
|
|
try:
|
|
|
|
- error:
|
|
|
|
file: report-error-1.yaml
|
|
|
|
- name: step-04
|
|
|
|
try:
|
|
|
|
- error:
|
|
|
|
file: report-error-2.yaml
|