Kyverno
Hard
Testing
A CI job runs kyverno test policies/ but a directory rename means no kyverno-test.yaml files are found. Which flag makes the job fail instead of passing?
Select your answer:
Show answer and explanation
Answer: --require-tests
Explanation
When no test files are found, kyverno test prints "No test yamls available" and still exits successfully, so the CI job passes without testing anything. --require-tests turns that case into an error. --fail-only only limits the output to failing tests.
More hard Kyverno questions
- After an upgrade to Kyverno 1.20, Argo CD reports a legacy ClusterPolicy as out of sync on every reconcile, though its manifest never changed. Why?
- A GeneratingPolicy with synchronize enabled defines its resources inline. What does setting evaluation.orphanDownstreamOnPolicyDelete.enabled to true change?
- A Kyverno MutatingPolicy matches Pods, keeps the default autogen settings and uses a JSONPatch on /metadata/annotations. What happens in its Deployment variant?
- What is the purpose of the 'context' field in a Kyverno policy?
- What is the purpose of the 'foreach' field in a Kyverno rule?
- Which of the following is NOT a component of the Kyverno architecture?