-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add metrics of RunnerDeployment and HRA #408
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
Conversation
rdName = "rd_name" | ||
rdNamespace = "rd_namespace" |
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.
Perhaps it would be a bit better to use names that are similar to those of kube-state-metrics? In kube-state-metrics, the namespace label is just namespace
regardless of the kind and the name label is the lowercase kind name:
rdName = "rd_name" | |
rdNamespace = "rd_namespace" | |
rdName = "runnerdeployment" | |
rdNamespace = "namespace" |
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.
Good point 👍
I changed the labels to kube-state-metrics style. It would be better for consistency between various components such as kube-state-metrics.
var ( | ||
horizontalRunnerAutoscalerMinReplicas = prometheus.NewGaugeVec( | ||
prometheus.GaugeOpts{ | ||
Name: "horizontal_runner_autoscaler_min_replicas", |
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.
Sorry for the back-and-forth but according to how kube-state-metrics using horizontalpodautocaler
instead of horizontal_pod_autoscaler
, this could:
Name: "horizontal_runner_autoscaler_min_replicas", | |
Name: "horizontalrunnerautoscaler_min_replicas", |
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.
Exactly. I changed the name to horizontalrunnerautoscaler_spec_min_replicas
like kube-state-metrics.
var ( | ||
runnerDeploymentReplicas = prometheus.NewGaugeVec( | ||
prometheus.GaugeOpts{ | ||
Name: "runner_deployment_replicas", |
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.
Similarly, this could be:
Name: "runner_deployment_replicas", | |
Name: "runnerdeployment_replicas", |
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 👍 Thanks for your support @int128
I'd like to monitor the metrics of RunnerDeployment and HorizontalRunnerAutoscaler.
This PR includes the following metrics:
Related to #312.