Skip to content

Commit b059f3d

Browse files
Google APIscopybara-github
authored andcommitted
feat: Add RolloutOptions to DeployedModel in v1beta1 endpoint.proto, add additional Probe options in v1beta1 model.proto
PiperOrigin-RevId: 724392348
1 parent febe1dc commit b059f3d

2 files changed

Lines changed: 125 additions & 0 deletions

File tree

‎google/cloud/aiplatform/v1beta1/endpoint.proto‎

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,9 @@ message DeployedModel {
312312
// Configuration for faster model deployment.
313313
FasterDeploymentConfig faster_deployment_config = 23;
314314

315+
// Options for configuring rolling deployments.
316+
RolloutOptions rollout_options = 25;
317+
315318
// Output only. Runtime status of the deployed model.
316319
Status status = 26 [(google.api.field_behavior) = OUTPUT_ONLY];
317320

@@ -369,3 +372,36 @@ message FasterDeploymentConfig {
369372
// If true, enable fast tryout feature for this deployed model.
370373
bool fast_tryout_enabled = 2;
371374
}
375+
376+
// Configuration for rolling deployments.
377+
message RolloutOptions {
378+
// Configures how many replicas are allowed to be unavailable during a rolling
379+
// deployment.
380+
oneof max_unavailable {
381+
// Absolute count of replicas allowed to be unavailable.
382+
int32 max_unavailable_replicas = 3;
383+
384+
// Percentage of replicas allowed to be unavailable.
385+
// For autoscaling deployments, this refers to the target replica count.
386+
int32 max_unavailable_percentage = 4;
387+
}
388+
389+
// Configures how many additional replicas can be provisioned during a rolling
390+
// deployment.
391+
oneof max_surge {
392+
// Absolute count of allowed additional replicas.
393+
int32 max_surge_replicas = 5;
394+
395+
// Percentage of allowed additional replicas.
396+
// For autoscaling deployments, this refers to the target replica count.
397+
int32 max_surge_percentage = 6;
398+
}
399+
400+
// ID of the DeployedModel that this deployment should replace.
401+
string previous_deployed_model = 1;
402+
403+
// Output only. Read-only. Revision number determines the relative priority of
404+
// DeployedModels in the same rollout. The DeployedModel with the largest
405+
// revision number specifies the intended state of the deployment.
406+
int32 revision_number = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
407+
}

‎google/cloud/aiplatform/v1beta1/model.proto‎

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)