k8wiz
Kyverno
Hard
Validation

In recent Kyverno versions, where should you set Enforce or Audit for a validate rule?

Select your answer:

Show answer and explanation

Answer: In validate.failureAction on each rule

Explanation

Setting the action per rule lets one policy mix enforced and audited rules. Policies that still set spec.validationFailureAction keep working, but the field is deprecated, so new policies should use validate.failureAction.