Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
Revert "STRATOS-1499 - setting auto increment cluster-id as kubernete…
Browse files Browse the repository at this point in the history
…s serviceLabel"

This reverts commit 5515a5c.
  • Loading branch information
lasinducharith committed Aug 17, 2015
1 parent 5515a5c commit d45bd6e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ public class KubernetesClusterContext implements Serializable {
private transient KubernetesApiClient kubApi;
private AtomicLong serviceSeqNo;
private AtomicLong podSeqNo;
private AtomicLong clusterSeqNo;

public KubernetesClusterContext(String id, String masterIp, String masterPort, int lowerPort, int upperPort) {
servicePorts = new ArrayList<Integer>();
Expand All @@ -62,7 +61,6 @@ public KubernetesClusterContext(String id, String masterIp, String masterPort, i
this.setKubApi(new KubernetesApiClient(getEndpoint(masterIp, masterPort)));
this.serviceSeqNo = new AtomicLong();
this.podSeqNo = new AtomicLong();
this.clusterSeqNo = new AtomicLong();

}

Expand Down Expand Up @@ -149,10 +147,6 @@ public AtomicLong getPodSeqNo() {
return podSeqNo;
}

public AtomicLong getClusterSeqNo(){
return clusterSeqNo;
}

@Override
public int hashCode() {
final int prime = 31;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -510,8 +510,7 @@ private void createKubernetesServices(KubernetesApiClient kubernetesApi, Cluster
// Find next service sequence no
long serviceSeqNo = kubernetesClusterContext.getServiceSeqNo().incrementAndGet();
String serviceId = KubernetesIaasUtil.fixSpecialCharacters("service" + "-" + (serviceSeqNo));
long clusterSeqNo = kubernetesClusterContext.getClusterSeqNo().incrementAndGet();
String serviceLabel = KubernetesIaasUtil.fixSpecialCharacters("cluster" + "-" + (clusterSeqNo));
String serviceLabel = KubernetesIaasUtil.fixSpecialCharacters(clusterId);

if (log.isInfoEnabled()) {
log.info(String.format("Creating kubernetes service: [cluster] %s [service] %s " +
Expand Down

0 comments on commit d45bd6e

Please sign in to comment.