Skip to content

Commit

Permalink
operator v1: create internal admin api port (ClusterIP)
Browse files Browse the repository at this point in the history
add internal port to ClusterIP service for admin-api.
this allows tools to "just" talk to the ClusterIP service, without
thinking about individual brokers.

See also redpanda-data/redpanda#23424
That core PR fixes redirects. Before, core couldn't redirect to the
correct broker if you used a hostname that is not exactly a broker.
  • Loading branch information
birdayz committed Oct 9, 2024
1 parent e897bcf commit 60373ad
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions operator/internal/controller/vectorized/cluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1104,6 +1104,10 @@ func collectClusterPorts(
port := redpandaPorts.KafkaAPI.Internal.Port
clusterPorts = append(clusterPorts, resources.NamedServicePort{Name: resources.InternalListenerName, Port: port})
}
if redpandaPorts.AdminAPI.Internal != nil {
port := redpandaPorts.AdminAPI.Internal.Port
clusterPorts = append(clusterPorts, resources.NamedServicePort{Name: resources.AdminPortName, Port: port})
}

return clusterPorts
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ spec:
port: 9092
protocol: TCP
targetPort: 9092
- name: admin
port: 9644
protocol: TCP
targetPort: 9644
type: ClusterIP
---
apiVersion: kuttl.dev/v1beta1
Expand Down

0 comments on commit 60373ad

Please sign in to comment.