mirror of
https://github.com/kyverno/kyverno.git
synced 2024-12-14 11:57:48 +00:00
fix: kuttl tests for force-failure-policy-ignore config (#6840)
* fix: kuttl tests for force-failure-policy-ignore config Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com> * fix Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com> --------- Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
This commit is contained in:
parent
289ff3e1ce
commit
ed08a939ac
3 changed files with 54 additions and 14 deletions
|
@ -7,3 +7,13 @@ status:
|
||||||
- reason: Succeeded
|
- reason: Succeeded
|
||||||
status: "True"
|
status: "True"
|
||||||
type: Ready
|
type: Ready
|
||||||
|
---
|
||||||
|
apiVersion: kyverno.io/v1
|
||||||
|
kind: ClusterPolicy
|
||||||
|
metadata:
|
||||||
|
name: add-labels
|
||||||
|
status:
|
||||||
|
conditions:
|
||||||
|
- reason: Succeeded
|
||||||
|
status: "True"
|
||||||
|
type: Ready
|
||||||
|
|
|
@ -21,3 +21,27 @@ spec:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
team: '?*'
|
team: '?*'
|
||||||
|
---
|
||||||
|
apiVersion: kyverno.io/v1
|
||||||
|
kind: ClusterPolicy
|
||||||
|
metadata:
|
||||||
|
name: add-labels
|
||||||
|
spec:
|
||||||
|
failurePolicy: Fail
|
||||||
|
validationFailureAction: Enforce
|
||||||
|
background: false
|
||||||
|
rules:
|
||||||
|
- name: add-labels
|
||||||
|
match:
|
||||||
|
any:
|
||||||
|
- resources:
|
||||||
|
kinds:
|
||||||
|
- Pod
|
||||||
|
- Service
|
||||||
|
- ConfigMap
|
||||||
|
- Secret
|
||||||
|
mutate:
|
||||||
|
patchStrategicMerge:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
foo: bar
|
||||||
|
|
|
@ -5,6 +5,26 @@ metadata:
|
||||||
webhook.kyverno.io/managed-by: kyverno
|
webhook.kyverno.io/managed-by: kyverno
|
||||||
name: kyverno-resource-validating-webhook-cfg
|
name: kyverno-resource-validating-webhook-cfg
|
||||||
webhooks:
|
webhooks:
|
||||||
|
- admissionReviewVersions:
|
||||||
|
- v1
|
||||||
|
clientConfig:
|
||||||
|
service:
|
||||||
|
name: kyverno-svc
|
||||||
|
namespace: kyverno
|
||||||
|
path: /validate/ignore
|
||||||
|
port: 443
|
||||||
|
failurePolicy: Ignore
|
||||||
|
matchPolicy: Equivalent
|
||||||
|
name: validate.kyverno.svc-ignore
|
||||||
|
sideEffects: NoneOnDryRun
|
||||||
|
---
|
||||||
|
apiVersion: admissionregistration.k8s.io/v1
|
||||||
|
kind: MutatingWebhookConfiguration
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
webhook.kyverno.io/managed-by: kyverno
|
||||||
|
name: kyverno-resource-mutating-webhook-cfg
|
||||||
|
webhooks:
|
||||||
- admissionReviewVersions:
|
- admissionReviewVersions:
|
||||||
- v1
|
- v1
|
||||||
clientConfig:
|
clientConfig:
|
||||||
|
@ -16,18 +36,4 @@ webhooks:
|
||||||
failurePolicy: Ignore
|
failurePolicy: Ignore
|
||||||
matchPolicy: Equivalent
|
matchPolicy: Equivalent
|
||||||
name: mutate.kyverno.svc-ignore
|
name: mutate.kyverno.svc-ignore
|
||||||
rules:
|
|
||||||
- apiGroups:
|
|
||||||
- ""
|
|
||||||
apiVersions:
|
|
||||||
- v1
|
|
||||||
operations:
|
|
||||||
- CREATE
|
|
||||||
- UPDATE
|
|
||||||
- DELETE
|
|
||||||
- CONNECT
|
|
||||||
resources:
|
|
||||||
- pods
|
|
||||||
- pods/ephemeralcontainers
|
|
||||||
scope: '*'
|
|
||||||
sideEffects: NoneOnDryRun
|
sideEffects: NoneOnDryRun
|
||||||
|
|
Loading…
Reference in a new issue