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

Introduce a validation webhook to prohibit WorkloadRebalancer from being modified #4859

Closed
wants to merge 1 commit into from

Conversation

chaosi-zju
Copy link
Member

DO NOT MERGE until the following PR have been merged (this PR needs a rebasing) :

What type of PR is this?

/kind feature

What this PR does / why we need it:

Introduce a validation webhook to prohibit WorkloadRebalancer from being modified, the final effect is like:

$ kubectl --context karmada-apiserver edit wr demo
error: workloadrebalancers.apps.karmada.io "demo" could not be patched: admission webhook "workloadrebalancer.karmada.io" denied the request: the spec field should not be modified
You can run `kubectl replace -f /tmp/kubectl-edit-vdiqj.yaml` to try this update again.
$
$ kubectl --context karmada-apiserver replace -f demo2.yaml     
Error from server (Forbidden): error when replacing "demo2.yaml": admission webhook "workloadrebalancer.karmada.io" denied the request: the spec field should not be modified

Which issue(s) this PR fixes:

Fixes part of #4840

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


@karmada-bot karmada-bot added the kind/feature Categorizes issue or PR as related to a new feature. label Apr 22, 2024
@karmada-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign rainbowmango after the PR has been reviewed.
You can assign the PR to them by writing /assign @rainbowmango in a comment when ready.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@karmada-bot karmada-bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Apr 22, 2024
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 52.97%. Comparing base (aded7c0) to head (09f93bd).
Report is 2 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4859      +/-   ##
==========================================
- Coverage   52.99%   52.97%   -0.02%     
==========================================
  Files         250      250              
  Lines       20420    20421       +1     
==========================================
- Hits        10821    10819       -2     
- Misses       8880     8882       +2     
- Partials      719      720       +1     
Flag Coverage Δ
unittests 52.97% <100.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@karmada-bot karmada-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Apr 23, 2024
@chaosi-zju
Copy link
Member Author

/close

we will try to implemente update event in #4860

@karmada-bot
Copy link
Collaborator

@chaosi-zju: Closed this PR.

In response to this:

/close

we will try to implemente update event in #4860

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants