Skip to content

Commit

Permalink
Add CAPI cluster namespace to recording rule `aggregation:giantswarm:…
Browse files Browse the repository at this point in the history
…cluster_info` for use by `resource-police` to find out to whom each test cluster belongs (#1306)
  • Loading branch information
AndiDog authored Aug 26, 2024
1 parent 6e542d5 commit 0624698
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- Add CAPI cluster namespace to recording rule `aggregation:giantswarm:cluster_info` for use by [`resource-police`](https://github.com/giantswarm/resource-police/) to find out to whom each test cluster belongs

## [4.11.0] - 2024-08-26

### Changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ spec:
rules:
# This recording rule is used to list all clusters. The last expression is used to list vintage MCs
- expr: |-
avg by (cluster_id, cluster_type, customer, installation, pipeline, provider, region) (
avg by (cluster_id, cluster_type, customer, installation, pipeline, provider, region, exported_namespace) (
label_replace(
capi_cluster_info,
"cluster_id",
Expand All @@ -76,7 +76,7 @@ spec:
or label_replace(cluster_service_cluster_info, "cluster_type", "workload_cluster", "", "") >= 1
or
label_replace(
label_replace(
label_replace(
label_replace(
label_replace(
label_replace(
Expand Down Expand Up @@ -134,7 +134,7 @@ spec:
rules:
- expr: sum(engine_daemon_image_actions_seconds_count) by (cluster_id, cluster_type, customer, installation, pipeline, provider, region, action)
record: aggregation:docker:action_count
- expr: sum(kube_pod_container_info{image_spec=~"docker\\.io/.*"} or kube_pod_init_container_info{image_spec=~"docker\\.io/.*"}) by (cluster_id, cluster_type, customer, installation, pipeline, provider, region)
- expr: sum(kube_pod_container_info{image_spec=~"docker\\.io/.*"} or kube_pod_init_container_info{image_spec=~"docker\\.io/.*"}) by (cluster_id, cluster_type, customer, installation, pipeline, provider, region)
record: aggregation:docker:containers_using_dockerhub_image
- expr: sum(kube_pod_container_info{image_spec=~"docker\\.io/.*"} or kube_pod_init_container_info{image_spec=~"docker\\.io/.*"}) by (cluster_id, cluster_type, customer, installation, pipeline, provider, region) / sum(kube_pod_container_info{} or kube_pod_init_container_info{}) by (cluster_id, cluster_type, customer, installation, pipeline, provider, region)
record: aggregation:docker:containers_using_dockerhub_image_relative
Expand Down Expand Up @@ -361,15 +361,15 @@ spec:
record: aggregation:mimir:scrape_series_added
{{- end }}
- name: dex.grafana-cloud.recording
rules:
rules:
# Dex activity and status based on ingress controller data
- expr: sum(nginx_ingress_controller_requests{namespace="giantswarm",ingress="dex",status=~"5.."}) by (cluster_id, cluster_type, customer, installation, pipeline, provider, region)
record: aggregation:dex_requests_status_5xx
- expr: sum(nginx_ingress_controller_requests{namespace="giantswarm",ingress="dex",status=~"4.."}) by (cluster_id, cluster_type, customer, installation, pipeline, provider, region)
record: aggregation:dex_requests_status_4xx
- expr: sum(nginx_ingress_controller_requests{namespace="giantswarm",ingress="dex",status=~"[23].."}) by (cluster_id, cluster_type, customer, installation, pipeline, provider, region)
record: aggregation:dex_requests_status_ok
# Dex operator metrics for expiry time of identity provider oauth app secrets
# Dex operator metrics for expiry time of identity provider oauth app secrets
- expr: dex_operator_idp_secret_expiry_time
record: aggregation:dex_operator_idp_secret_expiry_time
# Requests to the deprecated k8s authenticator. TODO(@team-bigmac): Get rid of this recording rule when the component is no longer used.
Expand Down

0 comments on commit 0624698

Please sign in to comment.