1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-06 16:06:56 +00:00
kyverno/test/conformance/chainsaw/webhooks/policy-clusterpolicy-same-resource
Florian Hopfensperger 8781a38849
feat: configure webhook scope based on resource and policy type (#8065)
* feat: configure webhook scope based on policy type

Signed-off-by: Florian Hopfensperger <florian.hopfensperger@allianz.de>

* Update pkg/controllers/webhook/controller.go

Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: shuting <shuting@nirmata.com>

* feat: configure webhook scope based on resource type

Signed-off-by: Florian Hopfensperger <florian.hopfensperger@allianz.de>

* review comments

Signed-off-by: Florian Hopfensperger <florian.hopfensperger@allianz.de>

* sorting of webhooks

Signed-off-by: Florian Hopfensperger <florian.hopfensperger@allianz.de>

* Update pkg/controllers/webhook/utils.go

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* fix imports

Signed-off-by: Florian Hopfensperger <florian.hopfensperger@allianz.de>

---------

Signed-off-by: Florian Hopfensperger <florian.hopfensperger@allianz.de>
Signed-off-by: shuting <shuting@nirmata.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Co-authored-by: shuting <shuting@nirmata.com>
Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-01-26 15:07:42 +00:00
..
chainsaw-test.yaml feat: configure webhook scope based on resource and policy type (#8065) 2024-01-26 15:07:42 +00:00
clusterpolicy-assert.yaml feat: configure webhook scope based on resource and policy type (#8065) 2024-01-26 15:07:42 +00:00
clusterpolicy.yaml feat: configure webhook scope based on resource and policy type (#8065) 2024-01-26 15:07:42 +00:00
policy-assert.yaml feat: configure webhook scope based on resource and policy type (#8065) 2024-01-26 15:07:42 +00:00
policy.yaml feat: configure webhook scope based on resource and policy type (#8065) 2024-01-26 15:07:42 +00:00
README.md feat: configure webhook scope based on resource and policy type (#8065) 2024-01-26 15:07:42 +00:00
webhooks.yaml feat: configure webhook scope based on resource and policy type (#8065) 2024-01-26 15:07:42 +00:00

Description

This test verifies the resource validation webhook is configured correctly when a Policy and ClusterPolicy target the ConfigMap resource.

Steps

    • Create a Policy targeting ConfigMap
    • Create a ClusterPolicy targeting ConfigMap
    • Assert polices get ready
    • Assert that the resource validation webhook is configured correctly