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

Generate CRDs by controller-gen #4151

Merged
merged 38 commits into from
Nov 22, 2021
Merged

Conversation

KanShiori
Copy link
Collaborator

@KanShiori KanShiori commented Aug 23, 2021

What problem does this PR solve?

Fix #2753 Fix #4032 Fix #4172

Ref #3878

What is changed and how does it work?

  • use controller-gen to generate CRDs, and modify the related script
  • modify some code to make controller-gen happy
  • generate v1 CRDs and v1beta CRDs in dir manifest/crd, and merge them into the files manifest/crd.yaml and manifest/crd_v1beta1.yaml

Code changes

  • Has Go code change
  • Has CI related scripts change

Tests

  • Unit test
  • E2E test
  • Manual test

GKE 1.20.8

GKE 1.17.17 / EKS 1.16.15

  • Apply manifest/crd_v1beta1.yaml and deploy
    • TiDBCluster
    • TiDBInitailizer
    • TiDBMonitor
    • DMCluster
    • Backup Restore
  • Apply manifest/crd.yaml and deploy
    • TiDBCluster
    • TiDBInitailizer
    • TiDBMonitor
    • DMCluster
    • Backup Restore

CRD upgrade

  • Deploy v1beta1 CRD and upgrade to v1 CRD by kubectl replace

  • No code

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.


@ti-chi-bot
Copy link
Member

ti-chi-bot commented Aug 23, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • DanielZhangQD
  • csuzhangxc

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

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

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@KanShiori KanShiori changed the title Generate CRDs by controller-gen [WIP] Generate CRDs by controller-gen Aug 23, 2021
@codecov-commenter
Copy link

codecov-commenter commented Aug 23, 2021

Codecov Report

Merging #4151 (d8e29b2) into master (b4b8abd) will increase coverage by 0.79%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #4151      +/-   ##
==========================================
+ Coverage   69.79%   70.59%   +0.79%     
==========================================
  Files         185      185              
  Lines       21812    21812              
==========================================
+ Hits        15224    15398     +174     
+ Misses       5415     5226     -189     
- Partials     1173     1188      +15     
Flag Coverage Δ
e2e 57.48% <66.66%> (+1.85%) ⬆️
unittest 61.63% <100.00%> (+0.02%) ⬆️

@KanShiori
Copy link
Collaborator Author

/run-all-tests

@KanShiori
Copy link
Collaborator Author

/test pull-e2e-kind

@KanShiori KanShiori changed the title [WIP] Generate CRDs by controller-gen Generate CRDs by controller-gen Aug 24, 2021
@KanShiori
Copy link
Collaborator Author

/test pull-e2e-kind

1 similar comment
@KanShiori
Copy link
Collaborator Author

/test pull-e2e-kind

# Conflicts:
#	manifests/crd.yaml
#	tests/actions.go
@KanShiori
Copy link
Collaborator Author

/test pull-e2e-kind

@DanielZhangQD
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 67c1470

@DanielZhangQD
Copy link
Contributor

/test pull-e2e-kind-br

@KanShiori
Copy link
Collaborator Author

/test pull-e2e-kind

4 similar comments
@DanielZhangQD
Copy link
Contributor

/test pull-e2e-kind

@KanShiori
Copy link
Collaborator Author

/test pull-e2e-kind

@KanShiori
Copy link
Collaborator Author

/test pull-e2e-kind

@DanielZhangQD
Copy link
Contributor

/test pull-e2e-kind

@DanielZhangQD
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: d8e29b2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants