Skip to content

Commit

Permalink
rpk: Fix --any-port configuration for console
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
r-vasquez committed Jun 21, 2024
1 parent f62f934 commit c32958f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/go/rpk/pkg/cli/container/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}

Expand Down Expand Up @@ -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
})
Expand Down

0 comments on commit c32958f

Please sign in to comment.