[k8s] Restrict getEndpoints to search only in current pod

* If we have a k8s cluster installed and
   then deploy 2 apps, each on separate pod,
   then in logs we will see 2 endpoints for
   2nd app. Then we will see 3 endpoints for
   next pod/app deployment. The reason is searching
   endpoints was done by whole k8s cluster but it
   should rather be only by current pod.
   Now it is fixed.

Closes-Bug: #1613631

Change-Id: I730016dcd55a922ac6c9ee20f9de500f7831f9c3
This commit is contained in:
Nikolay Mahotkin 2016-08-19 13:32:20 +03:00
parent 8e5b5b64b8
commit d2c3f45f5f
1 changed files with 4 additions and 1 deletions

View File

@ -140,7 +140,10 @@ Methods:
- applicationName:
Contract: $.string().notNull()
Body:
- Return: $.kubernetesCluster.serviceEndpoints.where($.applicationName = $applicationName)
- Return: $.kubernetesCluster.serviceEndpoints.where(
$.applicationName = $applicationName
and $.podId = $this._getPodName()
)
_getPortDefinition: