spec
spec copied to clipboard
[FEATURE] `command`, `tcpSocket` and `grpc` `livenessProbe` and `readinessProbe` support
Detailed description
It would be ideal to support the command
, tcpSocket
and grpc
methods for livenessProbe
and readinessProbe
.
Context
Today, only the httpGet
method for livenessProbe
and readinessProbe
is supported.
command
is another very popular method, like illustrated here with grpc
apps: https://github.com/GoogleCloudPlatform/microservices-demo/blob/main/release/kubernetes-manifests.yaml#L61.
So for example, today, this below is not supported:
apiVersion: score.dev/v1b1
metadata:
name: adservice
containers:
adservice:
image: gcr.io/google-samples/microservices-demo/adservice:v0.6.0
variables:
PORT: "9555"
livenessProbe:
exec:
command:
- /bin/grpc_health_probe
- '-addr=:9555'
readinessProbe:
exec:
command:
- /bin/grpc_health_probe
- '-addr=:9555'
Possible implementation
Humanitec already supports tcpSocket
and command
in addition to httpGet
.
Note: gRPC
(only supported since Kubernetes 1.24+) is not yet supported in Humanitec. The alternative is to use the command
method by using the grpc_health_probe
binary.
Additional information
Configure Liveness, Readiness and Startup Probes in Kubernetes.