Skip to content

Commit

Permalink
chore: If k8sHealthCheckThroughIngress is not set, there is no need…
Browse files Browse the repository at this point in the history
… for calling the ingress (#37)
  • Loading branch information
carstendietrich authored Jun 17, 2024
1 parent a624199 commit aae7c71
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/model/kube/statusFetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -429,13 +429,13 @@ func checkDeploymentWithHealthCheck(name string, app *vistectureCore.Application
return d
}

// Try to do the healthcheck also from (public) ingress - if an ingress exist and the check from service was ok
if len(k8sIngresses[k8sHealthCheckServiceName]) > 0 {
d.AppStateInfo.HealthyAlsoFromIngress = checkPublicHealth(k8sIngresses[k8sHealthCheckServiceName], app.Properties["healthCheckPath"])
}

// In case the application need to be checked from outside - let it fail
// In case the application need to be checked from outside, do the check and let it fail if unhealthy/misconfigured
if _, ok := app.Properties["k8sHealthCheckThroughIngress"]; ok {
// Try to do the healthcheck from ingress
if len(k8sIngresses[k8sHealthCheckServiceName]) > 0 {
d.AppStateInfo.HealthyAlsoFromIngress = checkPublicHealth(k8sIngresses[k8sHealthCheckServiceName], app.Properties["healthCheckPath"])
}

if !d.AppStateInfo.HealthyAlsoFromIngress {
if len(k8sIngresses[k8sHealthCheckServiceName]) == 0 {
d.AppStateInfo.State = State_failed
Expand Down

0 comments on commit aae7c71

Please sign in to comment.