mirror of
https://github.com/kyverno/kyverno.git
synced 2025-04-14 00:06:45 +00:00
35 lines
843 B
YAML
Executable file
35 lines
843 B
YAML
Executable file
apiVersion: chainsaw.kyverno.io/v1alpha1
|
|
kind: Test
|
|
metadata:
|
|
name: webhook-registeration
|
|
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: cpol-fine-grained-match-conditions-disallow-latest-image-tag-1
|
|
- name: step-02
|
|
try:
|
|
- assert:
|
|
file: webhook.yaml
|
|
- name: step-03
|
|
try:
|
|
- delete:
|
|
ref:
|
|
apiVersion: kyverno.io/v1
|
|
kind: ClusterPolicy
|
|
name: cpol-fine-grained-match-conditions-disallow-latest-image-tag-1
|
|
- name: step-04
|
|
try:
|
|
- error:
|
|
file: webhook.yaml
|