-
Notifications
You must be signed in to change notification settings - Fork 20
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
Calculate cpu and mem savings in tortoise #427
base: main
Are you sure you want to change the base?
Conversation
|
||
NetCPURequest = prometheus.NewGaugeVec(prometheus.GaugeOpts{ | ||
Name: "net_cpu_request", | ||
Help: "net cpu request (millicore) that tortoises actually applys", | ||
}, []string{"tortoise_name", "namespace", "container_name", "controller_name", "controller_kind"}) | ||
}, []string{"tortoise_name", "namespace", "container_name", "kube_deployment", "controller_kind"}) |
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.
Why do we have to change it? I do prefer controller_name, which allows us to support other kind of resources (replicaset etc) in the future, and is also consistent with GKE metrics.
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.
hmm but which controller is it referring to? because in the code it is actually referring to the deployment name. i just thought controller_name was a little confusing. But as you mentioned about the breaking change then we could leave it as is because theres no specific need to change it
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.
Yeah, I remember initially I wanted to use owner_name
, but I changed it to controller_name
on the second thought, because controller_name
is used at GKE metrics. Generally speaking, it's much easier to use the same label names as other metrics as much as possible for when you make a dashboard etc at datadog. (you can aggregate with the common labels)
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.
So, make a complaint to GKE 😅
Help: "net hpa maxReplicas that tortoises actually applys to hpa", | ||
}, []string{"tortoise_name", "namespace", "hpa_name", "kube_deployment"}) | ||
NetHPAMinReplicasCPUCores = prometheus.NewGaugeVec(prometheus.GaugeOpts{ | ||
Name: "net_hpa_minreplicas_cpu_cores", |
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.
What does "net" mean?
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.
Also, you must be careful about the fact that changing metrics is a breaking change that we must avoid.
If you think you might have to change the metrics in the future, make sure you mention that in the metric description (i.e. Help
), like Help: "..... This metric is the alpha stage and can be breaking-changed in the future releases."
Especially since you released v1 recently, we need to be careful about the breaking change, in general.
i did not know this. I will make the changes |
What this PR does / why we need it:
Calculates CPU and MEM savings based on min/max replica changes.
Which issue(s) this PR fixes:
#411
Fixes #
Special notes for your reviewer: