Open mathieu-benoit opened 1 year ago
We've received a similar feature request:
"Need to translate this
"liveness_probe": { "port": "3000", "type": "tcp" },
using score"
As a workaround and if using Humanitec, you can use the Humanitec Score extension, example below:
apiVersion: humanitec.org/v1b1
profile: humanitec/default-module
spec:
containers:
adservice:
liveness_probe:
command:
- /bin/grpc_health_probe
- '-addr=:9555'
type: command
readiness_probe:
command:
- /bin/grpc_health_probe
- '-addr=:9555'
type: command
This should be straight forward. But things will need to be cautious because not all score implementations will support all kinds of probes (as it is docker compose doesn't support httpGet).
Detailed description
It would be ideal to support the
command
,tcpSocket
andgrpc
methods forlivenessProbe
andreadinessProbe
.Context
Today, only the
httpGet
method forlivenessProbe
andreadinessProbe
is supported.command
is another very popular method, like illustrated here withgrpc
apps: https://github.com/GoogleCloudPlatform/microservices-demo/blob/main/release/kubernetes-manifests.yaml#L61.So for example, today, this below is not supported:
Possible implementation
Humanitec already supports
tcpSocket
andcommand
in addition tohttpGet
.Note:
gRPC
(only supported since Kubernetes 1.24+) is not yet supported in Humanitec. The alternative is to use thecommand
method by using thegrpc_health_probe
binary.Additional information
Configure Liveness, Readiness and Startup Probes in Kubernetes.