mirror of
https://github.com/kyverno/kyverno.git
synced 2024-12-14 11:57:48 +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:
parent
778d81a865
commit
97f2d25aaa
75 changed files with 435 additions and 462 deletions
|
@ -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
|
|
@ -4,12 +4,20 @@ metadata:
|
|||
name: keyless-attestations-multiple-subjects-4
|
||||
spec:
|
||||
steps:
|
||||
- name: step-01
|
||||
try:
|
||||
- apply:
|
||||
file: chainsaw-step-01-apply-1.yaml
|
||||
- assert:
|
||||
file: chainsaw-step-01-assert-1.yaml
|
||||
- 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: check-slsa-attestations-pass-4
|
||||
- name: step-02
|
||||
try:
|
||||
- apply:
|
||||
|
|
|
@ -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
|
|
@ -4,12 +4,20 @@ metadata:
|
|||
name: keyless-attestations-multiple-subjects-counts-1
|
||||
spec:
|
||||
steps:
|
||||
- name: step-01
|
||||
try:
|
||||
- apply:
|
||||
file: chainsaw-step-01-apply-1.yaml
|
||||
- assert:
|
||||
file: chainsaw-step-01-assert-1.yaml
|
||||
- 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: check-slsa-attestations-pass-3
|
||||
- name: step-02
|
||||
try:
|
||||
- apply:
|
||||
|
|
|
@ -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
|
|
@ -4,12 +4,20 @@ metadata:
|
|||
name: keyless-attestations-multiple-subjects-counts-2
|
||||
spec:
|
||||
steps:
|
||||
- name: step-01
|
||||
try:
|
||||
- apply:
|
||||
file: chainsaw-step-01-apply-1.yaml
|
||||
- assert:
|
||||
file: chainsaw-step-01-assert-1.yaml
|
||||
- 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: check-slsa-attestations-fail-2
|
||||
- name: step-02
|
||||
try:
|
||||
- apply:
|
||||
|
|
|
@ -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
|
|
@ -4,12 +4,20 @@ metadata:
|
|||
name: keyless-attestations-multiple-subjects-counts-3
|
||||
spec:
|
||||
steps:
|
||||
- name: step-01
|
||||
try:
|
||||
- apply:
|
||||
file: chainsaw-step-01-apply-1.yaml
|
||||
- assert:
|
||||
file: chainsaw-step-01-assert-1.yaml
|
||||
- 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: check-slsa-attestations-fail-3
|
||||
- name: step-02
|
||||
try:
|
||||
- apply:
|
||||
|
|
|
@ -6,12 +6,20 @@ spec:
|
|||
timeouts:
|
||||
delete: 2m
|
||||
steps:
|
||||
- name: step-01
|
||||
try:
|
||||
- apply:
|
||||
file: policy.yaml
|
||||
- assert:
|
||||
file: policy-assert.yaml
|
||||
- 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: check-invalid-attestors
|
||||
- name: step-02
|
||||
try:
|
||||
- apply:
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
---
|
||||
apiVersion: kyverno.io/v1
|
||||
kind: ClusterPolicy
|
||||
metadata:
|
||||
name: check-invalid-attestors
|
||||
annotations:
|
||||
pod-policies.kyverno.io/autogen-controllers: none
|
|
@ -1,9 +0,0 @@
|
|||
apiVersion: kyverno.io/v1
|
||||
kind: ClusterPolicy
|
||||
metadata:
|
||||
name: keyless-mutatedigest-verifydigest-required
|
||||
status:
|
||||
conditions:
|
||||
- reason: Succeeded
|
||||
status: "True"
|
||||
type: Ready
|
|
@ -4,12 +4,20 @@ metadata:
|
|||
name: keyless-mutatedigest-verifydigest-required
|
||||
spec:
|
||||
steps:
|
||||
- name: step-01
|
||||
try:
|
||||
- apply:
|
||||
file: chainsaw-step-01-apply-1.yaml
|
||||
- assert:
|
||||
file: chainsaw-step-01-assert-1.yaml
|
||||
- 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: keyless-mutatedigest-verifydigest-required
|
||||
- name: step-02
|
||||
try:
|
||||
- apply:
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
apiVersion: kyverno.io/v1
|
||||
kind: ClusterPolicy
|
||||
metadata:
|
||||
name: keyless-nomutatedigest-noverifydigest-norequired
|
||||
status:
|
||||
conditions:
|
||||
- reason: Succeeded
|
||||
status: "True"
|
||||
type: Ready
|
|
@ -4,12 +4,20 @@ metadata:
|
|||
name: keyless-nomutatedigest-noverifydigest-norequired
|
||||
spec:
|
||||
steps:
|
||||
- name: step-01
|
||||
try:
|
||||
- apply:
|
||||
file: chainsaw-step-01-apply-1.yaml
|
||||
- assert:
|
||||
file: chainsaw-step-01-assert-1.yaml
|
||||
- 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: keyless-nomutatedigest-noverifydigest-norequired
|
||||
- name: step-02
|
||||
try:
|
||||
- apply:
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
apiVersion: kyverno.io/v1
|
||||
kind: ClusterPolicy
|
||||
metadata:
|
||||
name: keyless-nomutatedigest-noverifydigest-required
|
||||
status:
|
||||
conditions:
|
||||
- reason: Succeeded
|
||||
status: "True"
|
||||
type: Ready
|
|
@ -4,12 +4,20 @@ metadata:
|
|||
name: keyless-nomutatedigest-noverifydigest-required
|
||||
spec:
|
||||
steps:
|
||||
- name: step-01
|
||||
try:
|
||||
- apply:
|
||||
file: chainsaw-step-01-apply-1.yaml
|
||||
- assert:
|
||||
file: chainsaw-step-01-assert-1.yaml
|
||||
- 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: keyless-nomutatedigest-noverifydigest-required
|
||||
- name: step-02
|
||||
try:
|
||||
- apply:
|
||||
|
|
|
@ -6,12 +6,20 @@ spec:
|
|||
timeouts:
|
||||
delete: 2m
|
||||
steps:
|
||||
- name: step-01
|
||||
try:
|
||||
- apply:
|
||||
file: policy.yaml
|
||||
- assert:
|
||||
file: policy-ready.yaml
|
||||
- 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: check-image-attestation
|
||||
- name: step-02
|
||||
try:
|
||||
- apply:
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
apiVersion: kyverno.io/v2beta1
|
||||
kind: ClusterPolicy
|
||||
metadata:
|
||||
name: check-image-attestation
|
||||
status:
|
||||
conditions:
|
||||
- reason: Succeeded
|
||||
status: "True"
|
||||
type: Ready
|
|
@ -6,12 +6,20 @@ spec:
|
|||
timeouts:
|
||||
delete: 2m
|
||||
steps:
|
||||
- name: step-01
|
||||
try:
|
||||
- apply:
|
||||
file: policy.yaml
|
||||
- assert:
|
||||
file: policy-ready.yaml
|
||||
- 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: check-image-attestation
|
||||
- name: step-02
|
||||
try:
|
||||
- apply:
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
apiVersion: kyverno.io/v2beta1
|
||||
kind: ClusterPolicy
|
||||
metadata:
|
||||
name: check-image-attestation
|
||||
status:
|
||||
conditions:
|
||||
- reason: Succeeded
|
||||
status: "True"
|
||||
type: Ready
|
|
@ -6,12 +6,20 @@ spec:
|
|||
timeouts:
|
||||
delete: 2m
|
||||
steps:
|
||||
- name: step-01
|
||||
try:
|
||||
- apply:
|
||||
file: policy.yaml
|
||||
- assert:
|
||||
file: policy-ready.yaml
|
||||
- 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: check-image-attestation
|
||||
- name: step-02
|
||||
try:
|
||||
- apply:
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
apiVersion: kyverno.io/v2beta1
|
||||
kind: ClusterPolicy
|
||||
metadata:
|
||||
name: check-image-attestation
|
||||
status:
|
||||
conditions:
|
||||
- reason: Succeeded
|
||||
status: "True"
|
||||
type: Ready
|
|
@ -6,12 +6,20 @@ spec:
|
|||
timeouts:
|
||||
delete: 2m
|
||||
steps:
|
||||
- name: step-01
|
||||
try:
|
||||
- apply:
|
||||
file: policy.yaml
|
||||
- assert:
|
||||
file: policy-ready.yaml
|
||||
- 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: check-image-attestation
|
||||
- name: step-02
|
||||
try:
|
||||
- apply:
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
apiVersion: kyverno.io/v2beta1
|
||||
kind: ClusterPolicy
|
||||
metadata:
|
||||
name: check-image-attestation
|
||||
status:
|
||||
conditions:
|
||||
- reason: Succeeded
|
||||
status: "True"
|
||||
type: Ready
|
|
@ -1,9 +0,0 @@
|
|||
apiVersion: kyverno.io/v1
|
||||
kind: ClusterPolicy
|
||||
metadata:
|
||||
name: mutatedigest-policy
|
||||
status:
|
||||
conditions:
|
||||
- reason: Succeeded
|
||||
status: "True"
|
||||
type: Ready
|
|
@ -4,12 +4,20 @@ metadata:
|
|||
name: mutatedigest-noverifydigest-norequired
|
||||
spec:
|
||||
steps:
|
||||
- name: step-01
|
||||
try:
|
||||
- apply:
|
||||
file: chainsaw-step-01-apply-1.yaml
|
||||
- assert:
|
||||
file: chainsaw-step-01-assert-1.yaml
|
||||
- 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: mutatedigest-policy
|
||||
- name: step-02
|
||||
try:
|
||||
- apply:
|
||||
|
|
|
@ -6,12 +6,20 @@ spec:
|
|||
timeouts:
|
||||
delete: 2m
|
||||
steps:
|
||||
- name: step-01
|
||||
try:
|
||||
- apply:
|
||||
file: policy.yaml
|
||||
- assert:
|
||||
file: policy-ready.yaml
|
||||
- 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: image-verify-polset
|
||||
- name: step-02
|
||||
try:
|
||||
- apply:
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
apiVersion: kyverno.io/v1
|
||||
kind: ClusterPolicy
|
||||
metadata:
|
||||
name: image-verify-polset
|
||||
status:
|
||||
conditions:
|
||||
- reason: Succeeded
|
||||
status: "True"
|
||||
type: Ready
|
|
@ -1,9 +0,0 @@
|
|||
apiVersion: kyverno.io/v1
|
||||
kind: ClusterPolicy
|
||||
metadata:
|
||||
name: mutatedigest-policy
|
||||
status:
|
||||
conditions:
|
||||
- reason: Succeeded
|
||||
status: "True"
|
||||
type: Ready
|
|
@ -4,12 +4,20 @@ metadata:
|
|||
name: nomutatedigest-verifydigest-norequired
|
||||
spec:
|
||||
steps:
|
||||
- name: step-01
|
||||
try:
|
||||
- apply:
|
||||
file: chainsaw-step-01-apply-1.yaml
|
||||
- assert:
|
||||
file: chainsaw-step-01-assert-1.yaml
|
||||
- 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: mutatedigest-policy
|
||||
- name: step-02
|
||||
try:
|
||||
- apply:
|
||||
|
|
|
@ -6,12 +6,20 @@ spec:
|
|||
timeouts:
|
||||
delete: 2m
|
||||
steps:
|
||||
- name: step-01
|
||||
try:
|
||||
- apply:
|
||||
file: policy.yaml
|
||||
- assert:
|
||||
file: policy-ready.yaml
|
||||
- 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: check-image-attestation
|
||||
- name: step-02
|
||||
try:
|
||||
- apply:
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
apiVersion: kyverno.io/v2beta1
|
||||
kind: ClusterPolicy
|
||||
metadata:
|
||||
name: check-image-attestation
|
||||
status:
|
||||
conditions:
|
||||
- reason: Succeeded
|
||||
status: "True"
|
||||
type: Ready
|
|
@ -1,9 +0,0 @@
|
|||
apiVersion: kyverno.io/v1
|
||||
kind: ClusterPolicy
|
||||
metadata:
|
||||
name: secret-in-policy
|
||||
status:
|
||||
conditions:
|
||||
- reason: Succeeded
|
||||
status: "True"
|
||||
type: Ready
|
|
@ -12,12 +12,20 @@ spec:
|
|||
file: chainsaw-step-01-apply-1.yaml
|
||||
- apply:
|
||||
file: chainsaw-step-01-apply-2.yaml
|
||||
- apply:
|
||||
file: chainsaw-step-01-apply-3.yaml
|
||||
- name: step-02
|
||||
try:
|
||||
- apply:
|
||||
file: chainsaw-step-02-apply-1.yaml
|
||||
- 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: secret-in-policy
|
||||
- name: step-03
|
||||
try:
|
||||
- script:
|
||||
|
|
|
@ -6,12 +6,20 @@ spec:
|
|||
timeouts:
|
||||
delete: 2m
|
||||
steps:
|
||||
- name: step-01
|
||||
try:
|
||||
- apply:
|
||||
file: policy.yaml
|
||||
- assert:
|
||||
file: policy-ready.yaml
|
||||
- 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: check-image-notary
|
||||
- name: step-02
|
||||
try:
|
||||
- apply:
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
apiVersion: kyverno.io/v2beta1
|
||||
kind: ClusterPolicy
|
||||
metadata:
|
||||
name: check-image-notary
|
||||
status:
|
||||
conditions:
|
||||
- reason: Succeeded
|
||||
status: "True"
|
||||
type: Ready
|
|
@ -6,12 +6,20 @@ spec:
|
|||
timeouts:
|
||||
delete: 2m
|
||||
steps:
|
||||
- name: step-01
|
||||
try:
|
||||
- apply:
|
||||
file: policy.yaml
|
||||
- assert:
|
||||
file: policy-ready.yaml
|
||||
- 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: check-image
|
||||
- name: step-02
|
||||
try:
|
||||
- apply:
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
apiVersion: kyverno.io/v2beta1
|
||||
kind: ClusterPolicy
|
||||
metadata:
|
||||
name: check-image
|
||||
status:
|
||||
conditions:
|
||||
- reason: Succeeded
|
||||
status: "True"
|
||||
type: Ready
|
|
@ -4,12 +4,20 @@ metadata:
|
|||
name: sigstore-attestation-verification-regexp
|
||||
spec:
|
||||
steps:
|
||||
- name: step-01
|
||||
try:
|
||||
- apply:
|
||||
file: policy.yaml
|
||||
- assert:
|
||||
file: policy-assert.yaml
|
||||
- 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: sigstore-attestation-verification-regexp
|
||||
- name: step-02
|
||||
try:
|
||||
- apply:
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
apiVersion: kyverno.io/v1
|
||||
kind: ClusterPolicy
|
||||
metadata:
|
||||
name: sigstore-attestation-verification-regexp
|
||||
status:
|
||||
conditions:
|
||||
- reason: Succeeded
|
||||
status: "True"
|
||||
type: Ready
|
|
@ -4,12 +4,20 @@ metadata:
|
|||
name: sigstore-attestation-verification
|
||||
spec:
|
||||
steps:
|
||||
- name: step-01
|
||||
try:
|
||||
- apply:
|
||||
file: policy.yaml
|
||||
- assert:
|
||||
file: policy-assert.yaml
|
||||
- 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: sigstore-attestation-verification
|
||||
- name: step-02
|
||||
try:
|
||||
- apply:
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
apiVersion: kyverno.io/v1
|
||||
kind: ClusterPolicy
|
||||
metadata:
|
||||
name: sigstore-attestation-verification
|
||||
status:
|
||||
conditions:
|
||||
- reason: Succeeded
|
||||
status: "True"
|
||||
type: Ready
|
||||
|
|
@ -4,12 +4,20 @@ metadata:
|
|||
name: sigstore-image-verification
|
||||
spec:
|
||||
steps:
|
||||
- name: step-01
|
||||
try:
|
||||
- apply:
|
||||
file: policy.yaml
|
||||
- assert:
|
||||
file: policy-assert.yaml
|
||||
- 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: sigstore-image-verification
|
||||
- name: step-02
|
||||
try:
|
||||
- apply:
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
apiVersion: kyverno.io/v1
|
||||
kind: ClusterPolicy
|
||||
metadata:
|
||||
name: sigstore-image-verification
|
||||
status:
|
||||
conditions:
|
||||
- reason: Succeeded
|
||||
status: "True"
|
||||
type: Ready
|
||||
|
|
@ -6,12 +6,20 @@ spec:
|
|||
timeouts:
|
||||
delete: 2m
|
||||
steps:
|
||||
- name: step-01
|
||||
try:
|
||||
- apply:
|
||||
file: policy.yaml
|
||||
- assert:
|
||||
file: policy-ready.yaml
|
||||
- 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: verify-exclude-refs
|
||||
- name: step-02
|
||||
try:
|
||||
- apply:
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
apiVersion: kyverno.io/v2beta1
|
||||
kind: ClusterPolicy
|
||||
metadata:
|
||||
name: verify-exclude-refs
|
||||
status:
|
||||
conditions:
|
||||
- reason: Succeeded
|
||||
status: "True"
|
||||
type: Ready
|
|
@ -4,12 +4,20 @@ metadata:
|
|||
name: update-multi-containers
|
||||
spec:
|
||||
steps:
|
||||
- name: step-01
|
||||
try:
|
||||
- apply:
|
||||
file: policy.yaml
|
||||
- assert:
|
||||
file: policy-assert.yaml
|
||||
- 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: verify-image-signature
|
||||
- name: step-02
|
||||
try:
|
||||
- apply:
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
apiVersion: kyverno.io/v2beta1
|
||||
kind: ClusterPolicy
|
||||
metadata:
|
||||
name: verify-image-signature
|
||||
status:
|
||||
conditions:
|
||||
- reason: Succeeded
|
||||
status: "True"
|
||||
type: Ready
|
|
@ -1,9 +0,0 @@
|
|||
apiVersion: kyverno.io/v1
|
||||
kind: ClusterPolicy
|
||||
metadata:
|
||||
name: keyed-basic-policy
|
||||
status:
|
||||
conditions:
|
||||
- reason: Succeeded
|
||||
status: "True"
|
||||
type: Ready
|
|
@ -9,11 +9,21 @@ spec:
|
|||
- name: step-01
|
||||
try:
|
||||
- apply:
|
||||
file: chainsaw-step-01-apply-1.yaml
|
||||
- apply:
|
||||
file: chainsaw-step-01-apply-2.yaml
|
||||
- assert:
|
||||
file: chainsaw-step-01-assert-1.yaml
|
||||
file: ns.yaml
|
||||
- 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: keyed-basic-policy
|
||||
- name: step-02
|
||||
try:
|
||||
- apply:
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
apiVersion: kyverno.io/v1
|
||||
kind: ClusterPolicy
|
||||
metadata:
|
||||
name: keyed-basic-policy
|
||||
status:
|
||||
conditions:
|
||||
- reason: Succeeded
|
||||
status: "True"
|
||||
type: Ready
|
|
@ -9,11 +9,21 @@ spec:
|
|||
- name: step-01
|
||||
try:
|
||||
- apply:
|
||||
file: chainsaw-step-01-apply-1.yaml
|
||||
- apply:
|
||||
file: chainsaw-step-01-apply-2.yaml
|
||||
- assert:
|
||||
file: chainsaw-step-01-assert-1.yaml
|
||||
file: ns.yaml
|
||||
- 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: keyed-basic-policy
|
||||
- name: step-02
|
||||
try:
|
||||
- apply:
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
apiVersion: kyverno.io/v1
|
||||
kind: ClusterPolicy
|
||||
metadata:
|
||||
name: keyed-basic-policy
|
||||
status:
|
||||
conditions:
|
||||
- reason: Succeeded
|
||||
status: "True"
|
||||
type: Ready
|
|
@ -9,17 +9,25 @@ spec:
|
|||
- name: step-01
|
||||
try:
|
||||
- apply:
|
||||
file: chainsaw-step-01-apply-1.yaml
|
||||
file: ns.yaml
|
||||
- apply:
|
||||
file: chainsaw-step-01-apply-2.yaml
|
||||
- assert:
|
||||
file: chainsaw-step-01-assert-1.yaml
|
||||
- name: step-02
|
||||
try:
|
||||
- apply:
|
||||
file: chainsaw-step-02-apply-1.yaml
|
||||
- assert:
|
||||
file: chainsaw-step-02-assert-1.yaml
|
||||
- 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: keyed-basic-policy
|
||||
- name: step-03
|
||||
try:
|
||||
- assert:
|
||||
|
|
|
@ -6,21 +6,34 @@ spec:
|
|||
timeouts:
|
||||
delete: 2m
|
||||
steps:
|
||||
- name: step-01
|
||||
try:
|
||||
- apply:
|
||||
file: ns.yaml
|
||||
- apply:
|
||||
file: mut-cpol.yaml
|
||||
- assert:
|
||||
file: mut-cpol-assert.yaml
|
||||
- apply:
|
||||
file: img-cpol.yaml
|
||||
- assert:
|
||||
file: img-cpol-assert.yaml
|
||||
- name: step-02
|
||||
try:
|
||||
- apply:
|
||||
file: test-pod.yaml
|
||||
- assert:
|
||||
file: test-pod-assert.yaml
|
||||
- name: step-01
|
||||
try:
|
||||
- apply:
|
||||
file: ns.yaml
|
||||
- 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: 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
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
apiVersion: kyverno.io/v1
|
||||
kind: ClusterPolicy
|
||||
metadata:
|
||||
name: with-mutation-img
|
||||
status:
|
||||
conditions:
|
||||
- reason: Succeeded
|
||||
status: "True"
|
||||
type: Ready
|
|
@ -1,9 +0,0 @@
|
|||
apiVersion: kyverno.io/v1
|
||||
kind: ClusterPolicy
|
||||
metadata:
|
||||
name: with-mutation-mut
|
||||
status:
|
||||
conditions:
|
||||
- reason: Succeeded
|
||||
status: "True"
|
||||
type: Ready
|
|
@ -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
|
|
@ -28,3 +28,26 @@ spec:
|
|||
- ghcr.io/kyverno/test-verify-image:*
|
||||
validationFailureAction: Enforce
|
||||
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
|
Loading…
Reference in a new issue