Skip to content

Commit

Permalink
feat(run): update the API
Browse files Browse the repository at this point in the history
#### run:v1

The following keys were changed:
- schemas.ObjectMeta.properties.annotations.description
- schemas.RevisionStatus.properties.desiredReplicas.description
- schemas.VolumeMount.properties.readOnly.description

#### run:v2

The following keys were added:
- schemas.GoogleCloudRunV2Service.properties.scaling.$ref
- schemas.GoogleCloudRunV2Service.properties.scaling.description
- schemas.GoogleCloudRunV2ServiceScaling.description
- schemas.GoogleCloudRunV2ServiceScaling.id
- schemas.GoogleCloudRunV2ServiceScaling.properties.minInstanceCount.description
- schemas.GoogleCloudRunV2ServiceScaling.properties.minInstanceCount.format
- schemas.GoogleCloudRunV2ServiceScaling.properties.minInstanceCount.type
- schemas.GoogleCloudRunV2ServiceScaling.type
  • Loading branch information
yoshi-automation authored and sofisl committed Nov 27, 2023
1 parent 943be6c commit 5c8c879
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 8 deletions.
8 changes: 4 additions & 4 deletions discovery/run-v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -2289,7 +2289,7 @@
}
}
},
"revision": "20231008",
"revision": "20231112",
"rootUrl": "https://run.googleapis.com/",
"schemas": {
"Addressable": {
Expand Down Expand Up @@ -3590,7 +3590,7 @@
"additionalProperties": {
"type": "string"
},
"description": "Unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. In Cloud Run, annotations with 'run.googleapis.com/' and 'autoscaling.knative.dev' are restricted, and the accepted annotations will be different depending on the resource type. * `autoscaling.knative.dev/maxScale`: Revision. * `autoscaling.knative.dev/minScale`: Revision. * `run.googleapis.com/binary-authorization-breakglass`: Service, Job, * `run.googleapis.com/binary-authorization`: Service, Job, Execution. * `run.googleapis.com/client-name`: All resources. * `run.googleapis.com/cloudsql-instances`: Revision, Execution. * `run.googleapis.com/container-dependencies`: Revision. * `run.googleapis.com/cpu-throttling`: Revision. * `run.googleapis.com/custom-audiences`: Service. * `run.googleapis.com/description`: Service. * `run.googleapis.com/disable-default-url`: Service. * `run.googleapis.com/encryption-key-shutdown-hours`: Revision * `run.googleapis.com/encryption-key`: Revision, Execution. * `run.googleapis.com/execution-environment`: Revision, Execution. * `run.googleapis.com/gc-traffic-tags`: Service. * `run.googleapis.com/ingress`: Service. * `run.googleapis.com/launch-stage`: Service, Job. * `run.googleapis.com/network-interfaces`: Revision, Execution. * `run.googleapis.com/post-key-revocation-action-type`: Revision. * `run.googleapis.com/secrets`: Revision, Execution. * `run.googleapis.com/secure-session-agent`: Revision. * `run.googleapis.com/sessionAffinity`: Revision. * `run.googleapis.com/startup-cpu-boost`: Revision. * `run.googleapis.com/vpc-access-connector`: Revision, Execution. * `run.googleapis.com/vpc-access-egress`: Revision, Execution.",
"description": "Unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. In Cloud Run, annotations with 'run.googleapis.com/' and 'autoscaling.knative.dev' are restricted, and the accepted annotations will be different depending on the resource type. * `autoscaling.knative.dev/maxScale`: Revision. * `autoscaling.knative.dev/minScale`: Revision. * `run.googleapis.com/binary-authorization-breakglass`: Service, Job, * `run.googleapis.com/binary-authorization`: Service, Job, Execution. * `run.googleapis.com/client-name`: All resources. * `run.googleapis.com/cloudsql-instances`: Revision, Execution. * `run.googleapis.com/container-dependencies`: Revision. * `run.googleapis.com/cpu-throttling`: Revision. * `run.googleapis.com/custom-audiences`: Service. * `run.googleapis.com/description`: Service. * `run.googleapis.com/disable-default-url`: Service. * `run.googleapis.com/encryption-key-shutdown-hours`: Revision * `run.googleapis.com/encryption-key`: Revision, Execution. * `run.googleapis.com/execution-environment`: Revision, Execution. * `run.googleapis.com/gc-traffic-tags`: Service. * `run.googleapis.com/ingress`: Service. * `run.googleapis.com/launch-stage`: Service, Job. * `run.googleapis.com/minScale`: Service (ALPHA) * `run.googleapis.com/network-interfaces`: Revision, Execution. * `run.googleapis.com/post-key-revocation-action-type`: Revision. * `run.googleapis.com/secrets`: Revision, Execution. * `run.googleapis.com/secure-session-agent`: Revision. * `run.googleapis.com/sessionAffinity`: Revision. * `run.googleapis.com/startup-cpu-boost`: Revision. * `run.googleapis.com/vpc-access-connector`: Revision, Execution. * `run.googleapis.com/vpc-access-egress`: Revision, Execution.",
"type": "object"
},
"clusterName": {
Expand Down Expand Up @@ -3935,7 +3935,7 @@
"type": "array"
},
"desiredReplicas": {
"description": "Output only. The desired number of instances running this revision. For Cloud Run, this only includes instances provisioned using the minScale annotation. It does not include instances created by autoscaling.",
"description": "Output only. The configured number of instances running this revision. For Cloud Run, this only includes instances provisioned using the minScale annotation. It does not include instances created by autoscaling.",
"format": "int32",
"readOnly": true,
"type": "integer"
Expand Down Expand Up @@ -4584,7 +4584,7 @@
"type": "string"
},
"readOnly": {
"description": "Only true is accepted for Secret Volumes. Defaults to true for Secrets Volumes.",
"description": "Sets the mount to be read-only or read-write. Not used by Cloud Run.",
"type": "boolean"
},
"subPath": {
Expand Down
18 changes: 17 additions & 1 deletion discovery/run-v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -1115,7 +1115,7 @@
}
}
},
"revision": "20231008",
"revision": "20231112",
"rootUrl": "https://run.googleapis.com/",
"schemas": {
"GoogleCloudRunV2BinaryAuthorization": {
Expand Down Expand Up @@ -2661,6 +2661,10 @@
"readOnly": true,
"type": "boolean"
},
"scaling": {
"$ref": "GoogleCloudRunV2ServiceScaling",
"description": "Optional. Specifies service-level scaling settings"
},
"template": {
"$ref": "GoogleCloudRunV2RevisionTemplate",
"description": "Required. The template used to create revisions for this Service."
Expand Down Expand Up @@ -2704,6 +2708,18 @@
},
"type": "object"
},
"GoogleCloudRunV2ServiceScaling": {
"description": "Scaling settings applied at the service level rather than at the revision level.",
"id": "GoogleCloudRunV2ServiceScaling",
"properties": {
"minInstanceCount": {
"description": "total min instances for the service. This number of instances is divided among all revisions with specified traffic based on the percent of traffic they are receiving. (ALPHA)",
"format": "int32",
"type": "integer"
}
},
"type": "object"
},
"GoogleCloudRunV2TCPSocketAction": {
"description": "TCPSocketAction describes an action based on opening a socket",
"id": "GoogleCloudRunV2TCPSocketAction",
Expand Down
6 changes: 3 additions & 3 deletions src/apis/run/v1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1142,7 +1142,7 @@ export namespace run_v1 {
*/
export interface Schema$ObjectMeta {
/**
* Unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. In Cloud Run, annotations with 'run.googleapis.com/' and 'autoscaling.knative.dev' are restricted, and the accepted annotations will be different depending on the resource type. * `autoscaling.knative.dev/maxScale`: Revision. * `autoscaling.knative.dev/minScale`: Revision. * `run.googleapis.com/binary-authorization-breakglass`: Service, Job, * `run.googleapis.com/binary-authorization`: Service, Job, Execution. * `run.googleapis.com/client-name`: All resources. * `run.googleapis.com/cloudsql-instances`: Revision, Execution. * `run.googleapis.com/container-dependencies`: Revision. * `run.googleapis.com/cpu-throttling`: Revision. * `run.googleapis.com/custom-audiences`: Service. * `run.googleapis.com/description`: Service. * `run.googleapis.com/disable-default-url`: Service. * `run.googleapis.com/encryption-key-shutdown-hours`: Revision * `run.googleapis.com/encryption-key`: Revision, Execution. * `run.googleapis.com/execution-environment`: Revision, Execution. * `run.googleapis.com/gc-traffic-tags`: Service. * `run.googleapis.com/ingress`: Service. * `run.googleapis.com/launch-stage`: Service, Job. * `run.googleapis.com/network-interfaces`: Revision, Execution. * `run.googleapis.com/post-key-revocation-action-type`: Revision. * `run.googleapis.com/secrets`: Revision, Execution. * `run.googleapis.com/secure-session-agent`: Revision. * `run.googleapis.com/sessionAffinity`: Revision. * `run.googleapis.com/startup-cpu-boost`: Revision. * `run.googleapis.com/vpc-access-connector`: Revision, Execution. * `run.googleapis.com/vpc-access-egress`: Revision, Execution.
* Unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. In Cloud Run, annotations with 'run.googleapis.com/' and 'autoscaling.knative.dev' are restricted, and the accepted annotations will be different depending on the resource type. * `autoscaling.knative.dev/maxScale`: Revision. * `autoscaling.knative.dev/minScale`: Revision. * `run.googleapis.com/binary-authorization-breakglass`: Service, Job, * `run.googleapis.com/binary-authorization`: Service, Job, Execution. * `run.googleapis.com/client-name`: All resources. * `run.googleapis.com/cloudsql-instances`: Revision, Execution. * `run.googleapis.com/container-dependencies`: Revision. * `run.googleapis.com/cpu-throttling`: Revision. * `run.googleapis.com/custom-audiences`: Service. * `run.googleapis.com/description`: Service. * `run.googleapis.com/disable-default-url`: Service. * `run.googleapis.com/encryption-key-shutdown-hours`: Revision * `run.googleapis.com/encryption-key`: Revision, Execution. * `run.googleapis.com/execution-environment`: Revision, Execution. * `run.googleapis.com/gc-traffic-tags`: Service. * `run.googleapis.com/ingress`: Service. * `run.googleapis.com/launch-stage`: Service, Job. * `run.googleapis.com/minScale`: Service (ALPHA) * `run.googleapis.com/network-interfaces`: Revision, Execution. * `run.googleapis.com/post-key-revocation-action-type`: Revision. * `run.googleapis.com/secrets`: Revision, Execution. * `run.googleapis.com/secure-session-agent`: Revision. * `run.googleapis.com/sessionAffinity`: Revision. * `run.googleapis.com/startup-cpu-boost`: Revision. * `run.googleapis.com/vpc-access-connector`: Revision, Execution. * `run.googleapis.com/vpc-access-egress`: Revision, Execution.
*/
annotations?: {[key: string]: string} | null;
/**
Expand Down Expand Up @@ -1404,7 +1404,7 @@ export namespace run_v1 {
*/
conditions?: Schema$GoogleCloudRunV1Condition[];
/**
* Output only. The desired number of instances running this revision. For Cloud Run, this only includes instances provisioned using the minScale annotation. It does not include instances created by autoscaling.
* Output only. The configured number of instances running this revision. For Cloud Run, this only includes instances provisioned using the minScale annotation. It does not include instances created by autoscaling.
*/
desiredReplicas?: number | null;
/**
Expand Down Expand Up @@ -1935,7 +1935,7 @@ export namespace run_v1 {
*/
name?: string | null;
/**
* Only true is accepted for Secret Volumes. Defaults to true for Secrets Volumes.
* Sets the mount to be read-only or read-write. Not used by Cloud Run.
*/
readOnly?: boolean | null;
/**
Expand Down
13 changes: 13 additions & 0 deletions src/apis/run/v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1117,6 +1117,10 @@ export namespace run_v2 {
* Output only. Reserved for future use.
*/
satisfiesPzs?: boolean | null;
/**
* Optional. Specifies service-level scaling settings
*/
scaling?: Schema$GoogleCloudRunV2ServiceScaling;
/**
* Required. The template used to create revisions for this Service.
*/
Expand Down Expand Up @@ -1146,6 +1150,15 @@ export namespace run_v2 {
*/
uri?: string | null;
}
/**
* Scaling settings applied at the service level rather than at the revision level.
*/
export interface Schema$GoogleCloudRunV2ServiceScaling {
/**
* total min instances for the service. This number of instances is divided among all revisions with specified traffic based on the percent of traffic they are receiving. (ALPHA)
*/
minInstanceCount?: number | null;
}
/**
* Task represents a single run of a container to completion.
*/
Expand Down

0 comments on commit 5c8c879

Please sign in to comment.