
{{- $Values := (.helm).Values | default .Values }}
{{- $runbookUrl := ($Values.defaultRules).runbookUrl | default "https://runbooks.prometheus-operator.dev/runbooks" }}
{{- $clusterLabel := ($Values.global).clusterLabel | default "cluster" }}
{{- $additionalGroupByLabels := append $Values.defaultRules.additionalGroupByLabels $clusterLabel }}
{{- $groupLabels := join "," (uniq $additionalGroupByLabels) }}
{{- $grafanaAddr := include "vm-k8s-stack.grafana.addr" . }}
name: kubernetes-system-controller-manager
rules:
- alert: KubeControllerManagerDown
  expr: absent(up{job="kube-controller-manager"})
  annotations:
    description: KubeControllerManager has disappeared from Prometheus target discovery.
    runbook_url: {{ $runbookUrl }}/kubernetes/kubecontrollermanagerdown
    summary: Target disappeared from Prometheus target discovery.
  condition: {{ ($Values.kubeControllerManager).enabled }}
  for: 15m
  labels:
    severity: critical
condition: {{ ($Values.kubeControllerManager).enabled }}
