From c32958f4023776a9a9660f206de90298b91feb0c Mon Sep 17 00:00:00 2001 From: r-vasquez Date: Fri, 21 Jun 2024 12:56:23 -0700 Subject: [PATCH] rpk: Fix --any-port configuration for console We were using the incorrect port when configuring the addresses in the Console configuration file, it made using the --any-port not possible with Redpanda Console. --- src/go/rpk/pkg/cli/container/start.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/go/rpk/pkg/cli/container/start.go b/src/go/rpk/pkg/cli/container/start.go index 37f09c1908e49..8aa6c164acdff 100644 --- a/src/go/rpk/pkg/cli/container/start.go +++ b/src/go/rpk/pkg/cli/container/start.go @@ -322,9 +322,9 @@ func startCluster( seedID, nodeAddr(seedKafkaPort), } - kafkaAddr := []string{fmt.Sprintf("%v:%d", seedState.ContainerIP, seedKafkaPort)} - srAddr := []string{fmt.Sprintf("http://rp-node-%d:%d", seedID, seedSchemaRegPort)} - adminAddr := []string{fmt.Sprintf("http://rp-node-%d:%d", seedID, seedAdminPort)} + kafkaAddr := []string{fmt.Sprintf("%v:%d", seedState.ContainerIP, config.DefaultKafkaPort)} + srAddr := []string{fmt.Sprintf("http://rp-node-%d:%d", seedID, config.DefaultSchemaRegPort)} + adminAddr := []string{fmt.Sprintf("http://rp-node-%d:%d", seedID, config.DefaultAdminPort)} nodes := []node{seedNode} @@ -374,9 +374,9 @@ func startCluster( id: id, addr: nodeAddr(state.HostKafkaPort), }) - kafkaAddr = append(kafkaAddr, fmt.Sprintf("%v:%d", state.ContainerIP, kafkaPort)) - srAddr = append(srAddr, fmt.Sprintf("http://rp-node-%d:%d", id, schemaRegPort)) - adminAddr = append(adminAddr, fmt.Sprintf("http://rp-node-%d:%d", id, adminPort)) + kafkaAddr = append(kafkaAddr, fmt.Sprintf("%v:%d", state.ContainerIP, config.DefaultKafkaPort)) + srAddr = append(srAddr, fmt.Sprintf("http://rp-node-%d:%d", id, config.DefaultSchemaRegPort)) + adminAddr = append(adminAddr, fmt.Sprintf("http://rp-node-%d:%d", id, config.DefaultAdminPort)) mu.Unlock() return nil })