tidb-operator
tidb-operator copied to clipboard
Opt: Add a ValidatingAdmissionPolicy for volume storage
What problem does this PR solve?
#6172
What is changed and how does it work?
Add a ValidatingAdmissionPolicy, which ensures:
- Storage values must be greater than 0
- Storage values can only increase, never decrease (for UPDATE operations)
Code changes
- [x] Has Go code change
- [ ] Has CI related scripts change
Tests
- [ ] Unit test
- [x] 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.
/run-pull-e2e-kind-v2
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 46.12%. Comparing base (
91702a8) to head (64fba7b).
Additional details and impacted files
@@ Coverage Diff @@
## feature/v2 #6266 +/- ##
===========================================
Coverage 46.12% 46.12%
===========================================
Files 304 304
Lines 20008 20008
===========================================
Hits 9229 9229
Misses 10779 10779
| Flag | Coverage Δ | |
|---|---|---|
| unittest | 46.12% <ø> (ø) |
Flags with carried forward coverage won't be shown. Click here to find out more.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
/run-pull-e2e-kind-v2
/run-pull-e2e-kind-v2
/run-pull-e2e-kind-v2
/run-pull-e2e-kind-v2
/lgtm
[LGTM Timeline notifier]
Timeline:
2025-06-27 06:31:16.647966817 +0000 UTC m=+1030929.371145792: :ballot_box_with_check: agreed by liubog2008.
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: liubog2008
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [liubog2008]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment