2024-06-24 20:40:50 +07:00
|
|
|
apiVersion: chainsaw.kyverno.io/v1alpha1
|
|
|
|
kind: Test
|
|
|
|
metadata:
|
|
|
|
name: multi-signatures
|
|
|
|
spec:
|
|
|
|
steps:
|
2024-10-02 20:55:38 +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: validate-yaml
|
2024-06-24 20:40:50 +07:00
|
|
|
- name: step-02
|
|
|
|
try:
|
|
|
|
- apply:
|
|
|
|
expect:
|
|
|
|
- check:
|
|
|
|
($error != null): true
|
|
|
|
file: resource-no-signature.yaml
|
|
|
|
- apply:
|
|
|
|
expect:
|
|
|
|
- check:
|
|
|
|
($error != null): true
|
|
|
|
file: resource-one-signature.yaml
|
|
|
|
- apply:
|
|
|
|
file: resource-two-signatures.yaml
|
|
|
|
- apply:
|
|
|
|
expect:
|
|
|
|
- check:
|
|
|
|
($error != null): true
|
|
|
|
file: resource-bad-signatures.yaml
|