diff --git a/test/conformance/kuttl/kuttl-test.yaml b/test/conformance/kuttl/kuttl-test.yaml index f147af23df..ff74b20090 100644 --- a/test/conformance/kuttl/kuttl-test.yaml +++ b/test/conformance/kuttl/kuttl-test.yaml @@ -22,6 +22,8 @@ testDirs: # Report tests - ./test/conformance/kuttl/reports/admission - ./test/conformance/kuttl/reports/background +# Webhooks +- ./test/conformance/kuttl/webhooks startKIND: false # timeout: 15 parallel: 1 diff --git a/test/conformance/kuttl/webhooks/expected-webhooks/00-webhooks.yaml b/test/conformance/kuttl/webhooks/expected-webhooks/00-webhooks.yaml new file mode 100644 index 0000000000..7048b639a6 --- /dev/null +++ b/test/conformance/kuttl/webhooks/expected-webhooks/00-webhooks.yaml @@ -0,0 +1,4 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +assert: +- webhooks.yaml diff --git a/test/conformance/kuttl/webhooks/expected-webhooks/README.md b/test/conformance/kuttl/webhooks/expected-webhooks/README.md new file mode 100644 index 0000000000..6d310c94ab --- /dev/null +++ b/test/conformance/kuttl/webhooks/expected-webhooks/README.md @@ -0,0 +1,11 @@ +## Description + +This test verifies expected webhooks are created. + +## Steps + +1. - Assert webhook `kyverno-policy-validating-webhook-cfg` exists + - Assert webhook `kyverno-resource-validating-webhook-cfg` exists + - Assert webhook `kyverno-policy-mutating-webhook-cfg` exists + - Assert webhook `kyverno-resource-mutating-webhook-cfg` exists + - Assert webhook `kyverno-verify-mutating-webhook-cfg` exists diff --git a/test/conformance/kuttl/webhooks/expected-webhooks/webhooks.yaml b/test/conformance/kuttl/webhooks/expected-webhooks/webhooks.yaml new file mode 100644 index 0000000000..5cbb2e7544 --- /dev/null +++ b/test/conformance/kuttl/webhooks/expected-webhooks/webhooks.yaml @@ -0,0 +1,34 @@ +apiVersion: admissionregistration.k8s.io/v1 +kind: ValidatingWebhookConfiguration +metadata: + labels: + webhook.kyverno.io/managed-by: kyverno + name: kyverno-policy-validating-webhook-cfg +--- +apiVersion: admissionregistration.k8s.io/v1 +kind: ValidatingWebhookConfiguration +metadata: + labels: + webhook.kyverno.io/managed-by: kyverno + name: kyverno-resource-validating-webhook-cfg +--- +apiVersion: admissionregistration.k8s.io/v1 +kind: MutatingWebhookConfiguration +metadata: + labels: + webhook.kyverno.io/managed-by: kyverno + name: kyverno-policy-mutating-webhook-cfg +--- +apiVersion: admissionregistration.k8s.io/v1 +kind: MutatingWebhookConfiguration +metadata: + labels: + webhook.kyverno.io/managed-by: kyverno + name: kyverno-resource-mutating-webhook-cfg +--- +apiVersion: admissionregistration.k8s.io/v1 +kind: MutatingWebhookConfiguration +metadata: + labels: + webhook.kyverno.io/managed-by: kyverno + name: kyverno-verify-mutating-webhook-cfg