@@ -761,6 +761,9 @@ message ModelContainerSpec {
761761
762762 // Immutable. Specification for Kubernetes readiness probe.
763763 Probe health_probe = 13 [(google.api.field_behavior ) = IMMUTABLE ];
764+
765+ // Immutable. Specification for Kubernetes liveness probe.
766+ Probe liveness_probe = 14 [(google.api.field_behavior ) = IMMUTABLE ];
764767}
765768
766769// Represents a network port in a container.
@@ -826,9 +829,77 @@ message Probe {
826829 repeated string command = 1 ;
827830 }
828831
832+ // HttpGetAction describes an action based on HTTP Get requests.
833+ message HttpGetAction {
834+ // Path to access on the HTTP server.
835+ string path = 1 ;
836+
837+ // Number of the port to access on the container.
838+ // Number must be in the range 1 to 65535.
839+ int32 port = 2 ;
840+
841+ // Host name to connect to, defaults to the model serving container's IP.
842+ // You probably want to set "Host" in httpHeaders instead.
843+ string host = 3 ;
844+
845+ // Scheme to use for connecting to the host.
846+ // Defaults to HTTP. Acceptable values are "HTTP" or "HTTPS".
847+ string scheme = 4 ;
848+
849+ // Custom headers to set in the request. HTTP allows repeated headers.
850+ repeated HttpHeader http_headers = 5 ;
851+ }
852+
853+ // GrpcAction checks the health of a container using a gRPC service.
854+ message GrpcAction {
855+ // Port number of the gRPC service. Number must be in the range 1 to 65535.
856+ int32 port = 1 ;
857+
858+ // Service is the name of the service to place in the gRPC
859+ // HealthCheckRequest (see
860+ // https://github.com/grpc/grpc/blob/master/doc/health-checking.md).
861+ //
862+ // If this is not specified, the default behavior is defined by gRPC.
863+ string service = 2 ;
864+ }
865+
866+ // TcpSocketAction probes the health of a container by opening a TCP socket
867+ // connection.
868+ message TcpSocketAction {
869+ // Number of the port to access on the container.
870+ // Number must be in the range 1 to 65535.
871+ int32 port = 1 ;
872+
873+ // Optional: Host name to connect to, defaults to the model serving
874+ // container's IP.
875+ string host = 2 ;
876+ }
877+
878+ // HttpHeader describes a custom header to be used in HTTP probes
879+ message HttpHeader {
880+ // The header field name.
881+ // This will be canonicalized upon output, so case-variant names will be
882+ // understood as the same header.
883+ string name = 1 ;
884+
885+ // The header field value
886+ string value = 2 ;
887+ }
888+
829889 oneof probe_type {
830890 // ExecAction probes the health of a container by executing a command.
831891 ExecAction exec = 1 ;
892+
893+ // HttpGetAction probes the health of a container by sending an HTTP GET
894+ // request.
895+ HttpGetAction http_get = 4 ;
896+
897+ // GrpcAction probes the health of a container by sending a gRPC request.
898+ GrpcAction grpc = 5 ;
899+
900+ // TcpSocketAction probes the health of a container by opening a TCP socket
901+ // connection.
902+ TcpSocketAction tcp_socket = 6 ;
832903 }
833904
834905 // How often (in seconds) to perform the probe. Default to 10 seconds.
@@ -842,4 +913,22 @@ message Probe {
842913 //
843914 // Maps to Kubernetes probe argument 'timeoutSeconds'.
844915 int32 timeout_seconds = 3 ;
916+
917+ // Number of consecutive failures before the probe is considered failed.
918+ // Defaults to 3. Minimum value is 1.
919+ //
920+ // Maps to Kubernetes probe argument 'failureThreshold'.
921+ int32 failure_threshold = 7 ;
922+
923+ // Number of consecutive successes before the probe is considered successful.
924+ // Defaults to 1. Minimum value is 1.
925+ //
926+ // Maps to Kubernetes probe argument 'successThreshold'.
927+ int32 success_threshold = 8 ;
928+
929+ // Number of seconds to wait before starting the probe. Defaults to 0.
930+ // Minimum value is 0.
931+ //
932+ // Maps to Kubernetes probe argument 'initialDelaySeconds'.
933+ int32 initial_delay_seconds = 9 ;
845934}
0 commit comments