Skip to content

Conversation

WenyXu
Copy link
Member

@WenyXu WenyXu commented Sep 16, 2025

I hereby agree to the terms of the GreptimeDB CLA.

Refer to a related PR or issue link (optional)

close #6840

What's changed and what's your intention?

This PR introduces TLS support for MySQL backend and refactors the metadata backend utilities.

Changes

  • Moved database connection logic from bootstrap.rs to dedicated utility modules:
    utils::mysql - MySQL connection pool and SSL configuration
    utils::postgres - PostgreSQL connection pool logic
    utils::etcd - etcd TLS configuration utilities
  • Unified certificate generation scripts and directory structure

PR Checklist

Please convert it to a draft if some of the following conditions are not met.

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.
  • This PR requires documentation updates.
  • API changes are backward compatible.
  • Schema or data changes are backward compatible.

@github-actions github-actions bot added size/L docs-not-required This change does not impact docs. labels Sep 16, 2025
@WenyXu WenyXu marked this pull request as ready for review September 16, 2025 11:47
@WenyXu WenyXu requested review from MichaelScofield and a team as code owners September 16, 2025 11:47
@WenyXu WenyXu requested a review from fengjiachun September 16, 2025 11:47
@WenyXu WenyXu enabled auto-merge September 16, 2025 12:04
Copy link
Collaborator

@fengjiachun fengjiachun left a comment

Choose a reason for hiding this comment

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

Rest LGTM

@WenyXu WenyXu added this pull request to the merge queue Sep 16, 2025
auto-merge was automatically disabled September 16, 2025 14:02

Pull Request is not mergeable

Merged via the queue into GreptimeTeam:main with commit 0a959f9 Sep 16, 2025
50 of 52 checks passed
@WenyXu WenyXu deleted the feat/mysql-tls branch September 16, 2025 14:17
killme2008 pushed a commit to killme2008/greptimedb that referenced this pull request Sep 17, 2025
* refactor: move etcd tls code to `common-meta`

Signed-off-by: WenyXu <[email protected]>

* refactor: move postgre pool logic to `utils::postgre`

Signed-off-by: WenyXu <[email protected]>

* feat: setup mysql ssl options

Signed-off-by: WenyXu <[email protected]>

* feat: add test for mysql backend with tls

Signed-off-by: WenyXu <[email protected]>

* refactor: simplify certs generation

Signed-off-by: WenyXu <[email protected]>

* chore: apply suggestions

Signed-off-by: WenyXu <[email protected]>

---------

Signed-off-by: WenyXu <[email protected]>
@github-actions github-actions bot added docs-required This change requires docs update. and removed docs-not-required This change does not impact docs. labels Sep 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-required This change requires docs update. size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add TLS support for mysql metadata backend
3 participants