diff --git a/changelogs/unreleased/7410-seanblong b/changelogs/unreleased/7410-seanblong new file mode 100644 index 00000000000..ffc340d2bc0 --- /dev/null +++ b/changelogs/unreleased/7410-seanblong @@ -0,0 +1 @@ +Ignore missing path error in conditional match diff --git a/internal/resourcemodifiers/resource_modifiers.go b/internal/resourcemodifiers/resource_modifiers.go index d4ae93e7172..2546e0d6643 100644 --- a/internal/resourcemodifiers/resource_modifiers.go +++ b/internal/resourcemodifiers/resource_modifiers.go @@ -172,7 +172,7 @@ func matchConditions(u *unstructured.Unstructured, rules []MatchRule, _ logrus.F p := &JSONPatcher{patches: fixed} _, err := p.applyPatch(u) if err != nil { - if errors.Is(err, jsonpatch.ErrTestFailed) { + if errors.Is(err, jsonpatch.ErrTestFailed) || errors.Is(err, jsonpatch.ErrMissing) { return false, nil } return false, err