Skip to content

Commit

Permalink
Extend adaptImage function with annotations case
Browse files Browse the repository at this point in the history
Extend the adaptImage function with a case for handling the annotations
so they can be used in the filter adaptors for fieldpaths.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
(cherry picked from commit 5d50b9c)
Signed-off-by: Jared Cordasco <jcordasc@coglib.com>
  • Loading branch information
stefanberger authored and Jared Cordasco committed May 4, 2019
1 parent 5538d71 commit 9ad688a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions metadata/adaptors.go
Expand Up @@ -51,6 +51,8 @@ func adaptImage(o interface{}) filters.Adaptor {
return checkMap(fieldpath[1:], obj.Labels)
// TODO(stevvooe): Greater/Less than filters would be awesome for
// size. Let's do it!
case "annotations":
return checkMap(fieldpath[1:], obj.Target.Annotations)
}

return "", false
Expand Down

0 comments on commit 9ad688a

Please sign in to comment.