test: add PrivateLink cloudtest with Toxiproxy simulation#36162
Open
jubrad wants to merge 1 commit intoMaterializeInc:mainfrom
Open
test: add PrivateLink cloudtest with Toxiproxy simulation#36162jubrad wants to merge 1 commit intoMaterializeInc:mainfrom
jubrad wants to merge 1 commit intoMaterializeInc:mainfrom
Conversation
aba16f6 to
c34f80c
Compare
6 tasks
c34f80c to
9abc2ec
Compare
jubrad
added a commit
that referenced
this pull request
Apr 27, 2026
## Follow up of #35455 ## Summary - Adds `BOOTSTRAP BROKER 'addr' USING AWS PRIVATELINK conn (...)` — new top-level option that provides the initial bootstrap address with an explicit PrivateLink tunnel, preserving the real hostname for correct TLS SNI - Adds `MATCHING 'pattern' USING AWS PRIVATELINK conn (...)` inside `BROKERS (...)` — pattern-based routing rules for dynamically discovered brokers returned in Kafka metadata - Replaces the `AWS PRIVATELINKS` syntax which used a `TO` keyword inconsistent with the existing `USING AWS PRIVATELINK` syntax and overloaded exact-match patterns as implicit bootstrap addresses - Updates parser, planner, and storage layer to support the new constructs ### Example ```sql CREATE CONNECTION kafka TO KAFKA ( BROKERS ( 'lkc-825730.endpoint.cloud:9092' USING AWS PRIVATELINK pl_conn, MATCHING '*use1-az1*' USING AWS PRIVATELINK pl_conn (AVAILABILITY ZONE 'use1-az1'), MATCHING '*use1-az4*' USING AWS PRIVATELINK pl_conn (AVAILABILITY ZONE 'use1-az4'), MATCHING '*use1-az6*' USING AWS PRIVATELINK pl_conn (AVAILABILITY ZONE 'use1-az6') ), SASL MECHANISMS 'PLAIN', SASL USERNAME 'key', SASL PASSWORD SECRET secret, SECURITY PROTOCOL 'SASL_SSL' ); ``` ## Test plan - [x] Parser tests updated (roundtrip, error cases) - [x] Testdrive updated (connection-create-drop, connection-alter) - [x] `cargo check` passes - [x] Cloudtest validation ([see follow-up PR](#36162)) - [ ] Manual testing against Confluent Cloud PrivateLink ## Docs - [ ] #36163 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
d0c780a to
e9b44a8
Compare
Adds cloudtest infrastructure for testing Kafka PrivateLink connections using Toxiproxy as a network proxy to simulate VPC endpoint routing. Includes two tests: - `test_privatelink_e2e_connectivity`: validates basic connectivity through a simulated PrivateLink path, tests failure detection when the proxy is disabled, and recovery when re-enabled. - `test_privatelink_pattern_matching`: patches Redpanda to advertise an AZ-specific broker address, then verifies that MATCHING rules route post-metadata traffic through the AZ-specific proxy. The default proxy is disabled after bootstrap to prove pattern matching works. Also adds `doc/developer/testing-confluent-privatelink.md` with a step-by-step guide for manual testing against Confluent Cloud PrivateLink using a scratch VM with dnsmasq DNS overrides. Fixes the cloudtest `reset` script to clean up configmaps and vpcendpoints. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
e9b44a8 to
2398f5a
Compare
Alphadelta14
approved these changes
Apr 28, 2026
def-
reviewed
Apr 29, 2026
Contributor
def-
left a comment
There was a problem hiding this comment.
Very nice! Did you run it in CI to verify?
Contributor
Author
Ah no, I have run locally. I'll do that now! |
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.
Summary
Depends on #36161. Merge that first.
test_privatelink_e2e_connectivity: validates connectivity through simulated PrivateLink, failure detection when proxy is disabled, and recoverytest_privatelink_pattern_matching: patches Redpanda with AZ-specific advertised address, then proves MATCHING rules route post-metadata traffic through the correct AZ-specific proxy by disabling the default proxy after bootstrapdoc/developer/testing-confluent-privatelink.md: step-by-step guide for manual testing against Confluent Cloud PrivateLink using a scratch VM with dnsmasq DNS overridesTest plan
./pytest --dev -k test_privatelink_e2e_connectivity./pytest --dev -k test_privatelink_pattern_matching🤖 Generated with Claude Code