Skip to content

Commit

Permalink
Fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
hvan committed Feb 6, 2025
1 parent ed46ce3 commit 400f6ae
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion pkg/resources/kafka/configmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ func (r *Reconciler) configCCMetricsReporter(broker v1beta1.Broker, config *prop
func configureBrokerKRaftMode(bConfig *v1beta1.BrokerConfig, brokerID int32, kafkaCluster *v1beta1.KafkaCluster, config *properties.Properties,
quorumVoters []string, serverPasses map[string]string, extListenerStatuses, intListenerStatuses map[string]v1beta1.ListenerStatusList, log logr.Logger,
brokerReadOnlyConfig *properties.Properties) {

controllerListenerName := generateControlPlaneListener(kafkaCluster.Spec.ListenersConfig.InternalListeners)

// when kRaft is enabled for the cluster, brokers can still be configured to use zookeeper for metadata.
Expand Down
2 changes: 1 addition & 1 deletion pkg/resources/kafka/configmap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ zookeeper.connect=example.zk:2181/`,

// TestGenerateBrokerConfigKRaftMode serves as an aggregated test on top of TestGenerateBrokerConfig to verify basic broker configurations under KRaft mode
// Note: most of the test cases under TestGenerateBrokerConfig are not replicated here since running KRaft mode doesn't affect things like SSL and storage configurations
func TestGenerateBrokerConfigKRaftMode(t *testing.T) {
func TestGenerateBrokerConfigKRaftMode(t *testing.T) { //nolint funlen
testCases := []struct {
testName string
brokers []v1beta1.Broker
Expand Down
1 change: 0 additions & 1 deletion pkg/resources/kafka/kafka.go
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,6 @@ func (r *Reconciler) Reconcile(log logr.Logger) error {
if r.KafkaCluster.Spec.KRaftMode {
// all broker nodes under the same Kafka cluster must use the same cluster UUID
if r.KafkaCluster.Status.ClusterID == "" {

// CLUSTER_ID can be overridden with ENV (e.g for migration from ZK to KRaft so it matches the value for ZK cluster)
for _, env := range r.KafkaCluster.Spec.Envs {
if env.Name == "CLUSTER_ID" {
Expand Down
1 change: 0 additions & 1 deletion pkg/resources/kafka/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ fi`},
if r.KafkaCluster.Spec.KRaftMode {
for i, container := range pod.Spec.Containers {
if container.Name == kafkaContainerName {

// in KRaft mode, all broker nodes within the same Kafka cluster need to use the same cluster ID to format the storage
addClusterIdEnv(r, pod, i)

Expand Down

0 comments on commit 400f6ae

Please sign in to comment.