Skip to content

Commit 5d50b9c

Browse files
committed
Extend adaptImage function with annotations case
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 <[email protected]>
1 parent 09cf2a6 commit 5d50b9c

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

metadata/adaptors.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ func adaptImage(o interface{}) filters.Adaptor {
5151
return checkMap(fieldpath[1:], obj.Labels)
5252
// TODO(stevvooe): Greater/Less than filters would be awesome for
5353
// size. Let's do it!
54+
case "annotations":
55+
return checkMap(fieldpath[1:], obj.Target.Annotations)
5456
}
5557

5658
return "", false

0 commit comments

Comments
 (0)