mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-09 17:37:12 +00:00
44 lines
967 B
YAML
Executable file
44 lines
967 B
YAML
Executable file
apiVersion: chainsaw.kyverno.io/v1alpha1
|
|
kind: Test
|
|
metadata:
|
|
name: not-ready
|
|
spec:
|
|
steps:
|
|
- name: setup
|
|
try:
|
|
- apply:
|
|
file: namespace.yaml
|
|
- apply:
|
|
file: main-deployment.yaml
|
|
- apply:
|
|
file: gctxentry.yaml
|
|
- sleep:
|
|
duration: 3s
|
|
- 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-not-ready
|
|
- try:
|
|
- delete:
|
|
ref:
|
|
apiVersion: kyverno.io/v2alpha1
|
|
kind: GlobalContextEntry
|
|
name: gctx-not-ready
|
|
- sleep:
|
|
duration: 3s
|
|
- assert:
|
|
file: policy-failed.yaml
|
|
- apply:
|
|
file: new-deployment.yaml
|
|
- assert:
|
|
file: new-deployment-exists.yaml
|