From 5ad7c36bd4534fa30c2af51bd2097f41a4a764b3 Mon Sep 17 00:00:00 2001 From: Asim Aslam Date: Wed, 18 Mar 2020 22:13:21 +0000 Subject: [PATCH] Fix labels for k8s (#1370) --- runtime/kubernetes/kubernetes.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/runtime/kubernetes/kubernetes.go b/runtime/kubernetes/kubernetes.go index ffea564f..fc3e23fe 100644 --- a/runtime/kubernetes/kubernetes.go +++ b/runtime/kubernetes/kubernetes.go @@ -136,8 +136,12 @@ func (k *kubernetes) getService(labels map[string]string) ([]*service, error) { for _, item := range podList.Items { var status string - // inspect the - if item.Metadata.Name != name { + // check the name + if item.Metadata.Labels["name"] != name { + continue + } + // check the version + if item.Metadata.Labels["version"] != version { continue }