Skip to content
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

Golden signal update #748

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

aburhan
Copy link
Contributor

@aburhan aburhan commented Mar 11, 2024

No description provided.

aburhan added 2 commits March 6, 2024 13:57
- rearrange tiles to match cost opt slides
- added tile to show history for demand based downscaling
- added tile to show history for spot usage
update image
@github-actions github-actions bot requested a review from yqlu March 11, 2024 18:43
@aburhan
Copy link
Contributor Author

aburhan commented Mar 11, 2024

@yqlu can you ptal?

@aburhan aburhan requested a review from yqlu March 14, 2024 22:04
@@ -210,7 +209,7 @@
"plotType": "LINE",
"targetAxis": "Y1",
"timeSeriesQuery": {
"timeSeriesQueryLanguage": "{ fetch k8s_container::kubernetes.io/container/cpu/request_cores;\n fetch k8s_node::kubernetes.io/node/cpu/allocatable_cores\n} \n| ${project_id}\n| ${location}\n| ${cluster_name}\n| join\n| group_by [project_id, location, cluster_name], sum(val(0)) / sum(val(1))",
"timeSeriesQueryLanguage": "{ fetch k8s_container::kubernetes.io/container/cpu/request_cores\n| filter\n resource.namespace_name !~ '(kube|istio|gatekeeper|gke|gmp|gke-gmp)-system|gke-managed-filestorecsi|gke-mcs'\n| ${project_id}\n| ${location}\n| ${cluster_name}\n | group_by [], .aggregate()\n ;\n fetch k8s_node::kubernetes.io/node/cpu/allocatable_cores\n| ${project_id}\n| ${location}\n| ${cluster_name}\n | group_by [], .aggregate()\n} \n| join\n| value val(0) / val(1)\n| scale '%'",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you make both the numerator and denominator | group_by [resource.cluster_name, resource.location, resource.project_id] as follows

Screenshot 2024-03-18 at 10 21 15 AM

You get the best of both worlds:

  • when there are multiple clusters, you get one time series per cluster
  • each time series is automatically labelled by the cluster name
  • when the filters are drilled down to a single cluster, the single time series value matches the scorecard

And you should do this for Cluster Bin Packing Memory as well

"scorecard": {
"blankView": {},
"thresholds": [],
"timeSeriesQuery": {
"timeSeriesQueryLanguage": "fetch k8s_node\n| ${project_id}\n| ${location}\n| ${cluster_name}\n| metric 'kubernetes.io/node/cpu/allocatable_utilization'\n| group_by [],.mean\n| scale '%'",
"outputFullDuration": true,
"timeSeriesQueryLanguage": "fetch k8s_node\n| ${project_id}\n| ${location}\n| ${cluster_name}\n| metric 'kubernetes.io/node/cpu/allocatable_utilization'\n| group_by 1m,\n [value_allocatable_utilization_mean: mean(value.allocatable_utilization)]\n| every 1m\n| group_by [resource.project_id, resource.location, resource.cluster_name],\n [value_allocatable_utilization_mean_aggregate:\n aggregate(value_allocatable_utilization_mean)]\n| value\n [value_allocatable_utilization_mean_aggregate_scale:\n scale(value_allocatable_utilization_mean_aggregate, '%')]",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as the Demand-Based Downscaling XY chart below (the aggregate() should be a mean())

But in addition, this should be group_by [] so that we reduce it to a single line. When I test this out in a project with multiple GKE clusters I get the following error:
Screenshot 2024-03-18 at 10 30 43 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants