Skip to content

Commit

Permalink
[kube-prometheus-stack] fix rule mapping with sanitized names (#4351)
Browse files Browse the repository at this point in the history
Co-authored-by: Jan-Otto Kröpke <[email protected]>
  • Loading branch information
bakito and jkroepke authored Mar 10, 2024
1 parent 42702b9 commit 2cc20e1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion charts/kube-prometheus-stack/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ name: kube-prometheus-stack
sources:
- https://github.com/prometheus-community/helm-charts
- https://github.com/prometheus-operator/kube-prometheus
version: 57.0.0
version: 57.0.1
appVersion: v0.72.0
kubeVersion: ">=1.19.0-0"
home: https://github.com/prometheus-operator/kube-prometheus
Expand Down
2 changes: 1 addition & 1 deletion charts/kube-prometheus-stack/hack/sync_prometheus_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ def write_rules_names_template():
f.write('{{- define "rules.names" }}\n')
f.write('rules:\n')
for rule in condition_map:
f.write(' - "%s"\n' % rule)
f.write(' - "%s"\n' % sanitize_name(rule))
f.write('{{- end }}')

def main():
Expand Down
14 changes: 7 additions & 7 deletions charts/kube-prometheus-stack/templates/prometheus/_rules.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ rules:
- "config-reloaders"
- "etcd"
- "general.rules"
- "k8s.rules.container_cpu_usage_seconds_total"
- "k8s.rules.container_memory_cache"
- "k8s.rules.container_memory_rss"
- "k8s.rules.container_memory_swap"
- "k8s.rules.container_memory_working_set_bytes"
- "k8s.rules.container_resource"
- "k8s.rules.pod_owner"
- "k8s.rules.container-cpu-usage-seconds-total"
- "k8s.rules.container-memory-cache"
- "k8s.rules.container-memory-rss"
- "k8s.rules.container-memory-swap"
- "k8s.rules.container-memory-working-set-bytes"
- "k8s.rules.container-resource"
- "k8s.rules.pod-owner"
- "kube-apiserver-availability.rules"
- "kube-apiserver-burnrate.rules"
- "kube-apiserver-histogram.rules"
Expand Down

0 comments on commit 2cc20e1

Please sign in to comment.