-
Notifications
You must be signed in to change notification settings - Fork 385
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 wildcard support for evpa container policy, and update the status… #309
add wildcard support for evpa container policy, and update the status… #309
Conversation
🎉 Successfully Build Images. Overview: https://finops.coding.net/public-artifacts/gocrane/crane/packages
|
if currentCpu.Cmp(recommendCpu) > 0 { | ||
// scale down | ||
currCopy := currentCpu.DeepCopy() | ||
currCopy.Sub(recommendCpu) | ||
metrics.EVPACpuScaleDownMilliCores.With(labels).Set(float64(currCopy.MilliValue())) | ||
metrics.EVPACpuScaleDownMilliCores.With(labels).Set(float64(currCopy.MilliValue()) / 1000.) |
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.
Millicores is more accurate here.
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.
Millicores is more accurate here.
I see that other metrics such as kube-state-metrics is not have unit in metricnaming, it is just use as a label to denote the unit. such as cores
and bytes
. for example, we use it to join with kube_pod_container_resource_requests
.
it is better for us to do metircs and dashboard
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.
ok, please also change variable name.
if currentMem.Cmp(recommendMem) > 0 { | ||
// scale down | ||
currCopy := currentMem.DeepCopy() | ||
currCopy.Sub(recommendMem) | ||
metrics.EVPAMemoryScaleDownMB.With(labels).Set(float64(currCopy.Value() / 1024 / 1024)) | ||
metrics.EVPAMemoryScaleDownMB.With(labels).Set(float64(currCopy.Value())) |
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.
Use MB unit here.
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.
Use MB unit here.
same reason as above, i think we should not use the unit here, keep the original bytes. and use label to denote the unit
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.
ok, please also change variable name.
… even if it is off mode, because we need to record the metrics
4c01942
to
3338ef9
Compare
/LGTM |
… even if it is off mode, because we need to record the metrics
What type of PR is this?
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #308
Special notes for your reviewer: