Skip to content

Commit 5752ba3

Browse files
committed
feat: Add KubeDeploymentRolloutStuck
This add an alert when a deployment rollout hits its `spec.progressDeadlineSeconds`. Those could have a number of causes, which can originates from the cluster or the deployment: - pods taking too much time to start - cluster at full capacity and deployment surging during upgrade (maxSurge > 0).
1 parent d87b757 commit 5752ba3

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

alerts/apps_alerts.libsonnet

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,21 @@
8787
'for': '15m',
8888
alert: 'KubeDeploymentReplicasMismatch',
8989
},
90+
{
91+
expr: |||
92+
kube_deployment_status_condition{condition="Progressing", status="false",%(prefixedNamespaceSelector)s%(kubeStateMetricsSelector)s}
93+
!= 0
94+
||| % $._config,
95+
labels: {
96+
severity: 'warning',
97+
},
98+
annotations: {
99+
description: 'Rollout of deployment {{ $labels.namespace }}/{{ $labels.deployment }} is not progressing for longer than 15 minutes.',
100+
summary: 'Deployment rollout is not progressing.',
101+
},
102+
'for': '15m',
103+
alert: 'KubeDeploymentRolloutStuck',
104+
},
90105
{
91106
expr: |||
92107
(

runbook.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ This page collects this repositories alerts and begins the process of describing
3737
##### Alert Name: "KubeDeploymentReplicasMismatch"
3838
+ *Message*: `Deployment {{ $labels.namespace }}/{{ $labels.deployment }} replica mismatch`
3939
+ *Severity*: warning
40+
##### Alert Name: "KubeDeploymentRolloutStuck"
41+
+ *Message*: `Rollout of deployment {{ $labels.namespace }}/{{ $labels.deployment }} is not progressing`
42+
+ *Severity*: warning
4043
##### Alert Name: "KubeStatefulSetReplicasMismatch"
4144
+ *Message*: `StatefulSet {{ $labels.namespace }}/{{ $labels.statefulset }} replica mismatch`
4245
+ *Severity*: warning

0 commit comments

Comments
 (0)