Skip to content

Commit

Permalink
feat: Adding support for encryption_key_revocation_action and encrypt…
Browse files Browse the repository at this point in the history
…ion_key_shutdown_duration for RevisionTemplate and ExecutionTemplate (#3874)

* feat: Adding support for encryption_key_revocation_action and encryption_key_shutdown_duration for RevisionTemplate and ExecutionTemplate
docs: Documentation improvements, including clarification that v1 labels/annotations are rejected in v2 API

PiperOrigin-RevId: 503293343

Source-Link: googleapis/googleapis@e3d3d63

Source-Link: googleapis/googleapis-gen@f401f99
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXJ1bi8uT3dsQm90LnlhbWwiLCJoIjoiZjQwMWY5OWRkMGUyYmZlN2ZiZTZiMTkwZDMzODFiYTY0OGYyMTIyNyJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: sofisl <[email protected]>
  • Loading branch information
3 people authored Jan 24, 2023
1 parent d3ec9cf commit 4693692
Show file tree
Hide file tree
Showing 20 changed files with 645 additions and 256 deletions.
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

0 comments on commit 4693692

Please sign in to comment.