Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In order to prevent missed deadlines of some rules affecting the entire group, split the k8s.rules group into 7 groups. Similar to #632.
Pre-split, the single
k8s.rules
group was failing evaluation constantly at 1 minute interaval, so there's isn't really a "before" state other than "broken".At the first commit in this PR (45678b5), I tried 3 groups. 2/3 groups were fine but there was still 1 group failing. I then split that group into 5 on the second commit (d1a28fc), as every rule was taking ~20-30s.
Post-split evaluation sample from a busy cluster using the 7 groups:
k8s.rules.container_cpu_usage_seconds_total
(total: 12s)node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate
12sk8s.rules.container_memory_cache
(total: 27s)node_namespace_pod_container:container_memory_cache
27sk8s.rules.container_memory_rss
(total: 17s)node_namespace_pod_container:container_memory_rss
17sk8s.rules.container_memory_swap
(total: 27s)node_namespace_pod_container:container_memory_swap
27sk8s.rules.container_memory_working_set_bytes
(total: 25s)node_namespace_pod_container:container_memory_working_set_bytes
25sk8s.rules.container_resource
(total: 46s)cluster:namespace:pod_memory:active:kube_pod_container_resource_requests
11snamespace_memory:kube_pod_container_resource_requests:sum
4scluster:namespace:pod_cpu:active:kube_pod_container_resource_requests
10snamespace_cpu:kube_pod_container_resource_requests:sum
2scluster:namespace:pod_memory:active:kube_pod_container_resource_limits
9snamespace_memory:kube_pod_container_resource_limits:sum
2scluster:namespace:pod_cpu:active:kube_pod_container_resource_limits
6snamespace_cpu:kube_pod_container_resource_limits:sum
2sk8s.rules.pod_owner
(total: 11s)namespace_workload_pod:kube_pod_owner:relabel
(deployment) 9snamespace_workload_pod:kube_pod_owner:relabel
(daemonset) 2snamespace_workload_pod:kube_pod_owner:relabel
(statefulset) 0snamespace_workload_pod:kube_pod_owner:relabel
(job) 0sWith the 7-group configuration, all rules are evaluating sucessfully.