From 15523cf11331fe4d125c196ce1c3ee73557de86f Mon Sep 17 00:00:00 2001 From: obaydullahmhs Date: Wed, 22 Nov 2023 12:15:29 +0600 Subject: [PATCH] Remove broker and controller service kafka helpers Signed-off-by: obaydullahmhs --- apis/kubedb/v1alpha2/constants.go | 8 +++----- apis/kubedb/v1alpha2/kafka_helpers.go | 8 -------- apis/kubedb/v1alpha2/kafka_types.go | 3 +-- 3 files changed, 4 insertions(+), 15 deletions(-) diff --git a/apis/kubedb/v1alpha2/constants.go b/apis/kubedb/v1alpha2/constants.go index 57263cbe81..6ec3af4d6a 100644 --- a/apis/kubedb/v1alpha2/constants.go +++ b/apis/kubedb/v1alpha2/constants.go @@ -518,15 +518,13 @@ const ( KafkaPortNameCruiseControlREST = "cc-rest" KafkaBrokerClientPortName = "broker" KafkaControllerClientPortName = "controller" - KafkaPortNameInternal = "internal" - KafkaPortNameExternal = "external" + KafkaPortNameLocal = "local" KafkaTopicNameHealth = "kafka-health" KafkaTopicDeletionThresholdOffset = 1000 - KafkaControllerMaxID = 1000 + KafkaBrokerMaxID = 1000 KafkaRESTPort = 9092 KafkaControllerRESTPort = 9093 - KafkaInternalRESTPort = 29092 - KafkaExternalRESTPort = 19092 + KafkaLocalRESTPort = 29092 KafkaCruiseControlRESTPort = 9090 KafkaCruiseControlListenerPort = 9094 KafkaCCDefaultInNetwork = 500000 diff --git a/apis/kubedb/v1alpha2/kafka_helpers.go b/apis/kubedb/v1alpha2/kafka_helpers.go index fed6097bfb..6a0cd37470 100644 --- a/apis/kubedb/v1alpha2/kafka_helpers.go +++ b/apis/kubedb/v1alpha2/kafka_helpers.go @@ -80,14 +80,6 @@ func (k *Kafka) GoverningServiceName() string { return meta_util.NameWithSuffix(k.ServiceName(), "pods") } -func (k *Kafka) GoverningServiceNameController() string { - return meta_util.NameWithSuffix(k.ServiceName(), KafkaNodeRolesController) -} - -func (k *Kafka) GoverningServiceNameBroker() string { - return meta_util.NameWithSuffix(k.ServiceName(), KafkaNodeRolesBrokers) -} - func (k *Kafka) GoverningServiceNameCruiseControl() string { return meta_util.NameWithSuffix(k.ServiceName(), KafkaNodeRolesCruiseControl) } diff --git a/apis/kubedb/v1alpha2/kafka_types.go b/apis/kubedb/v1alpha2/kafka_types.go index d36890c3d3..266183607c 100644 --- a/apis/kubedb/v1alpha2/kafka_types.go +++ b/apis/kubedb/v1alpha2/kafka_types.go @@ -218,8 +218,7 @@ type KafkaListenerType string const ( KafkaListenerBroker KafkaListenerType = "BROKER" KafkaListenerController KafkaListenerType = "CONTROLLER" - KafkaListenerInternal KafkaListenerType = "INTERNAL" - KafkaListenerExternal KafkaListenerType = "EXTERNAL" + KafkaListenerLocal KafkaListenerType = "LOCAL" KafkaListenerCC KafkaListenerType = "CC" )