1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-04-09 18:52:36 +00:00
kyverno/pkg/controllers
Shivam Kumar 9f5e75a2b5
Test/ttl cleanup deletion policy (#11277)
* Added propagationPolicy to TTL controller for resource deletion

Signed-off-by: ShivamJha2436 <shivamkumar87148@gmail.com>

* Added per-resource deletion policy with optional global default

Signed-off-by: ShivamJha2436 <shivamkumar87148@gmail.com>

* Fix: Added nil check for annotations to prevent runtime errors

Signed-off-by: ShivamJha2436 <shivamkumar87148@gmail.com>

* Fix: Moved logic for retrieving propagation policy from annotations to a dedicated function

Signed-off-by: ShivamJha2436 <shivamkumar87148@gmail.com>

* Fix: Resolve merge conflict in controller.go and update propagation policy handling
- Added missing gvr field from main branch
- Improved annotation naming as per team discussion
- Moved propagation policy logic closer to usage

Signed-off-by: ShivamJha2436 <shivamkumar87148@gmail.com>

* Simplified propagation policy logic

Signed-off-by: ShivamJha2436 <shivamkumar87148@gmail.com>

* Add unit tests for controller.go

Signed-off-by: ShivamJha2436 <shivamkumar87148@gmail.com>

* Removed the test file for controller.go and fixed the lint error

Signed-off-by: ShivamJha2436 <shivamkumar87148@gmail.com>

* test: add unit tests for deletion propagation policy in TTL-based cleanup

Signed-off-by: ShivamJha2436 <shivamkumar87148@gmail.com>

* Resolved conflicts

Signed-off-by: ShivamJha2436 <shivamkumar87148@gmail.com>

* Resolved conflicts

Signed-off-by: ShivamJha2436 <shivamkumar87148@gmail.com>

* Resolved merge conflict

Signed-off-by: ShivamJha2436 <shivamkumar87148@gmail.com>

* Fix:Updated the unit tests

Signed-off-by: ShivamJha2436 <shivamkumar87148@gmail.com>

* Fix: Removed the method receiver from determinePropagationPolicy as it does not require access to the controller struct

Signed-off-by: ShivamJha2436 <shivamkumar87148@gmail.com>

* Fix: Fixed the formatting issue

Signed-off-by: ShivamJha2436 <shivamkumar87148@gmail.com>

* Fix: removed the switch statement inside the test case

Signed-off-by: ShivamJha2436 <shivamkumar87148@gmail.com>

* Updated the controller.go

Signed-off-by: ShivamJha2436 <shivamkumar87148@gmail.com>

* Resolved the formatting issue

Signed-off-by: ShivamJha2436 <shivamkumar87148@gmail.com>

* Fixing the deleted resource label in controller.go

Signed-off-by: ShivamJha2436 <shivamkumar87148@gmail.com>

* Fixed the linter issue

Signed-off-by: ShivamJha2436 <shivamkumar87148@gmail.com>

---------

Signed-off-by: ShivamJha2436 <shivamkumar87148@gmail.com>
Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-10-07 13:44:55 +00:00
..
certmanager feat: bump to k8s 1.31 (#10938) 2024-08-28 17:09:58 +00:00
cleanup feat: bump to k8s 1.31 (#10938) 2024-08-28 17:09:58 +00:00
exceptions feat: bump to k8s 1.31 (#10938) 2024-08-28 17:09:58 +00:00
generic fix: make webhook cleanup setup optional and add cleanup ci test (#11077) 2024-09-11 08:38:45 +02:00
globalcontext feat: bump to k8s 1.31 (#10938) 2024-08-28 17:09:58 +00:00
metrics/policy fix: return policies with either audit or enforce rules from the cache (#10667) 2024-08-06 18:24:28 +00:00
policycache feat: bump to k8s 1.31 (#10938) 2024-08-28 17:09:58 +00:00
report feat: add reporting to mutate and generate rules (#11265) 2024-10-02 12:05:05 +00:00
ttl Test/ttl cleanup deletion policy (#11277) 2024-10-07 13:44:55 +00:00
validatingadmissionpolicy-generate chore: remove v1alpha1 of VAPs and use v1beta1 (#10955) 2024-08-29 15:31:25 +00:00
webhook fix: webhooks reconciliation with policies (#11233) 2024-09-25 12:12:08 +00:00
controller.go fix: add workers to the controller interface (#4776) 2022-10-03 07:55:59 +00:00