Skip to content

Commit

Permalink
Issue 183: Prefixing service ports with tcp to comply with istio stan…
Browse files Browse the repository at this point in the history
…dards (#184)

* prefixing service ports with tcp to comply with istio standards

* Revert "Issue 91: PrestopHook configured for zookeeper cluster always fails (#186)"

This reverts commit d502a60.

* Revert "Revert "Issue 91: PrestopHook configured for zookeeper cluster always fails (#186)""

This reverts commit 0fd66ea.
  • Loading branch information
whitleykeith authored Jun 8, 2020
1 parent ef64996 commit 75421d6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions pkg/zk/generators.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ func makeZkPodSpec(z *v1beta1.ZookeeperCluster) v1.PodSpec {
func MakeClientService(z *v1beta1.ZookeeperCluster) *v1.Service {
ports := z.ZookeeperPorts()
svcPorts := []v1.ServicePort{
{Name: "client", Port: ports.Client},
{Name: "tcp-client", Port: ports.Client},
}
return makeService(z.GetClientServiceName(), svcPorts, true, z)
}
Expand Down Expand Up @@ -193,9 +193,9 @@ func MakeConfigMap(z *v1beta1.ZookeeperCluster) *v1.ConfigMap {
func MakeHeadlessService(z *v1beta1.ZookeeperCluster) *v1.Service {
ports := z.ZookeeperPorts()
svcPorts := []v1.ServicePort{
{Name: "quorum", Port: ports.Quorum},
{Name: "leader-election", Port: ports.Leader},
{Name: "metrics", Port: ports.Metrics},

This comment has been minimized.

Copy link
@amuraru

amuraru Jun 9, 2020

Contributor

@whitleykeith this patch inadvertently removed the newly added monitoring metrics port. Can we add it back with the tcp- prefix?

This comment has been minimized.

Copy link
@whitleykeith

whitleykeith Jun 11, 2020

Author Contributor

yeah that's my fault, I didn't notice the metrics one being added since I also added the client port to the headless service. Let me know if you want me to open another PR to fix it and I can

This comment has been minimized.

Copy link
@amuraru

amuraru Jun 11, 2020

Contributor

Nw - just filed a pr that fixed that and has been integrated

{Name: "tcp-client", Port: ports.Client},
{Name: "tcp-quorum", Port: ports.Quorum},
{Name: "tcp-leader-election", Port: ports.Leader},
}
return makeService(headlessSvcName(z), svcPorts, false, z)
}
Expand Down
6 changes: 3 additions & 3 deletions pkg/zk/generators_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ var _ = Describe("Generators Spec", func() {
})

It("should have a client port", func() {
p, err := utils.ServicePortByName(s.Spec.Ports, "client")
p, err := utils.ServicePortByName(s.Spec.Ports, "tcp-client")
Ω(err).To(BeNil())
Ω(p.Port).To(BeEquivalentTo(2181))
})
Expand Down Expand Up @@ -177,13 +177,13 @@ var _ = Describe("Generators Spec", func() {
})

It("should have a quorum port", func() {
p, err := utils.ServicePortByName(s.Spec.Ports, "quorum")
p, err := utils.ServicePortByName(s.Spec.Ports, "tcp-quorum")
Ω(err).To(BeNil())
Ω(p.Port).To(BeEquivalentTo(2888))
})

It("should have a leader port", func() {
p, err := utils.ServicePortByName(s.Spec.Ports, "leader-election")
p, err := utils.ServicePortByName(s.Spec.Ports, "tcp-leader-election")
Ω(err).To(BeNil())
Ω(p.Port).To(BeEquivalentTo(3888))
})
Expand Down

0 comments on commit 75421d6

Please sign in to comment.