tidb-operator icon indicating copy to clipboard operation
tidb-operator copied to clipboard

Opt: Add a ValidatingAdmissionPolicy for volume storage

Open fgksgf opened this issue 5 months ago • 4 comments

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.


fgksgf avatar Jun 24 '25 08:06 fgksgf

/run-pull-e2e-kind-v2

github-actions[bot] avatar Jun 24 '25 08:06 github-actions[bot]

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.

codecov-commenter avatar Jun 24 '25 08:06 codecov-commenter

/run-pull-e2e-kind-v2

github-actions[bot] avatar Jun 24 '25 09:06 github-actions[bot]

/run-pull-e2e-kind-v2

github-actions[bot] avatar Jun 25 '25 10:06 github-actions[bot]

/run-pull-e2e-kind-v2

github-actions[bot] avatar Jun 25 '25 10:06 github-actions[bot]

/run-pull-e2e-kind-v2

github-actions[bot] avatar Jun 25 '25 11:06 github-actions[bot]

/lgtm

liubog2008 avatar Jun 27 '25 06:06 liubog2008

[LGTM Timeline notifier]

Timeline:

  • 2025-06-27 06:31:16.647966817 +0000 UTC m=+1030929.371145792: :ballot_box_with_check: agreed by liubog2008.

ti-chi-bot[bot] avatar Jun 27 '25 06:06 ti-chi-bot[bot]

[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

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

ti-chi-bot[bot] avatar Jun 27 '25 06:06 ti-chi-bot[bot]