1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-14 11:57:48 +00:00
kyverno/pkg/policy
Mike Bryant 91021b65b6
fix: Delete downstream objects on precondition fail (#7496)
* fix: Delete downstream objects on precondition fail

When a rule fails the match in a generate rule, the downstream resource gets deleted. This will now also happen if the rule is skipped due to a precondition.

Signed-off-by: Mike Bryant <mike.bryant@mettle.co.uk>

* add debug command

Signed-off-by: ShutingZhao <shuting@nirmata.com>

* sync trigger updates to downstream

Signed-off-by: ShutingZhao <shuting@nirmata.com>

* fix bgscan fetching trigger

Signed-off-by: ShutingZhao <shuting@nirmata.com>

* fix: Move rbac change into tests for better isolation

Signed-off-by: Mike Bryant <mike.bryant@mettle.co.uk>

* fix unit test

Signed-off-by: ShutingZhao <shuting@nirmata.com>

---------

Signed-off-by: Mike Bryant <mike.bryant@mettle.co.uk>
Signed-off-by: ShutingZhao <shuting@nirmata.com>
Co-authored-by: shuting <shuting@nirmata.com>
2023-06-15 11:32:19 -04:00
..
common Replaces manually written logic with regex for matching anchor elements (#6133) 2023-01-30 12:17:19 +00:00
generate require generate.apiVersion (#7080) 2023-05-03 10:33:29 +00:00
mutate fix: permission validation message (#7362) 2023-05-31 19:14:32 +00:00
validate feat: support cel expression in validate rules (#7070) 2023-05-31 14:30:55 -07:00
generate.go fix: Delete downstream objects on precondition fail (#7496) 2023-06-15 11:32:19 -04:00
mutate.go refactor: introduce jmespath interface (#6882) 2023-04-13 11:29:40 +00:00
policy_controller.go refactor: generate reconciliation on policy updates (#7531) 2023-06-14 13:52:27 +00:00
updaterequest.go fix: delete downstream for a generate rule removal, with data and sync (#6393) 2023-03-01 03:48:18 +00:00
utils.go fix: Delete downstream objects on precondition fail (#7496) 2023-06-15 11:32:19 -04:00
utils_test.go fix: Delete downstream objects on precondition fail (#7496) 2023-06-15 11:32:19 -04:00