Skip to content

Commit

Permalink
Add grace period check for ReplicaSet availability
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoxhaa committed Jun 2, 2024
1 parent 9e6760c commit 5c4df9b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/schema/v1/replica_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,11 @@ func (r *ReplicaSet) getIcingaState() (IcingaState, string) {
return Unknown, reason
}

gracePeriodReason := IsWithinGracePeriod(r)
if gracePeriodReason != nil {
return Ok, *gracePeriodReason
}

for _, condition := range r.Conditions {
if condition.Type == "ReplicaFailure" && condition.Status == "True" {
reason := fmt.Sprintf("ReplicaSet %s/%s has a failure condition: %s", r.Namespace, r.Name, condition.Message)
Expand Down

0 comments on commit 5c4df9b

Please sign in to comment.