add check for clone
@@ -219,6 +219,8 @@ func variableSubsitutionForAttributes(gen kyverno.Generation, ctx context.EvalIn
if newNamespace, ok := newNamespaceVar.(string); ok {
gen.Namespace = newNamespace
}
+
+ if gen.Clone != (kyverno.CloneFrom{}) {
// Clone
cloneName := gen.Clone.Name
cloneNamespace := gen.Clone.Namespace
@@ -231,6 +233,7 @@ func variableSubsitutionForAttributes(gen kyverno.Generation, ctx context.EvalIn
if newcloneNamespace, ok := newcloneNamespaceVar.(string); ok {
gen.Clone.Namespace = newcloneNamespace
}
+ }
return gen
}
