From 5d50b9c2bb33ca6f8759ca4f50ddcbf5c56f6809 Mon Sep 17 00:00:00 2001 From: Stefan Berger Date: Fri, 22 Mar 2019 14:56:23 -0400 Subject: [PATCH] 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 --- metadata/adaptors.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/metadata/adaptors.go b/metadata/adaptors.go index 38539fdc1..4fd4c8243 100644 --- a/metadata/adaptors.go +++ b/metadata/adaptors.go @@ -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