Skip to content
This repository was archived by the owner on Dec 17, 2025. It is now read-only.
Merged
Changes from 1 commit
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
Next Next commit
fix: health status is set to healthy for statefulset with updateStrat…
…egy: OnDelete
  • Loading branch information
mayzhang2000 committed Sep 1, 2020
commit 3e8e5052316f832fd398066ba2fbc688caf191f0
6 changes: 6 additions & 0 deletions pkg/health/health.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,12 @@ func getStatefulSetHealth(obj *unstructured.Unstructured) (*HealthStatus, error)
Message: fmt.Sprintf("partitioned roll out complete: %d new pods have been updated...", sts.Status.UpdatedReplicas),
}, nil
}
if sts.Spec.UpdateStrategy.Type == appsv1.OnDeleteStatefulSetStrategyType {
return &HealthStatus{
Status: HealthStatusHealthy,
Message: fmt.Sprintf("updateStrategy is OnDelete type."),
}, nil
}
if sts.Status.UpdateRevision != sts.Status.CurrentRevision {
return &HealthStatus{
Status: HealthStatusProgressing,
Expand Down