diff --git a/pkg/engine/variables/vars.go b/pkg/engine/variables/vars.go index 709314642e02..aef0ac48116a 100644 --- a/pkg/engine/variables/vars.go +++ b/pkg/engine/variables/vars.go @@ -106,7 +106,7 @@ func subValR(log logr.Logger, ctx context.EvalInterface, valuePattern string, pa } if substitutedVar != nil { - if originalPattern == variable { + if originalPattern == v { return substitutedVar, nil }