Skip to content

Commit 869549e

Browse files
author
Cameron Wright
committed
taking out comments for pr push
1 parent 0888bba commit 869549e

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

pkg/util/client/common.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,20 @@ func UseSSL(cluster *v1beta1.KafkaCluster) bool {
3737

3838
func getContainerPortForInnerCom(internalListeners []v1beta1.InternalListenerConfig, extListeners []v1beta1.ExternalListenerConfig) int32 {
3939
for _, val := range internalListeners {
40-
// if val.UsedForKafkaAdminCommunication { // Cannot Currently update the CRD as I do not have permissions
41-
// return val.ContainerPort
42-
// }
40+
if val.UsedForKafkaAdminCommunication { // Cannot Currently update the CRD as I do not have permissions
41+
return val.ContainerPort
42+
}
4343
if val.UsedForInnerBrokerCommunication {
4444
return val.ContainerPort
4545
}
4646
}
4747

4848
for _, val := range extListeners {
49-
// if val.UsedForKafkaAdminCommunication {
50-
// return val.ContainerPort
51-
// }
49+
if val.UsedForKafkaAdminCommunication {
50+
return val.ContainerPort
51+
}
5252
if val.UsedForInnerBrokerCommunication {
53-
return 29092 // this is a temporary workaround
53+
return val.ContainerPort
5454
}
5555
}
5656
return 0

pkg/util/kafka/common.go

+9-7
Original file line numberDiff line numberDiff line change
@@ -193,21 +193,23 @@ func GetBootstrapServersService(cluster *v1beta1.KafkaCluster) (string, error) {
193193
func GetBrokerContainerPort(cluster *v1beta1.KafkaCluster) (int32, error) {
194194
containerPort := int32(0)
195195
for _, lc := range cluster.Spec.ListenersConfig.InternalListeners {
196-
// if lc.UsedForKafkaAdminCommunication { // Cannot Currently update the CRD as I do not have permissions
197-
// return val.ContainerPort
198-
// }
196+
if lc.UsedForKafkaAdminCommunication { // Cannot Currently update the CRD as I do not have permissions
197+
containerPort = lc.ContainerPort
198+
break
199+
}
199200
if lc.UsedForInnerBrokerCommunication && !lc.UsedForControllerCommunication {
200201
containerPort = lc.ContainerPort
201202
break
202203
}
203204
}
204205

205206
for _, lc := range cluster.Spec.ListenersConfig.ExternalListeners {
206-
// if lc.UsedForKafkaAdminCommunication { // Cannot Currently update the CRD as I do not have permissions
207-
// return val.ContainerPort
208-
// }
207+
if lc.UsedForKafkaAdminCommunication { // Cannot Currently update the CRD as I do not have permissions
208+
containerPort = lc.ContainerPort
209+
break
210+
}
209211
if lc.UsedForInnerBrokerCommunication {
210-
containerPort = 29092 // temporary solution, needs to be reverted
212+
containerPort = lc.ContainerPort
211213
break
212214
}
213215
}

0 commit comments

Comments
 (0)