[BUG] Namespace generate policy fails with request.operation precondition #2226
Labels
bug
Something isn't working
end user
This label is used to track the issue that is raised by the end user.
generation
Issues pertaining to the generate ability.
Milestone
Software version numbers
Describe the bug
When using a
request.operation
precondition within a match/resource/kind=namespace generate policy (add-ns-quota), the generate request fails with"msg"="variable substitution failed for rule %s"
"error"="Unknown key \"operation\" in path"
.The
request.operation
is seemingly found to benull
.To intention is to restrict the generate policy processing to namespace CREATE operations only.
To Reproduce
Generate policy:
Resource yaml:
Kyverno log:
Generate request:
Expected behavior
Generate controller should correctly determine the
request.operation
to beCREATE
. Generate request should be constructed successfully.The text was updated successfully, but these errors were encountered: