From 63e34e3c10869350f8394778fec35affe428068f Mon Sep 17 00:00:00 2001 From: "Dr. Stefan Schimanski" Date: Wed, 9 Sep 2015 10:48:41 +0200 Subject: [PATCH] Make Mesos endpoint annotation e2e workaround cluster provider independent --- test/e2e/service.go | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/test/e2e/service.go b/test/e2e/service.go index f6b054b645a..e6aec2759ff 100644 --- a/test/e2e/service.go +++ b/test/e2e/service.go @@ -1049,18 +1049,15 @@ func getContainerPortsByPodUID(endpoints *api.Endpoints) PortsByPodUID { // use endpoint annotations to recover the container port in a Mesos setup // compare contrib/mesos/pkg/service/endpoints_controller.syncService - if providerIs("mesos/docker") { - key := fmt.Sprintf("k8s.mesosphere.io/containerPort_%s_%s_%d", port.Protocol, addr.IP, hostPort) - containerPortString := endpoints.Annotations[key] - if containerPortString == "" { - continue - } + key := fmt.Sprintf("k8s.mesosphere.io/containerPort_%s_%s_%d", port.Protocol, addr.IP, hostPort) + mesosContainerPortString := endpoints.Annotations[key] + if mesosContainerPortString != "" { var err error - containerPort, err = strconv.Atoi(containerPortString) + containerPort, err = strconv.Atoi(mesosContainerPortString) if err != nil { continue } - Logf("Mapped mesos host port %d to container port %d via annotation %s=%s", hostPort, containerPort, key, containerPortString) + Logf("Mapped mesos host port %d to container port %d via annotation %s=%s", hostPort, containerPort, key, mesosContainerPortString) } Logf("Found pod %v, host port %d and container port %d", addr.TargetRef.UID, hostPort, containerPort)