Skip to content

Commit

Permalink
Deduplicate instance ID for OCP worker and storage nodes (#17)
Browse files Browse the repository at this point in the history
* Deduplicate instance ID for worker and storage nodes

* Update golden file
  • Loading branch information
corvus-ch authored Jan 23, 2024
1 parent 9311c34 commit 50d89fb
Show file tree
Hide file tree
Showing 2 changed files with 159 additions and 159 deletions.
6 changes: 3 additions & 3 deletions class/defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -385,19 +385,19 @@ parameters:
cloud_provider: xelon
role: app
vshn_service_level: zero
instance_id_pattern: 'ocp-vcpu-%(cluster_id)s'
instance_id_pattern: 'ocp-vcpu-%(cluster_id)s-%(role)s'
item_group_description_pattern: 'APPUiO Managed OpenShift - Cluster: %(cluster_id)s'
unit_id: 'uom_uom_49_440b0fa7' #vCPU-Hour
query_pattern: |
# Calculates vCPUs for app nodes of a cluster
# Max values over one hour.
max_over_time(
# Sum the vCPUs by cluster
sum by(cluster_id) (
sum by(cluster_id, role) (
# Get the node vCPUs
node_cpu_info
# Limit to worker nodes only
* on (cluster_id, instance) group_left() (
* on (cluster_id, instance) group_left(role) (
# node_cpu_info and kube_node_role use different labels to identify the node.
label_join(kube_node_role{role="%(role)s"}, "instance", "", "node")
)
Expand Down
Loading

0 comments on commit 50d89fb

Please sign in to comment.