When using Kyverno MutatingPolicy (CEL-based) targeting v1/pods, the policy is incorrectly evaluated against pod controllers (e.g., DaemonSet, Deployment) even when autogen is explicitly disabled. This leads to evaluation errors like no such key: containers because variables are not properly translated for controllers, and the webhook filtering logic is flawed.
The standard annotation pod-policies.kyverno.io/autogen-controllers: none is effectively ignored for CEL policies. The engine logic that decides whether to trigger autogen for CEL policies relies solely on the resource matching rules.