Kyverno
Medium
Security
A GeneratingPolicy that clones a Secret into new namespaces fails with a forbidden error. Which label on a ClusterRole merges its rules into the Kyverno background controller's permissions?
Select your answer:
Show answer and explanation
Answer: rbac.kyverno.io/aggregate-to-background-controller: "true"
Explanation
The background controller creates generated resources, and its ClusterRole has an aggregation rule that selects ClusterRoles labeled rbac.kyverno.io/aggregate-to-background-controller: "true". The default Helm install lets it write NetworkPolicies, ConfigMaps, quotas, LimitRanges, Roles and RoleBindings, but not Secrets in other namespaces, so cloning Secrets needs this extra ClusterRole.
More medium Kyverno questions
- 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?
- Which of the following is a valid JMESPath expression in a Kyverno policy?