Kyverno
Hard
Policies
Why must background be set to false on a Kyverno policy whose rules use request.userInfo, such as the requesting user's name or roles?
Select your answer:
Show answer and explanation
Answer: Background scans run without an admission request, so there's no user
Explanation
Background scans check resources already stored in the cluster, outside any admission request, so there's no requesting user, group or role. Kyverno requires background: false for rules that use variables only an admission request provides, and those rules then run only at admission time.
More hard Kyverno questions
- In recent Kyverno versions, where should you set Enforce or Audit for a validate rule?
- Kyverno 1.16 ships CEL-based policy types at API version v1beta1. Which one validates resources with CEL expressions, in the style of Kubernetes ValidatingAdmissionPolicy?
- What is the purpose of the 'context' field in a Kyverno policy?
- Which of the following is NOT a valid variable source in a Kyverno context?
- What is the purpose of the 'foreach' field in a Kyverno rule?
- Which of the following is NOT a component of the Kyverno architecture?