-
Notifications
You must be signed in to change notification settings - Fork 499
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
fix: type mismatch in TidbMonitor remoteTimeout #5734
base: master
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Welcome @IMMORTALxJO! It looks like this is your first PR to pingcap/tidb-operator 🎉 |
a36e3d2
to
7013978
Compare
@IMMORTALxJO If we want to modify the CRD, we need to modify the Go struct in types.go and then re-generate the CRD ( |
@csuzhangxc thank you, I've added the missing file with Go struct. |
It seems still need to re-generate other files, can you run |
What problem does this PR solve?
Fix the bug where
tidbmonitor.spec.prometheus.remoteWrite.remoteTimeout
CRD only accepts integers:However, if we pass an integer and check the operator logs, we will see that the operator fails to unmarshal the TiDBMonitor resource because it expected a string instead:
the definition of the struct field in code - here
What is changed and how does it work?
Changed field type in tidbmonitors CRD, from integer to string.
Code changes
Tests
Side effects
Related changes
Release Notes
Please refer to Release Notes Language Style Guide before writing the release note.