mirror of
https://github.com/element-hq/ess-helm.git
synced 2026-11-21 17:41:44 -08:00
syn2mas: fail if pods are still up after statefulset are all down
This commit is contained in:
1 file changed
+13
@@ -59,6 +59,19 @@ func scaleDownSynapse(client kubernetes.Interface, namespace string) map[string]
|
||||
break
|
||||
}
|
||||
}
|
||||
podsClient := client.CoreV1().Pods(namespace)
|
||||
pods, err := podsClient.List(ctx, metav1.ListOptions{
|
||||
LabelSelector: "app.kubernetes.io/component=matrix-server",
|
||||
})
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
os.Exit(1)
|
||||
}
|
||||
if len(pods.Items) != 0 {
|
||||
fmt.Println("StatefulSet are down, but pods matching matrix-server component are remaining. Something wrong is happening.")
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
return stsReplicas
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user