-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Liveness probe with subservices #481
Conversation
-NSP, IPAM, Proxy and LB register Liveness probe service at custom health server. -FE no longer checks Target Registry Client as part of Readiness. -IPAM, NSP Readiness no longer includes their server status.
Liveness probes in IPAM, NSP, Proxy and LB containers rely on service name "Liveness" to check status.
docs/components/tapa.md
Outdated
@@ -56,6 +56,9 @@ MERIDIO_TIMEOUT | time.Duration | timeout of NSM request/close, NSP register/unr | |||
MERIDIO_DIAL_TIMEOUT | time.Duration | timeout to dial NSMgr | 5s | |||
MERIDIO_MAX_TOKEN_LIFETIME | time.Duration | maximum lifetime of tokens | 24h | |||
MERIDIO_LOG_LEVEL | string | Log level | DEBUG | |||
MERIDIO_NSP_ETRY_TIMEOUT | time.Duration | Timeout of the entries registered in NSP | 30senvconfig:"nsp_entry_timeout"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MERIDIO_NSP_ETRY_TIMEOUT | time.Duration | Timeout of the entries registered in NSP | 30senvconfig:"nsp_entry_timeout"` | |
MERIDIO_NSP_ETRY_TIMEOUT | time.Duration | Timeout of the entries registered in NSP | 30s"` |
docs/components/tapa.md
Outdated
Service | Description | ||
--- | --- | ||
Liveness | A unique service to be used by liveness probe to return status, can aggregate other lesser services | ||
Startup | A unique service to be used by startup probe to return status, can aggregate other lesser services | ||
Readiness | A unique service to be used by readiness probe to return status, can aggregate other lesser services | ||
AmbassadorSvc | Monitor status of the Ambassador server |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Service | Description | |
--- | --- | |
Liveness | A unique service to be used by liveness probe to return status, can aggregate other lesser services | |
Startup | A unique service to be used by startup probe to return status, can aggregate other lesser services | |
Readiness | A unique service to be used by readiness probe to return status, can aggregate other lesser services | |
AmbassadorSvc | Monitor status of the Ambassador server | |
Service | Probe | Description | |
--- | --- | --- | |
AmbassadorSvc | Liveness | Monitor status of the Ambassador server |
pkg/health/const.go
Outdated
var ProxyLivenessServices []string = []string{NSMEndpointSvc} | ||
var IPAMReadinessServices []string = []string{NSPCliSvc} | ||
var IPAMLivenessServices []string = []string{IPAMSvc} | ||
var NSPReadinessServices []string = []string{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why keeping the empty sub-services? (NSPReadinessServices, TAPAStartupServices and TAPAReadinessServices)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, could be that these are just confusing, so I will remove them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also add the type of probes for each sub-probe/sub-service in the documentation
TAPA registers health services Liveness, Startup and Readiness, which can be used by kubernetes probes to check the respective status. The evaluation criteria for these services can be changed behind the secenes, without the need of updating the kubernetes probe configuration of the TAPA container. In accordance with the recent changes the example-target checks Ambassador server availability as part of its liveness status.
Service | Description | ||
--- | --- | ||
Liveness | A unique service to be used by liveness probe to return status, can aggregate other lesser services | ||
Startup | A unique service to be used by startup probe to return status, can aggregate other lesser services | ||
Readiness | A unique service to be used by readiness probe to return status, can aggregate other lesser services |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why this table is needed
@@ -115,6 +117,16 @@ func main() { | |||
|
|||
// create and start health server | |||
sigCtx = health.CreateChecker(sigCtx) | |||
// add health server services Startup, Readiness and Liveness representing probes | |||
if err := health.RegisterStartupSubservices(sigCtx); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why keeping empty probe services?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Their purpose is to hide implementation, thus not requiring kubernetes probe config changes in the TAPA container (avoiding/limiting user impact).
Description
Note: There's a DR that does not recommend putting evaluation criteria inside startup probe which are related to service operation readiness which later can fail readiness. Thus startup probes do not check for server availability. (Although in case of IPAM and NSP this limitation would no longer stand.)
Issue link
#480
Checklist