Skip to content

Commit

Permalink
Added CLUSTER_SIZE field in configmap (#138)
Browse files Browse the repository at this point in the history
Signed-off-by: anisha.kj <[email protected]>
  • Loading branch information
anishakj authored Mar 11, 2020
1 parent 97ddb6e commit 1c4e3f1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/zk/generators.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (

"github.com/pravega/zookeeper-operator/pkg/apis/zookeeper/v1beta1"
appsv1 "k8s.io/api/apps/v1"
"k8s.io/api/core/v1"
v1 "k8s.io/api/core/v1"
policyv1beta1 "k8s.io/api/policy/v1beta1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
Expand Down Expand Up @@ -226,7 +226,8 @@ func makeZkEnvConfigString(z *v1beta1.ZookeeperCluster) string {
"LEADER_PORT=" + strconv.Itoa(int(ports.Leader)) + "\n" +
"CLIENT_HOST=" + z.GetClientServiceName() + "\n" +
"CLIENT_PORT=" + strconv.Itoa(int(ports.Client)) + "\n" +
"CLUSTER_NAME=" + z.GetName() + "\n"
"CLUSTER_NAME=" + z.GetName() + "\n" +
"CLUSTER_SIZE=" + fmt.Sprint(z.Spec.Replicas) + "\n"
}

func makeService(name string, ports []v1.ServicePort, clusterIP bool, z *v1beta1.ZookeeperCluster) *v1.Service {
Expand Down

0 comments on commit 1c4e3f1

Please sign in to comment.