mirror of
https://github.com/kyverno/kyverno.git
synced 2024-12-14 11:57:48 +00:00
df267dd829
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
37 lines
820 B
YAML
Executable file
37 lines
820 B
YAML
Executable file
apiVersion: chainsaw.kyverno.io/v1alpha1
|
|
kind: Test
|
|
metadata:
|
|
name: with-wildcard
|
|
spec:
|
|
steps:
|
|
- 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: require-labels
|
|
- name: step-02
|
|
try:
|
|
- apply:
|
|
file: exception.yaml
|
|
- name: step-03
|
|
try:
|
|
- apply:
|
|
file: configmap-allowed.yaml
|
|
- apply:
|
|
expect:
|
|
- check:
|
|
($error != null): true
|
|
file: configmap-rejected.yaml
|
|
- assert:
|
|
file: configmap-allowed.yaml
|
|
- error:
|
|
file: configmap-rejected.yaml
|