Skip to content

Commit

Permalink
Remove redundant check and typo correction
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishek-hashicorp committed Jan 13, 2025
1 parent 36dd1d9 commit afe3540
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions subcommand/health-sync/checks.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,15 +166,15 @@ func (c *Command) syncChecks(consulClient *api.Client,
// if dataplane container exist and healthy then proceed to checking the other containers health
if ok && overallDataplaneHealthStatus == ecs.HealthStatusHealthy {
//
for name, healthStatus := range parsedContainers {
for _, healthStatus := range parsedContainers {
// as soon as we find any unhealthy container, we can set the dataplane health to unhealthy
if healthStatus != ecs.HealthStatusHealthy && name != config.ConsulDataplaneContainerName {
if healthStatus != ecs.HealthStatusHealthy {
overallDataplaneHealthStatus = ecs.HealthStatusUnhealthy
break
}
}
} else {
// If no dataplane container or dataplane container is not healthy set overall health to healthy
// If no dataplane container or dataplane container is not healthy set overall health to unhealthy
overallDataplaneHealthStatus = ecs.HealthStatusUnhealthy
}

Expand Down

0 comments on commit afe3540

Please sign in to comment.