Kyverno
Medium
Security
A Kyverno DeletingPolicy for ConfigMaps never deletes anything, and the cleanup controller logs 'skipping resource due to access restrictions'. What is missing?
Select your answer:
Show answer and explanation
Answer: List and delete RBAC for the cleanup controller's service account
Explanation
The cleanup controller lists and deletes resources with its own service account, and a forbidden error on the list is treated as permanent, so it skips that resource type and only logs the message. Grant the verbs in a ClusterRole labeled rbac.kyverno.io/aggregate-to-cleanup-controller: "true", which the chart's aggregated role picks up. Operations are not checked during a deletion scan, so adding DELETE changes nothing.
More medium Kyverno questions
- A Kyverno DeletingPolicy with schedule '0 * * * *' has never run yet. When does the cleanup controller first evaluate it?
- What happens when a resource violates a Kyverno validation policy with 'validationFailureAction' set to 'enforce'?
- What is the purpose of a generation rule in Kyverno?
- Which of the following is NOT a valid resource selection method in Kyverno policies?
- What is the purpose of the 'background' field in a Kyverno policy?
- What is the purpose of the 'validationFailureAction' field in a Kyverno policy?