Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support privatelink.endpoint option in the WITH clause for Kafka connector #12266

Merged
merged 8 commits into from
Sep 22, 2023

Conversation

StrikeW
Copy link
Contributor

@StrikeW StrikeW commented Sep 13, 2023

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

close #11397
Add privatelink.endpoint to the WITH clause, to support private link for Kafka connector on GCP and AWS.

  • User can provide a GCP private link endpoint or the DNS name of an AWS VPC endpoint as the value to privatelink.endpoint when they create a Source, Table and Sink with Kafka connector.
  • privatelink.targets the target ports configured on the network load balancer

Tested on GCP and AWS.

example usage:

CREATE TABLE IF NOT EXISTS crypto_source (
  product_id VARCHAR,
  price NUMERIC,
  open_24h NUMERIC,
  volume_24h NUMERIC,
  low_24h NUMERIC,
  high_24h NUMERIC,
  volume_30d NUMERIC,
  best_bid  NUMERIC,
  best_ask  NUMERIC,
  side VARCHAR,
  time timestamp,
  trade_id bigint,
)
WITH (
  connector='kafka',
  topic='crypto',
  privatelink.endpoint='10.148.0.4',
  privatelink.targets='[{"port": 9094}, {"port": 9095}, {"port": 9096}]',
  properties.bootstrap.server='broker1-endpoint,broker2-endpoint,broker3-endpoint',
  scan.startup.mode='latest',
  properties.group.id='test_group'
) FORMAT PLAIN ENCODE JSON;

Checklist

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features Sqlsmith: Sql feature generation #7934).
  • My PR contains breaking changes. (If it deprecates some features, please create a tracking issue to remove them in the future).
  • All checks passed in ./risedev check (or alias, ./risedev c)
  • My PR changes performance-critical code. (Please run macro/micro-benchmarks and show the results.)
  • My PR contains critical fixes that are necessary to be merged into the latest release. (Please check out the details)

Documentation

  • My PR needs documentation updates. (Please use the Release note section below to summarize the impact on users)

Release note

Add privatelink.endpoint to the WITH clause, to support private link for Kafka connector on GCP and AWS.

  • User can provide a GCP private link endpoint or the DNS name of an AWS VPC endpoint as the value to privatelink.endpoint when they create a Source, Table and Sink with Kafka connector.
  • privatelink.targets the target ports configured on the network load balancer for the corresponding broker servers

@StrikeW StrikeW changed the title feat: support privatelink_endpoint option in the WITH of CREATE SOURCE feat: support privatelink_endpoint option in the WITH clause Sep 19, 2023
@StrikeW StrikeW changed the title feat: support privatelink_endpoint option in the WITH clause feat: support privatelink.endpoint option in the WITH clause Sep 19, 2023
@StrikeW StrikeW marked this pull request as ready for review September 19, 2023 09:09
@codecov
Copy link

codecov bot commented Sep 19, 2023

Codecov Report

Merging #12266 (ed4086e) into main (7cb3903) will decrease coverage by 0.01%.
Report is 2 commits behind head on main.
The diff coverage is 44.16%.

@@            Coverage Diff             @@
##             main   #12266      +/-   ##
==========================================
- Coverage   69.65%   69.64%   -0.01%     
==========================================
  Files        1424     1425       +1     
  Lines      236438   236492      +54     
==========================================
+ Hits       164702   164716      +14     
- Misses      71736    71776      +40     
Flag Coverage Δ
rust 69.64% <44.16%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
src/connector/src/source/kafka/private_link.rs 0.00% <0.00%> (ø)
src/expr/src/expr/expr_array_transform.rs 0.00% <0.00%> (ø)
src/expr/src/expr/expr_some_all.rs 0.00% <0.00%> (ø)
src/expr/src/expr/expr_udf.rs 0.00% <0.00%> (ø)
src/expr/src/expr/value.rs 0.00% <0.00%> (ø)
src/expr/src/table_function/user_defined.rs 0.00% <ø> (ø)
src/frontend/src/catalog/connection_catalog.rs 0.00% <0.00%> (ø)
src/meta/src/rpc/service/cloud_service.rs 0.00% <0.00%> (ø)
src/frontend/src/utils/with_options.rs 75.93% <42.85%> (-4.23%) ⬇️
src/expr/src/expr/mod.rs 58.82% <66.66%> (-1.18%) ⬇️
... and 11 more

... and 4 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@StrikeW StrikeW changed the title feat: support privatelink.endpoint option in the WITH clause feat: support privatelink.endpoint option in the WITH clause for Kafka connector Sep 20, 2023
Copy link
Collaborator

@hzxa21 hzxa21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@StrikeW StrikeW added this pull request to the merge queue Sep 22, 2023
Merged via the queue into main with commit e365747 Sep 22, 2023
8 of 9 checks passed
@StrikeW StrikeW deleted the siyuan/privatelink-gcp branch September 22, 2023 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: allow passing an existing private link endpoint in create sink/source statement
2 participants