mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-13 19:28:55 +00:00
fix: generate flake (#8332)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
This commit is contained in:
parent
6073f2952e
commit
7a982a4c2c
1 changed files with 3 additions and 1 deletions
|
@ -859,7 +859,9 @@ func (c *controller) mergeWebhook(dst *webhook, policy kyvernov1.PolicyInterface
|
|||
// matching kinds in generate policies need to be added to both webhook
|
||||
if rule.HasGenerate() {
|
||||
matchedGVK = append(matchedGVK, rule.MatchResources.GetKinds()...)
|
||||
matchedGVK = append(matchedGVK, rule.Generation.ResourceSpec.Kind)
|
||||
if rule.Generation.ResourceSpec.Kind != "" {
|
||||
matchedGVK = append(matchedGVK, rule.Generation.ResourceSpec.Kind)
|
||||
}
|
||||
matchedGVK = append(matchedGVK, rule.Generation.CloneList.Kinds...)
|
||||
continue
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue