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

opt(ticdc): support to overwrite the default cluster TLS cert secret name #5778

Merged
merged 4 commits into from
Oct 29, 2024

Conversation

ideascf
Copy link
Contributor

@ideascf ideascf commented Oct 25, 2024

What problem does this PR solve?

This PR introduces a new field clusterTLSSecretName in tc.spec.ticdc that support overwriting the default cluster TLS secret name. This is useful sharing the same mTLS cert secret for multiple ticdc clusters connecting to the same upstream tidb cluster.

What is changed and how does it work?

Code changes

  • Has Go code change
  • Has CI related scripts change

Tests

  • Unit test
  • E2E test
  • Manual test
  • No code
  • Create a TC with ticdc enabled
  • The ticdc pod should mount '{TC_NAME}-ticdc-cluster-secret' as the ticdc-tls
  - name: ticdc-tls
    secret:
      defaultMode: 420
      secretName: db-ticdc-cluster-secret
  • Set 'tc.spec.ticdc.clusterTLSSecretName' to 'db-cluster-client-secret', the ticdc pod should be recreated and mount the secret 'db-cluster-client-secret' as the ticdc-tls
  - name: ticdc-tls
    secret:
      defaultMode: 420
      secretName: db-cluster-client-secret
db-ticdc-0                               1/1     Terminating   0          38m
db-ticdc-0                               0/1     Completed     0          38m
db-ticdc-0                               0/1     Completed     0          38m
db-ticdc-0                               0/1     Completed     0          38m
db-ticdc-0                               0/1     Pending       0          0s
db-ticdc-0                               0/1     Pending       0          0s
db-ticdc-0                               0/1     ContainerCreating   0          0s
db-ticdc-0                               1/1     Running             0          6s
db-ticdc-0                               1/1     Running             0          7s

Side effects

  • Breaking backward compatibility
  • Other side effects:

Related changes

  • Need to cherry-pick to the release branch
  • Need to update the documentation

Release Notes

Please refer to Release Notes Language Style Guide before writing the release note.


Copy link
Contributor

@WangLe1321 WangLe1321 left a comment

Choose a reason for hiding this comment

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

LGTM

@ideascf
Copy link
Contributor Author

ideascf commented Oct 28, 2024

/run-all-tests

@WangLe1321
Copy link
Contributor

/run-pull-e2e-kind

@WangLe1321
Copy link
Contributor

/run-pull-e2e-kind-across-kubernetes
/run-pull-e2e-kind-basic
/run-pull-e2e-kind-br

@ti-chi-bot ti-chi-bot bot removed the lgtm label Oct 28, 2024
@codecov-commenter
Copy link

codecov-commenter commented Oct 28, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 4 lines in your changes missing coverage. Please review.

Project coverage is 46.98%. Comparing base (9ef26f8) to head (ebc894b).
Report is 34 commits behind head on master.

❗ There is a different number of reports uploaded between BASE (9ef26f8) and HEAD (ebc894b). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (9ef26f8) HEAD (ebc894b)
unittest 1 0
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #5778       +/-   ##
===========================================
- Coverage   61.47%   46.98%   -14.49%     
===========================================
  Files         235      219       -16     
  Lines       30653    30975      +322     
===========================================
- Hits        18843    14553     -4290     
- Misses       9920    14676     +4756     
+ Partials     1890     1746      -144     
Flag Coverage Δ
e2e 46.98% <66.66%> (?)
unittest ?

@ti-chi-bot ti-chi-bot bot added the lgtm label Oct 29, 2024
Copy link
Contributor

ti-chi-bot bot commented Oct 29, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: WangLe1321

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Contributor

ti-chi-bot bot commented Oct 29, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-10-28 09:08:47.348527728 +0000 UTC m=+254440.187683274: ☑️ agreed by WangLe1321.
  • 2024-10-28 09:47:05.994927466 +0000 UTC m=+256738.834082996: ✖️🔁 reset by ideascf.
  • 2024-10-29 02:01:45.194147516 +0000 UTC m=+315218.033303062: ☑️ agreed by WangLe1321.

@WangLe1321
Copy link
Contributor

/run-all-tests

@ti-chi-bot ti-chi-bot bot merged commit 8cb0848 into pingcap:master Oct 29, 2024
12 of 13 checks passed
@csuzhangxc
Copy link
Member

/cherry-pick release-1.6

@ti-chi-bot
Copy link
Member

@csuzhangxc: new pull request created to branch release-1.6: #5824.

In response to this:

/cherry-pick release-1.6

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

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.

5 participants