github.com/verrazzano/verrazzano@v1.7.0/platform-operator/thirdparty/charts/prometheus-community/prometheus-adapter/templates/configmap.yaml (about) 1 {{- if not .Values.rules.existing -}} 2 apiVersion: v1 3 kind: ConfigMap 4 metadata: 5 name: {{ template "k8s-prometheus-adapter.fullname" . }} 6 namespace: {{ include "k8s-prometheus-adapter.namespace" . }} 7 {{- if .Values.customAnnotations }} 8 annotations: 9 {{- toYaml .Values.customAnnotations | nindent 4 }} 10 {{- end }} 11 labels: 12 {{- include "k8s-prometheus-adapter.labels" . | indent 4 }} 13 data: 14 config.yaml: | 15 {{- if or .Values.rules.default .Values.rules.custom }} 16 rules: 17 {{- if .Values.rules.default }} 18 - seriesQuery: '{__name__=~"^container_.*",container!="POD",namespace!="",pod!=""}' 19 seriesFilters: [] 20 resources: 21 overrides: 22 namespace: 23 resource: namespace 24 pod: 25 resource: pod 26 name: 27 matches: ^container_(.*)_seconds_total$ 28 as: "" 29 metricsQuery: sum(rate(<<.Series>>{<<.LabelMatchers>>,container!="POD"}[5m])) 30 by (<<.GroupBy>>) 31 - seriesQuery: '{__name__=~"^container_.*",container!="POD",namespace!="",pod!=""}' 32 seriesFilters: 33 - isNot: ^container_.*_seconds_total$ 34 resources: 35 overrides: 36 namespace: 37 resource: namespace 38 pod: 39 resource: pod 40 name: 41 matches: ^container_(.*)_total$ 42 as: "" 43 metricsQuery: sum(rate(<<.Series>>{<<.LabelMatchers>>,container!="POD"}[5m])) 44 by (<<.GroupBy>>) 45 - seriesQuery: '{__name__=~"^container_.*",container!="POD",namespace!="",pod!=""}' 46 seriesFilters: 47 - isNot: ^container_.*_total$ 48 resources: 49 overrides: 50 namespace: 51 resource: namespace 52 pod: 53 resource: pod 54 name: 55 matches: ^container_(.*)$ 56 as: "" 57 metricsQuery: sum(<<.Series>>{<<.LabelMatchers>>,container!="POD"}) by (<<.GroupBy>>) 58 - seriesQuery: '{namespace!="",__name__!~"^container_.*"}' 59 seriesFilters: 60 - isNot: .*_total$ 61 resources: 62 template: <<.Resource>> 63 name: 64 matches: "" 65 as: "" 66 metricsQuery: sum(<<.Series>>{<<.LabelMatchers>>}) by (<<.GroupBy>>) 67 - seriesQuery: '{namespace!="",__name__!~"^container_.*"}' 68 seriesFilters: 69 - isNot: .*_seconds_total 70 resources: 71 template: <<.Resource>> 72 name: 73 matches: ^(.*)_total$ 74 as: "" 75 metricsQuery: sum(rate(<<.Series>>{<<.LabelMatchers>>}[5m])) by (<<.GroupBy>>) 76 - seriesQuery: '{namespace!="",__name__!~"^container_.*"}' 77 seriesFilters: [] 78 resources: 79 template: <<.Resource>> 80 name: 81 matches: ^(.*)_seconds_total$ 82 as: "" 83 metricsQuery: sum(rate(<<.Series>>{<<.LabelMatchers>>}[5m])) by (<<.GroupBy>>) 84 {{- end -}} 85 {{- if .Values.rules.custom }} 86 {{ toYaml .Values.rules.custom | indent 4 }} 87 {{- end -}} 88 {{- end -}} 89 {{- if .Values.rules.external }} 90 externalRules: 91 {{ toYaml .Values.rules.external | indent 4 }} 92 {{- end -}} 93 {{- if .Values.rules.resource }} 94 resourceRules: 95 {{ toYaml .Values.rules.resource | indent 6 }} 96 {{- end -}} 97 {{- end -}}