Fix scopt for adapter rules

This commit is contained in:
Stefan Reimer 2020-08-03 18:53:18 +01:00
parent 56d20b0683
commit 1f6aaf308f

View File

@ -118,29 +118,30 @@ prometheus-adapter:
node-role.kubernetes.io/master: "" node-role.kubernetes.io/master: ""
# Basic rules for HPA to work replacing heaptster, taken from kube-prometheus project # Basic rules for HPA to work replacing heaptster, taken from kube-prometheus project
# https://github.com/coreos/kube-prometheus/blob/master/manifests/prometheus-adapter-configMap.yaml # https://github.com/coreos/kube-prometheus/blob/master/manifests/prometheus-adapter-configMap.yaml
resource: rules:
cpu: resource:
containerQuery: sum(rate(container_cpu_usage_seconds_total{<<.LabelMatchers>>}[3m])) by (<<.GroupBy>>) cpu:
nodeQuery: sum(rate(container_cpu_usage_seconds_total{<<.LabelMatchers>>, id='/'}[3m])) by (<<.GroupBy>>) containerQuery: sum(rate(container_cpu_usage_seconds_total{<<.LabelMatchers>>}[3m])) by (<<.GroupBy>>)
resources: nodeQuery: sum(rate(container_cpu_usage_seconds_total{<<.LabelMatchers>>, id='/'}[3m])) by (<<.GroupBy>>)
overrides: resources:
instance: overrides:
resource: node instance:
namespace: resource: node
resource: namespace namespace:
pod: resource: namespace
resource: pod pod:
containerLabel: container resource: pod
memory: containerLabel: container
containerQuery: sum(container_memory_working_set_bytes{<<.LabelMatchers>>}) by (<<.GroupBy>>) memory:
nodeQuery: sum(container_memory_working_set_bytes{<<.LabelMatchers>>,id='/'}) by (<<.GroupBy>>) containerQuery: sum(container_memory_working_set_bytes{<<.LabelMatchers>>}) by (<<.GroupBy>>)
resources: nodeQuery: sum(container_memory_working_set_bytes{<<.LabelMatchers>>,id='/'}) by (<<.GroupBy>>)
overrides: resources:
instance: overrides:
resource: node instance:
namespace: resource: node
resource: namespace namespace:
pod: resource: namespace
resource: pod pod:
containerLabel: container resource: pod
window: 3m containerLabel: container
window: 3m