fix: avoid silent rejection to invalid `podManagementPolicy`
What problem does this PR solve?
This PR solves the problem mentioned in https://github.com/pingcap/tidb-operator/issues/4649. Basically, we believe an invalid podManagementPolicy should not be silently replaced by some default values without explicitly telling the user that the input is invalid.
What is changed and how does it work?
We added a warning to explicitly tell the user that podManagement is invalid and the operator will use Parallel instead.
Code changes
- [x] Has Go code change
- [ ] Has CI related scripts change
Tests
- [x] Unit test
- [ ] E2E test
- [ ] Manual test
- [ ] 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.
NONE
[REVIEW NOTIFICATION]
This pull request has not been approved.
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.
@hoyhbx Please rebase this PR, thanks!
Codecov Report
Merging #4650 (0fce0aa) into master (5c7e1a4) will increase coverage by
0.00%. The diff coverage isn/a.
@@ Coverage Diff @@
## master #4650 +/- ##
=======================================
Coverage 62.64% 62.65%
=======================================
Files 186 186
Lines 20853 20853
=======================================
+ Hits 13064 13066 +2
+ Misses 6592 6591 -1
+ Partials 1197 1196 -1
| Flag | Coverage Δ | |
|---|---|---|
| unittest | 62.65% <ø> (+<0.01%) |
:arrow_up: |
@hoyhbx Please rebase this PR, thanks!
@DanielZhangQD It's done now.
PR needs rebase.
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 kubernetes/test-infra repository.