@@ -795,6 +795,9 @@ message ModelContainerSpec {
795795
796796 // Immutable. Specification for Kubernetes readiness probe.
797797 Probe health_probe = 13 [(google.api.field_behavior ) = IMMUTABLE ];
798+
799+ // Immutable. Specification for Kubernetes liveness probe.
800+ Probe liveness_probe = 14 [(google.api.field_behavior ) = IMMUTABLE ];
798801}
799802
800803// Represents a network port in a container.
@@ -860,9 +863,77 @@ message Probe {
860863 repeated string command = 1 ;
861864 }
862865
866+ // HttpGetAction describes an action based on HTTP Get requests.
867+ message HttpGetAction {
868+ // Path to access on the HTTP server.
869+ string path = 1 ;
870+
871+ // Number of the port to access on the container.
872+ // Number must be in the range 1 to 65535.
873+ int32 port = 2 ;
874+
875+ // Host name to connect to, defaults to the model serving container's IP.
876+ // You probably want to set "Host" in httpHeaders instead.
877+ string host = 3 ;
878+
879+ // Scheme to use for connecting to the host.
880+ // Defaults to HTTP. Acceptable values are "HTTP" or "HTTPS".
881+ string scheme = 4 ;
882+
883+ // Custom headers to set in the request. HTTP allows repeated headers.
884+ repeated HttpHeader http_headers = 5 ;
885+ }
886+
887+ // GrpcAction checks the health of a container using a gRPC service.
888+ message GrpcAction {
889+ // Port number of the gRPC service. Number must be in the range 1 to 65535.
890+ int32 port = 1 ;
891+
892+ // Service is the name of the service to place in the gRPC
893+ // HealthCheckRequest (see
894+ // https://github.com/grpc/grpc/blob/master/doc/health-checking.md).
895+ //
896+ // If this is not specified, the default behavior is defined by gRPC.
897+ string service = 2 ;
898+ }
899+
900+ // TcpSocketAction probes the health of a container by opening a TCP socket
901+ // connection.
902+ message TcpSocketAction {
903+ // Number of the port to access on the container.
904+ // Number must be in the range 1 to 65535.
905+ int32 port = 1 ;
906+
907+ // Optional: Host name to connect to, defaults to the model serving
908+ // container's IP.
909+ string host = 2 ;
910+ }
911+
912+ // HttpHeader describes a custom header to be used in HTTP probes
913+ message HttpHeader {
914+ // The header field name.
915+ // This will be canonicalized upon output, so case-variant names will be
916+ // understood as the same header.
917+ string name = 1 ;
918+
919+ // The header field value
920+ string value = 2 ;
921+ }
922+
863923 oneof probe_type {
864924 // ExecAction probes the health of a container by executing a command.
865925 ExecAction exec = 1 ;
926+
927+ // HttpGetAction probes the health of a container by sending an HTTP GET
928+ // request.
929+ HttpGetAction http_get = 4 ;
930+
931+ // GrpcAction probes the health of a container by sending a gRPC request.
932+ GrpcAction grpc = 5 ;
933+
934+ // TcpSocketAction probes the health of a container by opening a TCP socket
935+ // connection.
936+ TcpSocketAction tcp_socket = 6 ;
866937 }
867938
868939 // How often (in seconds) to perform the probe. Default to 10 seconds.
@@ -876,4 +947,22 @@ message Probe {
876947 //
877948 // Maps to Kubernetes probe argument 'timeoutSeconds'.
878949 int32 timeout_seconds = 3 ;
950+
951+ // Number of consecutive failures before the probe is considered failed.
952+ // Defaults to 3. Minimum value is 1.
953+ //
954+ // Maps to Kubernetes probe argument 'failureThreshold'.
955+ int32 failure_threshold = 7 ;
956+
957+ // Number of consecutive successes before the probe is considered successful.
958+ // Defaults to 1. Minimum value is 1.
959+ //
960+ // Maps to Kubernetes probe argument 'successThreshold'.
961+ int32 success_threshold = 8 ;
962+
963+ // Number of seconds to wait before starting the probe. Defaults to 0.
964+ // Minimum value is 0.
965+ //
966+ // Maps to Kubernetes probe argument 'initialDelaySeconds'.
967+ int32 initial_delay_seconds = 9 ;
879968}
0 commit comments