Repository: stratos Updated Branches: refs/heads/stratos-4.1.x c12e1508b -> fd1c9fbe4
Replacing cluster id label in kubernetes service with cluster instance id Project: http://git-wip-us.apache.org/repos/asf/stratos/repo Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/fd1c9fbe Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/fd1c9fbe Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/fd1c9fbe Branch: refs/heads/stratos-4.1.x Commit: fd1c9fbe4b71b7a57c82634c4248ec0f002949a5 Parents: c12e150 Author: Imesh Gunaratne <[email protected]> Authored: Mon Sep 21 00:37:29 2015 +0530 Committer: Imesh Gunaratne <[email protected]> Committed: Mon Sep 21 00:37:29 2015 +0530 ---------------------------------------------------------------------- .../cloud/controller/iaases/kubernetes/KubernetesIaas.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/stratos/blob/fd1c9fbe/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/kubernetes/KubernetesIaas.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/kubernetes/KubernetesIaas.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/kubernetes/KubernetesIaas.java index 1b51d6c..f985f01 100644 --- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/kubernetes/KubernetesIaas.java +++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/kubernetes/KubernetesIaas.java @@ -558,8 +558,9 @@ public class KubernetesIaas extends Iaas { serviceLabels.put(CloudControllerConstants.APPLICATION_ID_LABEL, trimLabel(CloudControllerConstants.APPLICATION_ID_LABEL, clusterContext.getApplicationId())); - serviceLabels.put(CloudControllerConstants.CLUSTER_ID_LABEL, - trimLabel(CloudControllerConstants.CLUSTER_ID_LABEL, clusterContext.getClusterId())); + serviceLabels.put(CloudControllerConstants.CLUSTER_INSTANCE_ID_LABEL, + trimLabel(CloudControllerConstants.CLUSTER_INSTANCE_ID_LABEL, + memberContext.getClusterInstanceId())); serviceLabels.put(CloudControllerConstants.PORT_NAME_LABEL, trimLabel(CloudControllerConstants.PORT_NAME_LABEL, clusterPortMapping.getName())); @@ -568,6 +569,8 @@ public class KubernetesIaas extends Iaas { serviceAnnotations .put(CloudControllerConstants.APPLICATION_ID_LABEL, clusterContext.getApplicationId()); serviceAnnotations.put(CloudControllerConstants.CLUSTER_ID_LABEL, clusterContext.getClusterId()); + serviceAnnotations.put(CloudControllerConstants.CLUSTER_INSTANCE_ID_LABEL, + memberContext.getClusterInstanceId()); serviceAnnotations.put(CloudControllerConstants.PORT_NAME_LABEL, clusterPortMapping.getName()); serviceAnnotations.put(CloudControllerConstants.PROTOCOL_LABEL, clusterPortMapping.getProtocol()); serviceAnnotations.put(CloudControllerConstants.PORT_TYPE_LABEL,
