From 1e5cf60ce5d6161583eef2ea7372d42f6538d154 Mon Sep 17 00:00:00 2001 From: Moshe Immermam Date: Tue, 26 Nov 2024 08:37:13 +0200 Subject: [PATCH] chore: fix lint issues --- pkg/health/health_pod.go | 3 --- pkg/health/status.go | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/pkg/health/health_pod.go b/pkg/health/health_pod.go index 77d3c6d..3d4bf00 100644 --- a/pkg/health/health_pod.go +++ b/pkg/health/health_pod.go @@ -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) - } } } @@ -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) diff --git a/pkg/health/status.go b/pkg/health/status.go index 7719044..c9e02c2 100644 --- a/pkg/health/status.go +++ b/pkg/health/status.go @@ -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"` }