diff --git a/backend/api/admin/src/main/java/co/airy/core/api/config/HealthApi.java b/backend/api/admin/src/main/java/co/airy/core/api/config/HealthApi.java index ecf6506cce..63de5e65e3 100644 --- a/backend/api/admin/src/main/java/co/airy/core/api/config/HealthApi.java +++ b/backend/api/admin/src/main/java/co/airy/core/api/config/HealthApi.java @@ -29,7 +29,6 @@ public HealthApi(@Value("${kubernetes.namespace}") String namespace, RestTemplat public Future isHealthy(String service) { try { final ResponseEntity response = restTemplate.getForEntity(String.format("http://%s.%s/actuator/health", service, namespace), String.class); - log.info("response body {}", response.getBody()); final JsonNode jsonNode = objectMapper.readTree(response.getBody()); return new AsyncResult<>("UP".equalsIgnoreCase(jsonNode.get("status").textValue())); } catch (Exception e) { diff --git a/backend/api/admin/src/main/java/co/airy/core/api/config/ServiceDiscovery.java b/backend/api/admin/src/main/java/co/airy/core/api/config/ServiceDiscovery.java index dbe753e5b2..5505e58a9f 100644 --- a/backend/api/admin/src/main/java/co/airy/core/api/config/ServiceDiscovery.java +++ b/backend/api/admin/src/main/java/co/airy/core/api/config/ServiceDiscovery.java @@ -46,7 +46,7 @@ public ComponentInfo getComponent(String componentName) { componentInfo = Optional.ofNullable(componentInfo).orElse(new ComponentInfo(false, true)); componentInfo.setEnabled(serviceInfo.isEnabled()); // One unhealthy service means that the component is unhealthy - componentInfo.setEnabled(componentInfo.isHealthy() && serviceInfo.isHealthy()); + componentInfo.setHealthy(componentInfo.isHealthy() && serviceInfo.isHealthy()); return componentInfo; }, (v1, v2) -> { v1.setHealthy(v1.isHealthy() && v2.isHealthy()); diff --git a/backend/webhook/consumer/pkg/worker/server.go b/backend/webhook/consumer/pkg/worker/server.go index 00197292b3..002c106991 100644 --- a/backend/webhook/consumer/pkg/worker/server.go +++ b/backend/webhook/consumer/pkg/worker/server.go @@ -28,6 +28,10 @@ func (worker *Worker) StartServer(ctx context.Context, wg *sync.WaitGroup) { w.WriteHeader(200) }) + http.HandleFunc("/actuator/health", func(w http.ResponseWriter, r *http.Request) { + w.Write([]byte("{\"status\":\"UP\"}")) + }) + go func() { log.Println("serving on 8080") err := http.ListenAndServe(":8080", nil)