TMM pod readiness¶
In Kubernetes, readiness gates enable the use of custom conditions to decide when a pod is ready to handle traffic. While readiness probes serve as the default method for readiness checks, readiness gates allow the inclusion of external conditions or specific logic to determine pod readiness. This provides greater flexibility and control over how a pod transitions to the Ready state.
A Pod that relies on custom conditions is considered ready only when the following criteria are met:
All containers within the Pod are in a ready state.
Every condition defined in
readinessGatesis set toTrue.
If the Pod’s containers are ready but at least one custom condition is either missing or False, the kubelet marks the Pod’s condition as ContainersReady.
To leverage the readinessGates feature, F5 has introduced two readiness gates, ConfigurationDone and RoutingDone. Starting from SPK v2.0.0, the readinessGates feature is enabled by default.
The ConfigurationDone gate is updated by the controller when the config-ready object sent to TMM is acknowledged by TMM with ERR_OK.
The RoutingDone gate is evaluated locally in TMM once it receives the initial routes from the tmrouted dynamic routing handler. TMM then sends the route-ready object to the controller via the GRPC streaming endpoint. Upon receiving this object, the controller updates the API server with the route-ready gate set to True.
When both ConfigurationDone and RoutingDone gates are set to True, the TMM pod will be readily available to receive network traffic. Run the below command to check the status of readinessGates (ConfigurationDone and RoutingDone gates).
In this example, the f5-tmm-7fb766f798-6bgbk is TMM pod.
oc describe pod f5-tmm-7fb766f798-6bgbk
Sample Output:
Readiness Gates:
Type Status
ConfigurationDone True
RoutingDone True