TykTechnologies / tyk

Tyk Open Source API Gateway written in Go, supporting REST, GraphQL, TCP and gRPC protocols
Other
9.68k stars 1.08k forks source link

Tyk's health check always returns 200 #6674

Open vanny96 opened 4 hours ago

vanny96 commented 4 hours ago

Version and Environment

Describe the bug As already reported in the past at https://github.com/TykTechnologies/tyk/issues/2248, the health check currently always reports 200 even if the actual state is either warn or fail. This causes issues as the pod would try to accept requests but fail as it isn't fully working.

On a on premise setup, we noticed that some of the pods spinning up failed the initial fetching from the control plane. Instead of being restarted, they started accepting requests which raised the number of 404 errors. A functioning health check would have avoided this.

Reproduction steps Steps to reproduce the behavior:

  1. Remove redis/Setup RPC with wrong configurations

Actual behavior The container is still healthy and receiving requests

Expected behavior The container should be unhealthy and restart until healthy (if ever)