Fix labels for k8s (#1370)

This commit is contained in:
Asim Aslam 2020-03-18 22:13:21 +00:00 committed by GitHub
parent 99c3fe2bb8
commit 5ad7c36bd4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
}