Kyverno
Easy
Generation
Which CEL function does a Kyverno GeneratingPolicy call in a generate expression to create resources in a namespace?
Select your answer:
Show answer and explanation
Answer: generator.Apply(namespace, [resources])
Explanation
The GeneratingPolicy generator library provides generator.Apply, which takes a target namespace and a list of resource objects and creates them there. It returns true on success, so it also works inside CEL loops such as list.all(...). resource.Get and resource.List exist, but they only fetch source objects for cloning.
More easy Kyverno questions
- A GeneratingPolicy defines a NetworkPolicy inline and has evaluation.synchronize.enabled set to true. What happens when someone deletes the generated NetworkPolicy?
- In a Kyverno GeneratingPolicy template entry, which interpolate value makes Kyverno evaluate (( ... )) placeholders in the YAML?
- What is Kyverno?
- Which Kubernetes resource type does Kyverno use to define policies?
- What are the three main types of rules in Kyverno policies?
- Which command is used to install Kyverno in a Kubernetes cluster?