1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-15 12:17:56 +00:00

chore: use more chainsaw step templates (#11296)

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
This commit is contained in:
Charles-Edouard Brétéché 2024-10-03 08:10:11 +02:00 committed by GitHub
parent 778d81a865
commit 97f2d25aaa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
75 changed files with 435 additions and 462 deletions

View file

@ -1,9 +0,0 @@
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: check-slsa-attestations-pass-4
status:
conditions:
- reason: Succeeded
status: "True"
type: Ready

View file

@ -4,12 +4,20 @@ metadata:
name: keyless-attestations-multiple-subjects-4 name: keyless-attestations-multiple-subjects-4
spec: spec:
steps: steps:
- name: step-01 - name: create policy
try: use:
- apply: template: ../../../../_step-templates/create-policy.yaml
file: chainsaw-step-01-apply-1.yaml with:
- assert: bindings:
file: chainsaw-step-01-assert-1.yaml - name: file
value: policy.yaml
- name: wait policy ready
use:
template: ../../../../_step-templates/cluster-policy-ready.yaml
with:
bindings:
- name: name
value: check-slsa-attestations-pass-4
- name: step-02 - name: step-02
try: try:
- apply: - apply:

View file

@ -1,9 +0,0 @@
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: check-slsa-attestations-pass-3
status:
conditions:
- reason: Succeeded
status: "True"
type: Ready

View file

@ -4,12 +4,20 @@ metadata:
name: keyless-attestations-multiple-subjects-counts-1 name: keyless-attestations-multiple-subjects-counts-1
spec: spec:
steps: steps:
- name: step-01 - name: create policy
try: use:
- apply: template: ../../../../_step-templates/create-policy.yaml
file: chainsaw-step-01-apply-1.yaml with:
- assert: bindings:
file: chainsaw-step-01-assert-1.yaml - name: file
value: policy.yaml
- name: wait policy ready
use:
template: ../../../../_step-templates/cluster-policy-ready.yaml
with:
bindings:
- name: name
value: check-slsa-attestations-pass-3
- name: step-02 - name: step-02
try: try:
- apply: - apply:

View file

@ -1,9 +0,0 @@
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: check-slsa-attestations-fail-2
status:
conditions:
- reason: Succeeded
status: "True"
type: Ready

View file

@ -4,12 +4,20 @@ metadata:
name: keyless-attestations-multiple-subjects-counts-2 name: keyless-attestations-multiple-subjects-counts-2
spec: spec:
steps: steps:
- name: step-01 - name: create policy
try: use:
- apply: template: ../../../../_step-templates/create-policy.yaml
file: chainsaw-step-01-apply-1.yaml with:
- assert: bindings:
file: chainsaw-step-01-assert-1.yaml - name: file
value: policy.yaml
- name: wait policy ready
use:
template: ../../../../_step-templates/cluster-policy-ready.yaml
with:
bindings:
- name: name
value: check-slsa-attestations-fail-2
- name: step-02 - name: step-02
try: try:
- apply: - apply:

View file

@ -1,9 +0,0 @@
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: check-slsa-attestations-fail-3
status:
conditions:
- reason: Succeeded
status: "True"
type: Ready

View file

@ -4,12 +4,20 @@ metadata:
name: keyless-attestations-multiple-subjects-counts-3 name: keyless-attestations-multiple-subjects-counts-3
spec: spec:
steps: steps:
- name: step-01 - name: create policy
try: use:
- apply: template: ../../../../_step-templates/create-policy.yaml
file: chainsaw-step-01-apply-1.yaml with:
- assert: bindings:
file: chainsaw-step-01-assert-1.yaml - name: file
value: policy.yaml
- name: wait policy ready
use:
template: ../../../../_step-templates/cluster-policy-ready.yaml
with:
bindings:
- name: name
value: check-slsa-attestations-fail-3
- name: step-02 - name: step-02
try: try:
- apply: - apply:

View file

@ -6,12 +6,20 @@ spec:
timeouts: timeouts:
delete: 2m delete: 2m
steps: steps:
- name: step-01 - name: create policy
try: use:
- apply: template: ../../../../_step-templates/create-policy.yaml
file: policy.yaml with:
- assert: bindings:
file: policy-assert.yaml - name: file
value: policy.yaml
- name: wait policy ready
use:
template: ../../../../_step-templates/cluster-policy-ready.yaml
with:
bindings:
- name: name
value: check-invalid-attestors
- name: step-02 - name: step-02
try: try:
- apply: - apply:

View file

@ -1,7 +0,0 @@
---
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: check-invalid-attestors
annotations:
pod-policies.kyverno.io/autogen-controllers: none

View file

@ -1,9 +0,0 @@
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: keyless-mutatedigest-verifydigest-required
status:
conditions:
- reason: Succeeded
status: "True"
type: Ready

View file

@ -4,12 +4,20 @@ metadata:
name: keyless-mutatedigest-verifydigest-required name: keyless-mutatedigest-verifydigest-required
spec: spec:
steps: steps:
- name: step-01 - name: create policy
try: use:
- apply: template: ../../../../_step-templates/create-policy.yaml
file: chainsaw-step-01-apply-1.yaml with:
- assert: bindings:
file: chainsaw-step-01-assert-1.yaml - name: file
value: policy.yaml
- name: wait policy ready
use:
template: ../../../../_step-templates/cluster-policy-ready.yaml
with:
bindings:
- name: name
value: keyless-mutatedigest-verifydigest-required
- name: step-02 - name: step-02
try: try:
- apply: - apply:

View file

@ -1,9 +0,0 @@
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: keyless-nomutatedigest-noverifydigest-norequired
status:
conditions:
- reason: Succeeded
status: "True"
type: Ready

View file

@ -4,12 +4,20 @@ metadata:
name: keyless-nomutatedigest-noverifydigest-norequired name: keyless-nomutatedigest-noverifydigest-norequired
spec: spec:
steps: steps:
- name: step-01 - name: create policy
try: use:
- apply: template: ../../../../_step-templates/create-policy.yaml
file: chainsaw-step-01-apply-1.yaml with:
- assert: bindings:
file: chainsaw-step-01-assert-1.yaml - name: file
value: policy.yaml
- name: wait policy ready
use:
template: ../../../../_step-templates/cluster-policy-ready.yaml
with:
bindings:
- name: name
value: keyless-nomutatedigest-noverifydigest-norequired
- name: step-02 - name: step-02
try: try:
- apply: - apply:

View file

@ -1,9 +0,0 @@
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: keyless-nomutatedigest-noverifydigest-required
status:
conditions:
- reason: Succeeded
status: "True"
type: Ready

View file

@ -4,12 +4,20 @@ metadata:
name: keyless-nomutatedigest-noverifydigest-required name: keyless-nomutatedigest-noverifydigest-required
spec: spec:
steps: steps:
- name: step-01 - name: create policy
try: use:
- apply: template: ../../../../_step-templates/create-policy.yaml
file: chainsaw-step-01-apply-1.yaml with:
- assert: bindings:
file: chainsaw-step-01-assert-1.yaml - name: file
value: policy.yaml
- name: wait policy ready
use:
template: ../../../../_step-templates/cluster-policy-ready.yaml
with:
bindings:
- name: name
value: keyless-nomutatedigest-noverifydigest-required
- name: step-02 - name: step-02
try: try:
- apply: - apply:

View file

@ -6,12 +6,20 @@ spec:
timeouts: timeouts:
delete: 2m delete: 2m
steps: steps:
- name: step-01 - name: create policy
try: use:
- apply: template: ../../../../_step-templates/create-policy.yaml
file: policy.yaml with:
- assert: bindings:
file: policy-ready.yaml - name: file
value: policy.yaml
- name: wait policy ready
use:
template: ../../../../_step-templates/cluster-policy-ready.yaml
with:
bindings:
- name: name
value: check-image-attestation
- name: step-02 - name: step-02
try: try:
- apply: - apply:

View file

@ -1,9 +0,0 @@
apiVersion: kyverno.io/v2beta1
kind: ClusterPolicy
metadata:
name: check-image-attestation
status:
conditions:
- reason: Succeeded
status: "True"
type: Ready

View file

@ -6,12 +6,20 @@ spec:
timeouts: timeouts:
delete: 2m delete: 2m
steps: steps:
- name: step-01 - name: create policy
try: use:
- apply: template: ../../../../_step-templates/create-policy.yaml
file: policy.yaml with:
- assert: bindings:
file: policy-ready.yaml - name: file
value: policy.yaml
- name: wait policy ready
use:
template: ../../../../_step-templates/cluster-policy-ready.yaml
with:
bindings:
- name: name
value: check-image-attestation
- name: step-02 - name: step-02
try: try:
- apply: - apply:

View file

@ -1,9 +0,0 @@
apiVersion: kyverno.io/v2beta1
kind: ClusterPolicy
metadata:
name: check-image-attestation
status:
conditions:
- reason: Succeeded
status: "True"
type: Ready

View file

@ -6,12 +6,20 @@ spec:
timeouts: timeouts:
delete: 2m delete: 2m
steps: steps:
- name: step-01 - name: create policy
try: use:
- apply: template: ../../../../_step-templates/create-policy.yaml
file: policy.yaml with:
- assert: bindings:
file: policy-ready.yaml - name: file
value: policy.yaml
- name: wait policy ready
use:
template: ../../../../_step-templates/cluster-policy-ready.yaml
with:
bindings:
- name: name
value: check-image-attestation
- name: step-02 - name: step-02
try: try:
- apply: - apply:

View file

@ -1,9 +0,0 @@
apiVersion: kyverno.io/v2beta1
kind: ClusterPolicy
metadata:
name: check-image-attestation
status:
conditions:
- reason: Succeeded
status: "True"
type: Ready

View file

@ -6,12 +6,20 @@ spec:
timeouts: timeouts:
delete: 2m delete: 2m
steps: steps:
- name: step-01 - name: create policy
try: use:
- apply: template: ../../../../_step-templates/create-policy.yaml
file: policy.yaml with:
- assert: bindings:
file: policy-ready.yaml - name: file
value: policy.yaml
- name: wait policy ready
use:
template: ../../../../_step-templates/cluster-policy-ready.yaml
with:
bindings:
- name: name
value: check-image-attestation
- name: step-02 - name: step-02
try: try:
- apply: - apply:

View file

@ -1,9 +0,0 @@
apiVersion: kyverno.io/v2beta1
kind: ClusterPolicy
metadata:
name: check-image-attestation
status:
conditions:
- reason: Succeeded
status: "True"
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: mutatedigest-policy
status:
conditions:
- reason: Succeeded
status: "True"
type: Ready

View file

@ -4,12 +4,20 @@ metadata:
name: mutatedigest-noverifydigest-norequired name: mutatedigest-noverifydigest-norequired
spec: spec:
steps: steps:
- name: step-01 - name: create policy
try: use:
- apply: template: ../../../../_step-templates/create-policy.yaml
file: chainsaw-step-01-apply-1.yaml with:
- assert: bindings:
file: chainsaw-step-01-assert-1.yaml - name: file
value: policy.yaml
- name: wait policy ready
use:
template: ../../../../_step-templates/cluster-policy-ready.yaml
with:
bindings:
- name: name
value: mutatedigest-policy
- name: step-02 - name: step-02
try: try:
- apply: - apply:

View file

@ -6,12 +6,20 @@ spec:
timeouts: timeouts:
delete: 2m delete: 2m
steps: steps:
- name: step-01 - name: create policy
try: use:
- apply: template: ../../../../_step-templates/create-policy.yaml
file: policy.yaml with:
- assert: bindings:
file: policy-ready.yaml - name: file
value: policy.yaml
- name: wait policy ready
use:
template: ../../../../_step-templates/cluster-policy-ready.yaml
with:
bindings:
- name: name
value: image-verify-polset
- name: step-02 - name: step-02
try: try:
- apply: - apply:

View file

@ -1,9 +0,0 @@
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: image-verify-polset
status:
conditions:
- reason: Succeeded
status: "True"
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: mutatedigest-policy
status:
conditions:
- reason: Succeeded
status: "True"
type: Ready

View file

@ -4,12 +4,20 @@ metadata:
name: nomutatedigest-verifydigest-norequired name: nomutatedigest-verifydigest-norequired
spec: spec:
steps: steps:
- name: step-01 - name: create policy
try: use:
- apply: template: ../../../../_step-templates/create-policy.yaml
file: chainsaw-step-01-apply-1.yaml with:
- assert: bindings:
file: chainsaw-step-01-assert-1.yaml - name: file
value: policy.yaml
- name: wait policy ready
use:
template: ../../../../_step-templates/cluster-policy-ready.yaml
with:
bindings:
- name: name
value: mutatedigest-policy
- name: step-02 - name: step-02
try: try:
- apply: - apply:

View file

@ -6,12 +6,20 @@ spec:
timeouts: timeouts:
delete: 2m delete: 2m
steps: steps:
- name: step-01 - name: create policy
try: use:
- apply: template: ../../../../_step-templates/create-policy.yaml
file: policy.yaml with:
- assert: bindings:
file: policy-ready.yaml - name: file
value: policy.yaml
- name: wait policy ready
use:
template: ../../../../_step-templates/cluster-policy-ready.yaml
with:
bindings:
- name: name
value: check-image-attestation
- name: step-02 - name: step-02
try: try:
- apply: - apply:

View file

@ -1,9 +0,0 @@
apiVersion: kyverno.io/v2beta1
kind: ClusterPolicy
metadata:
name: check-image-attestation
status:
conditions:
- reason: Succeeded
status: "True"
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: secret-in-policy
status:
conditions:
- reason: Succeeded
status: "True"
type: Ready

View file

@ -12,12 +12,20 @@ spec:
file: chainsaw-step-01-apply-1.yaml file: chainsaw-step-01-apply-1.yaml
- apply: - apply:
file: chainsaw-step-01-apply-2.yaml file: chainsaw-step-01-apply-2.yaml
- apply: - name: create policy
file: chainsaw-step-01-apply-3.yaml use:
- name: step-02 template: ../../../../_step-templates/create-policy.yaml
try: with:
- apply: bindings:
file: chainsaw-step-02-apply-1.yaml - name: file
value: policy.yaml
- name: wait policy ready
use:
template: ../../../../_step-templates/cluster-policy-ready.yaml
with:
bindings:
- name: name
value: secret-in-policy
- name: step-03 - name: step-03
try: try:
- script: - script:

View file

@ -6,12 +6,20 @@ spec:
timeouts: timeouts:
delete: 2m delete: 2m
steps: steps:
- name: step-01 - name: create policy
try: use:
- apply: template: ../../../../_step-templates/create-policy.yaml
file: policy.yaml with:
- assert: bindings:
file: policy-ready.yaml - name: file
value: policy.yaml
- name: wait policy ready
use:
template: ../../../../_step-templates/cluster-policy-ready.yaml
with:
bindings:
- name: name
value: check-image-notary
- name: step-02 - name: step-02
try: try:
- apply: - apply:

View file

@ -1,9 +0,0 @@
apiVersion: kyverno.io/v2beta1
kind: ClusterPolicy
metadata:
name: check-image-notary
status:
conditions:
- reason: Succeeded
status: "True"
type: Ready

View file

@ -6,12 +6,20 @@ spec:
timeouts: timeouts:
delete: 2m delete: 2m
steps: steps:
- name: step-01 - name: create policy
try: use:
- apply: template: ../../../../_step-templates/create-policy.yaml
file: policy.yaml with:
- assert: bindings:
file: policy-ready.yaml - name: file
value: policy.yaml
- name: wait policy ready
use:
template: ../../../../_step-templates/cluster-policy-ready.yaml
with:
bindings:
- name: name
value: check-image
- name: step-02 - name: step-02
try: try:
- apply: - apply:

View file

@ -1,9 +0,0 @@
apiVersion: kyverno.io/v2beta1
kind: ClusterPolicy
metadata:
name: check-image
status:
conditions:
- reason: Succeeded
status: "True"
type: Ready

View file

@ -4,12 +4,20 @@ metadata:
name: sigstore-attestation-verification-regexp name: sigstore-attestation-verification-regexp
spec: spec:
steps: steps:
- name: step-01 - name: create policy
try: use:
- apply: template: ../../../../_step-templates/create-policy.yaml
file: policy.yaml with:
- assert: bindings:
file: policy-assert.yaml - name: file
value: policy.yaml
- name: wait policy ready
use:
template: ../../../../_step-templates/cluster-policy-ready.yaml
with:
bindings:
- name: name
value: sigstore-attestation-verification-regexp
- name: step-02 - name: step-02
try: try:
- apply: - apply:

View file

@ -1,9 +0,0 @@
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: sigstore-attestation-verification-regexp
status:
conditions:
- reason: Succeeded
status: "True"
type: Ready

View file

@ -4,12 +4,20 @@ metadata:
name: sigstore-attestation-verification name: sigstore-attestation-verification
spec: spec:
steps: steps:
- name: step-01 - name: create policy
try: use:
- apply: template: ../../../../_step-templates/create-policy.yaml
file: policy.yaml with:
- assert: bindings:
file: policy-assert.yaml - name: file
value: policy.yaml
- name: wait policy ready
use:
template: ../../../../_step-templates/cluster-policy-ready.yaml
with:
bindings:
- name: name
value: sigstore-attestation-verification
- name: step-02 - name: step-02
try: try:
- apply: - apply:

View file

@ -1,10 +0,0 @@
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: sigstore-attestation-verification
status:
conditions:
- reason: Succeeded
status: "True"
type: Ready

View file

@ -4,12 +4,20 @@ metadata:
name: sigstore-image-verification name: sigstore-image-verification
spec: spec:
steps: steps:
- name: step-01 - name: create policy
try: use:
- apply: template: ../../../../_step-templates/create-policy.yaml
file: policy.yaml with:
- assert: bindings:
file: policy-assert.yaml - name: file
value: policy.yaml
- name: wait policy ready
use:
template: ../../../../_step-templates/cluster-policy-ready.yaml
with:
bindings:
- name: name
value: sigstore-image-verification
- name: step-02 - name: step-02
try: try:
- apply: - apply:

View file

@ -1,10 +0,0 @@
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: sigstore-image-verification
status:
conditions:
- reason: Succeeded
status: "True"
type: Ready

View file

@ -6,12 +6,20 @@ spec:
timeouts: timeouts:
delete: 2m delete: 2m
steps: steps:
- name: step-01 - name: create policy
try: use:
- apply: template: ../../../../_step-templates/create-policy.yaml
file: policy.yaml with:
- assert: bindings:
file: policy-ready.yaml - name: file
value: policy.yaml
- name: wait policy ready
use:
template: ../../../../_step-templates/cluster-policy-ready.yaml
with:
bindings:
- name: name
value: verify-exclude-refs
- name: step-02 - name: step-02
try: try:
- apply: - apply:

View file

@ -1,9 +0,0 @@
apiVersion: kyverno.io/v2beta1
kind: ClusterPolicy
metadata:
name: verify-exclude-refs
status:
conditions:
- reason: Succeeded
status: "True"
type: Ready

View file

@ -4,12 +4,20 @@ metadata:
name: update-multi-containers name: update-multi-containers
spec: spec:
steps: steps:
- name: step-01 - name: create policy
try: use:
- apply: template: ../../../../_step-templates/create-policy.yaml
file: policy.yaml with:
- assert: bindings:
file: policy-assert.yaml - name: file
value: policy.yaml
- name: wait policy ready
use:
template: ../../../../_step-templates/cluster-policy-ready.yaml
with:
bindings:
- name: name
value: verify-image-signature
- name: step-02 - name: step-02
try: try:
- apply: - apply:

View file

@ -1,9 +0,0 @@
apiVersion: kyverno.io/v2beta1
kind: ClusterPolicy
metadata:
name: verify-image-signature
status:
conditions:
- reason: Succeeded
status: "True"
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: keyed-basic-policy
status:
conditions:
- reason: Succeeded
status: "True"
type: Ready

View file

@ -9,11 +9,21 @@ spec:
- name: step-01 - name: step-01
try: try:
- apply: - apply:
file: chainsaw-step-01-apply-1.yaml file: ns.yaml
- apply: - name: create policy
file: chainsaw-step-01-apply-2.yaml use:
- assert: template: ../../../../_step-templates/create-policy.yaml
file: chainsaw-step-01-assert-1.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: keyed-basic-policy
- name: step-02 - name: step-02
try: try:
- apply: - apply:

View file

@ -1,9 +0,0 @@
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: keyed-basic-policy
status:
conditions:
- reason: Succeeded
status: "True"
type: Ready

View file

@ -9,11 +9,21 @@ spec:
- name: step-01 - name: step-01
try: try:
- apply: - apply:
file: chainsaw-step-01-apply-1.yaml file: ns.yaml
- apply: - name: create policy
file: chainsaw-step-01-apply-2.yaml use:
- assert: template: ../../../../_step-templates/create-policy.yaml
file: chainsaw-step-01-assert-1.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: keyed-basic-policy
- name: step-02 - name: step-02
try: try:
- apply: - apply:

View file

@ -1,9 +0,0 @@
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: keyed-basic-policy
status:
conditions:
- reason: Succeeded
status: "True"
type: Ready

View file

@ -9,17 +9,25 @@ spec:
- name: step-01 - name: step-01
try: try:
- apply: - apply:
file: chainsaw-step-01-apply-1.yaml file: ns.yaml
- apply: - apply:
file: chainsaw-step-01-apply-2.yaml file: chainsaw-step-01-apply-2.yaml
- assert: - assert:
file: chainsaw-step-01-assert-1.yaml file: chainsaw-step-01-assert-1.yaml
- name: step-02 - name: create policy
try: use:
- apply: template: ../../../../_step-templates/create-policy.yaml
file: chainsaw-step-02-apply-1.yaml with:
- assert: bindings:
file: chainsaw-step-02-assert-1.yaml - name: file
value: policy.yaml
- name: wait policy ready
use:
template: ../../../../_step-templates/cluster-policy-ready.yaml
with:
bindings:
- name: name
value: keyed-basic-policy
- name: step-03 - name: step-03
try: try:
- assert: - assert:

View file

@ -6,21 +6,34 @@ spec:
timeouts: timeouts:
delete: 2m delete: 2m
steps: steps:
- name: step-01 - name: step-01
try: try:
- apply: - apply:
file: ns.yaml file: ns.yaml
- apply: - name: create policy
file: mut-cpol.yaml use:
- assert: template: ../../../../_step-templates/create-policy.yaml
file: mut-cpol-assert.yaml with:
- apply: bindings:
file: img-cpol.yaml - name: file
- assert: value: policy.yaml
file: img-cpol-assert.yaml - name: wait policy ready
- name: step-02 use:
try: template: ../../../../_step-templates/cluster-policy-ready.yaml
- apply: with:
file: test-pod.yaml bindings:
- assert: - name: name
file: test-pod-assert.yaml value: with-mutation-img
- name: wait policy ready
use:
template: ../../../../_step-templates/cluster-policy-ready.yaml
with:
bindings:
- name: name
value: with-mutation-mut
- name: step-02
try:
- apply:
file: test-pod.yaml
- assert:
file: test-pod-assert.yaml

View file

@ -1,9 +0,0 @@
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: with-mutation-img
status:
conditions:
- reason: Succeeded
status: "True"
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: with-mutation-mut
status:
conditions:
- reason: Succeeded
status: "True"
type: Ready

View file

@ -1,22 +0,0 @@
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: with-mutation-mut
spec:
background: false
failurePolicy: Fail
rules:
- match:
any:
- resources:
kinds:
- Pod
name: with-mutation-rule
mutate:
patchStrategicMerge:
spec:
containers:
- (name): test-secret
image: "ghcr.io/kyverno/test-verify-image:signed"
validationFailureAction: Enforce
webhookTimeoutSeconds: 30

View file

@ -28,3 +28,26 @@ spec:
- ghcr.io/kyverno/test-verify-image:* - ghcr.io/kyverno/test-verify-image:*
validationFailureAction: Enforce validationFailureAction: Enforce
webhookTimeoutSeconds: 30 webhookTimeoutSeconds: 30
---
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: with-mutation-mut
spec:
background: false
failurePolicy: Fail
rules:
- match:
any:
- resources:
kinds:
- Pod
name: with-mutation-rule
mutate:
patchStrategicMerge:
spec:
containers:
- (name): test-secret
image: "ghcr.io/kyverno/test-verify-image:signed"
validationFailureAction: Enforce
webhookTimeoutSeconds: 30