-
Notifications
You must be signed in to change notification settings - Fork 342
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
add group identity plugin #166
Conversation
/assign |
/hold for ut |
/hold cancel |
for hookFeature, hookPlugin := range runtimeHookPlugins { | ||
if DefaultRuntimeHooksFG.Enabled(hookFeature) { | ||
enbaled := DefaultRuntimeHooksFG.Enabled(hookFeature) |
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.
typo: enabled
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.
fixed
} | ||
|
||
func (b *bvtPlugin) parseRule(mergedNodeSLO *slov1alpha1.NodeSLOSpec) (bool, error) { | ||
lsrValue := int64(0) |
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.
how about lsrValue = int64(bvtDefault)
could the default derive from util.DefaultCPUQOS
, or util.DefaultXXXQOS
is going to be removed?
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.
yep, using mergedNodeSLO directly is better since it is already merged
podBvt := r.getPodBvtValue(podQoS, podKubeQoS) | ||
podCgroupPath := util.GetPodCgroupDirWithKube(podMeta.CgroupDir) | ||
if err := sysutil.CgroupFileWrite(podCgroupPath, sysutil.CPUBVTWarpNs, strconv.FormatInt(podBvt, 10)); err != nil { | ||
klog.Infof("update pod %v/%v cpu bvt failed, dir %v, error %v", |
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.
how about "pod %s", util.GetPodKey(pod)
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.
updated
|
||
var singleton *bvtPlugin | ||
|
||
func Object() *bvtPlugin { |
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.
Will there be a scenario of concurrent calls?
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.
not gonna happened, Object is only called during config init stage
Signed-off-by: zwzhang0107 <zuoweizhang@outlook.com>
Codecov Report
@@ Coverage Diff @@
## main #166 +/- ##
==========================================
+ Coverage 58.30% 58.67% +0.36%
==========================================
Files 92 95 +3
Lines 8370 8558 +188
==========================================
+ Hits 4880 5021 +141
- Misses 3077 3115 +38
- Partials 413 422 +9
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
/approve |
[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 |
/lgtm |
Signed-off-by: zwzhang0107 zuoweizhang@outlook.com
Ⅰ. Describe what this PR does
#154
Ⅱ. Does this pull request fix one issue?
Ⅲ. Describe how to verify it
Ⅳ. Special notes for reviews