1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-04-15 16:56:56 +00:00
kyverno/test/conformance/kuttl/events/clusterpolicy/generate-events-upon-fail-generation/README.md

16 lines
381 B
Markdown
Raw Normal View History

fix: generate policy fails if triggered resource name exceeds 63 characters limit (#8466) (#8835) * fix: generate label resource name character length issue * add source label * modify newUR function * fix * improve readability * remove generate source name label * Revert changes * update ResourceSpec * add URGenerateResourceUIDLabel * make codegen crds all * make codegen client all * add GenerateSourceUIDLabel * modify comment * make codegen crds all * make codegen-docs-all * make codegen-all * set trigger uid * add uid in transform() * add name label * fix: use resource name labels along with its UID * fix: use the resource name label only if its uid label isn't set * fix * add kuttl tests * fix: delete the trigger resource in the test * fix: delete the source in the kuttl test * add generate trigger uid label * modify TriggerInfo function * populate uid field for new update requests * populate new ur spec with uid * handle downstream resources cleanup * populate uid of ur status * fetch triggers by the UID label * label triggers * fetch trigger by comparing UID * fetch cloneList downstream resource by UID * update test names * remove trigger name label assertions from kuttl tests * add unit name selector * add sleep * assert events on failures * rename tests --------- Signed-off-by: Chandan-DK <chandandk468@gmail.com> Signed-off-by: Chip Zoller <chipzoller@gmail.com> Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com> Signed-off-by: shuting <shuting@nirmata.com> Signed-off-by: ShutingZhao <shuting@nirmata.com> Co-authored-by: Chandan-DK <chandandk468@gmail.com> Co-authored-by: Chip Zoller <chipzoller@gmail.com> Co-authored-by: Mariam Fahmy <mariam.fahmy@nirmata.com> Co-authored-by: shuting <shuting@nirmata.com>
2023-11-06 11:26:39 +00:00
## Description
This test creates a generate policy, and a resource. A `PolicyError` event should be created upon the failure.
## Steps
1. - Create a policy
- Assert the policy becomes ready
1. - Create a resource
1. - Asset a `PolicyError` event is created
## Reference Issue(s)
https://github.com/kyverno/kyverno/pull/8466
https://github.com/kyverno/kyverno/pull/1413