Skip to content

Commit

Permalink
chore: fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
moshloop committed Nov 26, 2024
1 parent 0a558ee commit 1e5cf60
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions pkg/health/health_pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,8 @@ func getContainerStatus(containerStatus corev1.ContainerStatus) (waiting *Health
} else if state.Reason == string(HealthStatusCompleted) {
// completed with restart
terminated.Status = "RestartLoop"

} else {
terminated.Status = HealthStatusCode(state.Reason)

}
}
}
Expand Down Expand Up @@ -180,7 +178,6 @@ func getCorev1PodHealth(pod *corev1.Pod) (*HealthStatus, error) {
case corev1.PodRunning, corev1.PodPending:
hr = hr.Merge(terminated, waiting)
if terminated != nil && terminated.Health.IsWorseThan(HealthWarning) {

if hr.Status == HealthStatusCrashLoopBackoff {
hr.Status = terminated.Status
hr.Health = hr.Health.Worst(terminated.Health)
Expand Down
2 changes: 1 addition & 1 deletion pkg/health/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ type Filter struct {
Match map[string]string `yaml:"match,omitempty" json:"match,omitempty"`
}
type StatusMap struct {
Filters []Filter `yaml:"filters" json:"filters"`
Filters []Filter `yaml:"filters" json:"filters"`
Conditions map[string]Condition `yaml:"conditions" json:"conditions"`
UnhealthyIsNotReady bool `yaml:"unhealthyIsNotReady" json:"unhealthyIsNotReady"`
}
Expand Down

0 comments on commit 1e5cf60

Please sign in to comment.