Skip to content

Commit

Permalink
Support configuring addtional listeners with different port: address …
Browse files Browse the repository at this point in the history
…comments
  • Loading branch information
paulzhang97 committed Nov 27, 2023
1 parent 298a2f0 commit 9782616
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/go/k8s/pkg/resources/statefulset.go
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,7 @@ func (r *StatefulSetResource) AdditionalListenersEnvVars() []corev1.EnvVar {
// - pandaproxy.pandaproxy_api
// - pandaproxy.advertised_pandaproxy_api
// example: redpanda.kafka_api: "[{'name':'private-link','address':'0.0.0.0','port':39002}]"
// example: redpanda.advertised_kafka_api: "[{'name':'private-link','address':'{{ .Index }}-f415bda0-{{ .HostIP | sha256sum | substr 0 7 }}.clb2jkpb06k16j807u20.byoc.ign.cloud.redpanda.com','port': 'port': {{30092 | add .Index}}}]"
// example: redpanda.advertised_kafka_api: "[{'name':'private-link','address':'{{ .Index }}-f415bda0-{{ .HostIP | sha256sum | substr 0 7 }}.cluster123.fmc.prd.cloud.redpanda.com','port': 'port': {{30092 | add .Index}}}]"
func (r *StatefulSetResource) GetPortsForListenersInAdditionalConfig() []corev1.ContainerPort {
ports := []corev1.ContainerPort{}

Expand All @@ -943,7 +943,6 @@ func (r *StatefulSetResource) GetPortsForListenersInAdditionalConfig() []corev1.
}
}

// We will reply on the webhook to validate and reject invalid configurations, e.g. port conflict.
for i := 0; i < int(*r.pandaCluster.Spec.Replicas); i++ {
for _, n := range additionalNode0Config.Redpanda.AdvertisedKafkaAPI {
ports = append(ports, corev1.ContainerPort{
Expand Down

0 comments on commit 9782616

Please sign in to comment.