Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Adding support for encryption_key_revocation_action and encryption_key_shutdown_duration for RevisionTemplate and ExecutionTemplate #3874

Merged
merged 3 commits into from
Jan 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ message Condition {
// A revision's container has no port specified since the revision is of a
// manually scaled service with 0 instance count
HEALTH_CHECK_SKIPPED = 11;

// A revision with min_instance_count > 0 was created and is waiting for
// enough instances to begin a traffic migration.
MIN_INSTANCES_WARMING = 12;
}

// Reasons specific to Execution resource.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ option java_package = "com.google.cloud.run.v2";
// Cloud Run Execution Control Plane API.
service Executions {
option (google.api.default_host) = "run.googleapis.com";
option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
option (google.api.oauth_scopes) =
"https://www.googleapis.com/auth/cloud-platform";

// Gets information about an Execution.
rpc GetExecution(GetExecutionRequest) returns (Execution) {
Expand All @@ -53,7 +54,8 @@ service Executions {
}

// Deletes an Execution.
rpc DeleteExecution(DeleteExecutionRequest) returns (google.longrunning.Operation) {
rpc DeleteExecution(DeleteExecutionRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {
delete: "/v2/{name=projects/*/locations/*/jobs/*/executions/*}"
};
Expand All @@ -73,9 +75,7 @@ message GetExecutionRequest {
// where {project} can be project id or number.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "run.googleapis.com/Execution"
}
(google.api.resource_reference) = { type: "run.googleapis.com/Execution" }
];
}

Expand Down Expand Up @@ -121,9 +121,7 @@ message DeleteExecutionRequest {
// where {project} can be project id or number.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "run.googleapis.com/Execution"
}
(google.api.resource_reference) = { type: "run.googleapis.com/Execution" }
];

// Indicates that the request should be validated without actually
Expand All @@ -148,8 +146,9 @@ message Execution {
// Output only. The unique name of this Execution.
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Server assigned unique identifier for the Execution. The value is a UUID4
// string and guaranteed to remain unchanged until the resource is deleted.
// Output only. Server assigned unique identifier for the Execution. The value
// is a UUID4 string and guaranteed to remain unchanged until the resource is
// deleted.
string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. A number that monotonically increases every time the user
Expand All @@ -162,39 +161,42 @@ message Execution {
// environment, state, etc. For more information, visit
// https://cloud.google.com/resource-manager/docs/creating-managing-labels or
// https://cloud.google.com/run/docs/configuring/labels
// Cloud Run will populate some labels with 'run.googleapis.com' or
// 'serving.knative.dev' namespaces. Those labels are read-only, and user
// changes will not be preserved.
map<string, string> labels = 4;

// KRM-style annotations for the resource.
map<string, string> annotations = 5;

// Output only. Represents time when the execution was acknowledged by the execution
// controller. It is not guaranteed to be set in happens-before order across
// separate operations.
google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Represents time when the execution was acknowledged by the
// execution controller. It is not guaranteed to be set in happens-before
// order across separate operations.
google.protobuf.Timestamp create_time = 6
[(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Represents time when the execution started to run.
// It is not guaranteed to be set in happens-before order across separate
// operations.
google.protobuf.Timestamp start_time = 22 [(google.api.field_behavior) = OUTPUT_ONLY];
google.protobuf.Timestamp start_time = 22
[(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Represents time when the execution was completed. It is not guaranteed to
// be set in happens-before order across separate operations.
google.protobuf.Timestamp completion_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Represents time when the execution was completed. It is not
// guaranteed to be set in happens-before order across separate operations.
google.protobuf.Timestamp completion_time = 7
[(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The last-modified time.
google.protobuf.Timestamp update_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
google.protobuf.Timestamp update_time = 8
[(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. For a deleted resource, the deletion time. It is only
// populated as a response to a Delete request.
google.protobuf.Timestamp delete_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
google.protobuf.Timestamp delete_time = 9
[(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. For a deleted resource, the time after which it will be
// permamently deleted. It is only populated as a response to a Delete
// request.
google.protobuf.Timestamp expire_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
google.protobuf.Timestamp expire_time = 10
[(google.api.field_behavior) = OUTPUT_ONLY];

// Set the launch stage to a preview stage on write to allow use of preview
// features in that stage. On read, describes whether the resource uses
Expand All @@ -205,21 +207,19 @@ message Execution {
// Output only. The name of the parent Job.
string job = 12 [
(google.api.field_behavior) = OUTPUT_ONLY,
(google.api.resource_reference) = {
type: "run.googleapis.com/Job"
}
(google.api.resource_reference) = { type: "run.googleapis.com/Job" }
];

// Output only. Specifies the maximum desired number of tasks the execution should
// run at any given time. Must be <= task_count. The actual number of
// Output only. Specifies the maximum desired number of tasks the execution
// should run at any given time. Must be <= task_count. The actual number of
// tasks running in steady state will be less than this number when
// ((.spec.task_count - .status.successful) < .spec.parallelism), i.e. when
// the work left to do is less than max parallelism. More info:
// https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
int32 parallelism = 13 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Specifies the desired number of tasks the execution should run.
// Setting to 1 means that parallelism is limited to 1 and the success of
// Output only. Specifies the desired number of tasks the execution should
// run. Setting to 1 means that parallelism is limited to 1 and the success of
// that task signals the success of the execution.
// More info:
// https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
Expand All @@ -228,17 +228,20 @@ message Execution {
// Output only. The template used to create tasks for this execution.
TaskTemplate template = 15 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Indicates whether the resource's reconciliation is still in progress.
// See comments in `Job.reconciling` for additional information on
// Output only. Indicates whether the resource's reconciliation is still in
// progress. See comments in `Job.reconciling` for additional information on
// reconciliation process in Cloud Run.
bool reconciling = 16 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The Condition of this Execution, containing its readiness status, and
// detailed error information in case it did not reach the desired state.
repeated Condition conditions = 17 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The Condition of this Execution, containing its readiness
// status, and detailed error information in case it did not reach the desired
// state.
repeated Condition conditions = 17
[(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The generation of this Execution. See comments in `reconciling` for
// additional information on reconciliation process in Cloud Run.
// Output only. The generation of this Execution. See comments in
// `reconciling` for additional information on reconciliation process in Cloud
// Run.
int64 observed_generation = 18 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The number of actively running tasks.
Expand All @@ -250,6 +253,16 @@ message Execution {
// Output only. The number of tasks which reached phase Failed.
int32 failed_count = 21 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The number of tasks which reached phase Cancelled.
int32 cancelled_count = 24 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The number of tasks which have retried at least once.
int32 retried_count = 25 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. URI where logs for this execution can be found in Cloud
// Console.
string log_uri = 26 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. A system-generated fingerprint for this version of the
// resource. May be used to detect modification conflict during updates.
string etag = 99 [(google.api.field_behavior) = OUTPUT_ONLY];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,19 @@ option java_package = "com.google.cloud.run.v2";
// from a template.
message ExecutionTemplate {
// KRM-style labels for the resource.
//
// <p>Cloud Run API v2 does not support labels with `run.googleapis.com`,
// `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev`
// namespaces, and they will be rejected. All system labels in v1 now have a
// corresponding field in v2 ExecutionTemplate.
map<string, string> labels = 1;

// KRM-style annotations for the resource.
//
// <p>Cloud Run API v2 does not support annotations with `run.googleapis.com`,
// `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev`
// namespaces, and they will be rejected. All system annotations in v1 now
// have a corresponding field in v2 ExecutionTemplate.
map<string, string> annotations = 2;

// Specifies the maximum desired number of tasks the execution should run at
Expand All @@ -49,6 +59,7 @@ message ExecutionTemplate {
// https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
int32 task_count = 4;

// Required. Describes the task(s) that will be created when executing an execution.
// Required. Describes the task(s) that will be created when executing an
// execution.
TaskTemplate template = 5 [(google.api.field_behavior) = REQUIRED];
}
Loading