You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: content/en/docs/writing-policies/verify-images/_index.md
+59
Original file line number
Diff line number
Diff line change
@@ -53,12 +53,71 @@ For additional details please reference a section below for the solution used to
53
53
### Variables in `imageReferences`
54
54
The `imageReferences` field does **not** support variable interpolation (e.g., `{{ }}` syntax). Only **static strings** or predefined lists should be used.
55
55
56
+
#### ** Incorrect Usage (Using Variables – Not Allowed)**
- Only predefined, static resource kinds (`Deployment`, `StatefulSet`) are used.
106
+
107
+
---
108
+
109
+
### **Why Are Variables Not Allowed in These Fields?**
110
+
Kyverno requires these fields to be **static** to ensure policy validation and enforcement remain deterministic and efficient. Allowing variables in these fields could introduce unexpected behavior, making policy evaluation unreliable.
Image verification requires multiple network calls and can be time consuming. Kyverno has a TTL based cache for image verification which caches successful outcomes of image verification. When cache is enabled, an image once verified by a policy will be considered to be verified until TTL duration expires or there is a change in policy.
0 commit comments