Repository navigation
Implement endpoint steering for Kafka seed server traffic - #2018
Merged
Merged
Conversation
andrewstucki
requested review from
RafalKorepta,
chrisseto,
gene-redpanda and
hidalgopl
as code owners
October 23, 2026 20:29
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
There was a problem hiding this comment.
🟡 Changes recommended
The integration test’s Kafka listeners need to accept and close connections to prevent backlog exhaustion and false endpoint exclusions.
1 open issue
What changed in this PR
Extends opt-in endpoint steering to Kafka seed traffic, excluding brokers whose Kafka listeners fail damped TCP checks while leaving other ports independently controlled.
Changes:
- Discovers internal and external Kafka listener ports for V1 and V2 clusters.
- Adds per-listener TCP probes using existing damping mechanisms.
- Expands unit, integration, and acceptance coverage and updates documentation.
| File | Description |
|---|---|
| operator/pkg/client/cluster_brokers.go | Exposes Kafka listener ports for both cluster versions. |
| operator/pkg/client/cluster_brokers_test.go | Tests listener port discovery and defaults. |
| operator/internal/controller/endpointsteering/resolver.go | Adds Kafka ports to the cluster interface. |
| operator/internal/controller/endpointsteering/integration_test.go | Tests Kafka endpoint removal and recovery. |
| operator/internal/controller/endpointsteering/endpointsteering.go | Documents Kafka steering behavior. |
| operator/internal/controller/endpointsteering/checker.go | Adds damped TCP checks for Kafka listeners. |
| operator/internal/controller/endpointsteering/checker_test.go | Covers Kafka probing and shared damping behavior. |
| acceptance/features/endpoint-steering.feature | Verifies non-serving pods are excluded from Kafka endpoints. |
| .changes/unreleased/operator-Added-20260915-120000.yaml | Updates the release note to include Kafka steering. |
Review effort: Balanced
There was a problem hiding this comment.
🟢 Approval recommended
The changes consistently extend existing steering behavior, with coverage for listener discovery, exclusion, recovery, and damping, and no blocking issues identified.
No open issues 🎉
1 resolved since last review
Review effort: Balanced
hidalgopl
approved these changes
Oct 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This adds opt-in traffic steering for brokers for the Kafka protocol port. It does so by taking any brokers that fail a simple TCP check across its damped window out of the backing endpoints for a steered service.
NOTE: This only affects initially bootstrapping clients connecting to the seed brokers for the first time. Pretty much all Kafka clients out their hold their own list of brokers internally after initially seeding. So, the only possible window this affects is newly connecting clients during a partial broker outage. It makes it so that newly connecting (read, not reconnecting) clients no longer run a small percentage risk of having to retry to connect to a seed broker, potentially delaying the connection startup for less smart clients (things like franz-go handle this with no real issues already) by somewhere from 10s to a minute depending on the client library.
For a system that proxies via cloud load balancers via
externalTrafficPolicy: Localand requires this:AWS/Azure: Requires adding per-target TCP health checks to exercise the kube-proxy path that the backing endpointslices manipulate. Without them NLBs and the like ignore the endpoint slices.
GCP: You can't do per-port TCP checks, so any ports targeted that need to be split out require their own separate LoadBalancer service, which can be backed by the same logical LB IP.