Skip to content

Commit

Permalink
Add grace period check for DaemonSet availability
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoxhaa committed Jun 3, 2024
1 parent 2cca48c commit 2f9d808
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/schema/v1/daemon_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ func (d *DaemonSet) getIcingaState() (IcingaState, string) {
return Unknown, reason
}

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

switch {
case d.NumberAvailable == 0:
reason := fmt.Sprintf("DaemonSet %s/%s does not have a single pod available which should run on %d desired nodes", d.Namespace, d.Name, d.DesiredNumberScheduled)
Expand Down

0 comments on commit 2f9d808

Please sign in to comment.