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

webhook: add quota evaluate webhook #2129

Merged
merged 2 commits into from
Jul 10, 2024

Conversation

shaloulcy
Copy link
Contributor

Ⅰ. Describe what this PR does

add quota evaluate webhook. if the pod requests exceed max or admission, the webhook will reject the create

Ⅱ. Does this pull request fix one issue?

Ⅲ. Describe how to verify it

Ⅳ. Special notes for reviews

V. Checklist

  • I have written necessary docs and comments
  • I have added necessary unit tests and integration tests
  • All checks passed in make test

@saintube saintube changed the title add quota evaluate webhook webhook: add quota evaluate webhook Jul 9, 2024
chuanyun.lcy added 2 commits July 10, 2024 10:49
Signed-off-by: chuanyun.lcy <chuanyun.lcy@alibaba-inc.com>
Signed-off-by: chuanyun.lcy <chuanyun.lcy@alibaba-inc.com>
Copy link

codecov bot commented Jul 10, 2024

Codecov Report

Attention: Patch coverage is 65.77670% with 141 lines in your changes missing coverage. Please review.

Project coverage is 68.66%. Comparing base (4a61e34) to head (d517e7d).
Report is 4 commits behind head on main.

Files Patch % Lines
pkg/webhook/quotaevaluate/evaluator.go 62.50% 58 Missing and 23 partials ⚠️
pkg/webhook/elasticquota/util.go 73.40% 25 Missing ⚠️
pkg/webhook/quotaevaluate/quota_accessor.go 67.56% 9 Missing and 3 partials ⚠️
pkg/webhook/pod/validating/evaluate_quota.go 66.66% 7 Missing and 4 partials ⚠️
pkg/webhook/pod/validating/validating_handler.go 42.85% 2 Missing and 2 partials ⚠️
pkg/webhook/pod/validating/webhooks.go 0.00% 4 Missing ⚠️
...r/plugins/elasticquota/core/group_quota_manager.go 77.77% 1 Missing and 1 partial ⚠️
pkg/webhook/quotaevaluate/util.go 71.42% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2129      +/-   ##
==========================================
- Coverage   68.69%   68.66%   -0.03%     
==========================================
  Files         430      435       +5     
  Lines       40202    40703     +501     
==========================================
+ Hits        27615    27949     +334     
- Misses      10215    10344     +129     
- Partials     2372     2410      +38     
Flag Coverage Δ
unittests 68.66% <65.77%> (-0.03%) ⬇️

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.

Copy link
Member

@saintube saintube left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@koordinator-bot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hormes

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

@koordinator-bot koordinator-bot bot merged commit 6861c87 into koordinator-sh:main Jul 10, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants