All checks were successful
release-charts-postgres-cluster / release (push) Successful in 18s
19 lines
894 B
YAML
19 lines
894 B
YAML
{{- $alert := "CNPGClusterZoneSpreadWarning" -}}
|
|
{{- if not (has $alert .excludeRules) -}}
|
|
alert: {{ $alert }}
|
|
annotations:
|
|
summary: CNPG Cluster instances in the same zone.
|
|
description: |-
|
|
CloudNativePG Cluster "{{ .namespace }}/{{ .cluster }}" has instances in the same availability zone.
|
|
|
|
A disaster in one availability zone will lead to a potential service disruption and/or data loss.
|
|
runbook_url: https://github.com/cloudnative-pg/charts/blob/main/charts/cluster/docs/runbooks/CNPGClusterZoneSpreadWarning.md
|
|
expr: |
|
|
{{ .Values.cluster.instances }} > count(count by (label_topology_kubernetes_io_zone) (kube_pod_info{namespace="{{ .namespace }}", pod=~"{{ .podSelector }}"} * on(node,instance) group_left(label_topology_kubernetes_io_zone) kube_node_labels)) < 3
|
|
for: 5m
|
|
labels:
|
|
severity: warning
|
|
namespace: {{ .namespace }}
|
|
cnpg_cluster: {{ .cluster }}
|
|
{{- end -}}
|