-
Notifications
You must be signed in to change notification settings - Fork 318
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
koord-manager: add elastic quota webhook #585
koord-manager: add elastic quota webhook #585
Conversation
8d4d4af
to
2374587
Compare
Codecov ReportBase: 68.82% // Head: 68.78% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #585 +/- ##
==========================================
- Coverage 68.82% 68.78% -0.04%
==========================================
Files 196 203 +7
Lines 22323 22905 +582
==========================================
+ Hits 15363 15756 +393
- Misses 5883 6046 +163
- Partials 1077 1103 +26
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
2374587
to
dceba0a
Compare
dceba0a
to
075b958
Compare
c876b64
to
738b9cc
Compare
c36da49
to
5df1829
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/LGTM
return fmt.Errorf("BUG quotaMap and quotaTree information out of sync, losed :%v", quotaName) | ||
} | ||
|
||
delete(qt.quotaHierarchyInfo[quotaInfo.ParentName], quotaName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
validate 里修改内部状态是否合适?
@@ -57,6 +63,12 @@ func (h *PodValidatingHandler) validatingPodFn(ctx context.Context, req admissio | |||
} | |||
|
|||
allowed, reason, err = h.clusterColocationProfileValidatingPod(ctx, req) | |||
if err == nil { | |||
plugin := elasticquota.NewPlugin(h.Decoder, h.Client) | |||
if err = plugin.ValidatePod(ctx, req); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
因为尝试在这里维护内部状态,那这个插件就需要放在最后了。(如果集群还存在其他 webhook 组件,Pod 依然可能存在被拒绝的情形,这时内部的状态如何补偿)
5df1829
to
c77efb6
Compare
c77efb6
to
e3603b5
Compare
Signed-off-by: xulinfei.xlf <xulinfei.xlf@alibaba-inc.com>
e3603b5
to
9560ef9
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: buptcozy, 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 |
Signed-off-by: xulinfei.xlf xulinfei.xlf@alibaba-inc.com
Ⅰ. Describe what this PR does
Ⅱ. Does this pull request fix one issue?
Ⅲ. Describe how to verify it
Ⅳ. Special notes for reviews
V. Checklist
make test