Skip to content
This repository was archived by the owner on Dec 17, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
health: for OnDelete statefulsets, include updated replica count in h…
…ealth message

Since #136 we've had the policy that an OnDelete statefulset is healthy as long as the statefulset spec is updated and the right number of pods are running, even if some of the pods are old and haven't been deleted yet. That's reasonable, but it still can be helpful to be able to see directly in the health message (and eg, in the ArgoCD UI) how many replicas have been updated. This adds that to the message.

Signed-off-by: David Glasser <[email protected]>
  • Loading branch information
glasser committed May 10, 2024
commit a4a3df69028c6cb11e5691de1b213223c349c98c
2 changes: 1 addition & 1 deletion pkg/health/health_statefulset.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func getAppsv1StatefulSetHealth(sts *appsv1.StatefulSet) (*HealthStatus, error)
if sts.Spec.UpdateStrategy.Type == appsv1.OnDeleteStatefulSetStrategyType {
return &HealthStatus{
Status: HealthStatusHealthy,
Message: fmt.Sprintf("statefulset has %d ready pods", sts.Status.ReadyReplicas),
Message: fmt.Sprintf("statefulset has %d ready pods (%d updated)", sts.Status.ReadyReplicas, sts.Status.UpdatedReplicas),
}, nil
}
if sts.Status.UpdateRevision != sts.Status.CurrentRevision {
Expand Down