Skip to content

Commit

Permalink
Ignore missing path error in conditional match
Browse files Browse the repository at this point in the history
Signed-off-by: Sean Blong <[email protected]>
  • Loading branch information
seanblong committed Feb 9, 2024
1 parent 3b8370e commit fb683d6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelogs/unreleased/7410-seanblong
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Ignore missing path error in conditional match
2 changes: 1 addition & 1 deletion internal/resourcemodifiers/resource_modifiers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fb683d6

Please sign in to comment.