diff --git a/mmv1/products/cloudrunv2/Job.yaml b/mmv1/products/cloudrunv2/Job.yaml index fc471e383e48..01f9e8499d64 100644 --- a/mmv1/products/cloudrunv2/Job.yaml +++ b/mmv1/products/cloudrunv2/Job.yaml @@ -132,12 +132,20 @@ properties: - !ruby/object:Api::Type::KeyValuePairs name: 'labels' description: |- - KRM-style labels for the resource. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, 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. - # blocked on b/244872932 - # - !ruby/object:Api::Type::KeyValuePairs - # name: "annotations" - # description: |- - # KRM-style annotations for the resource. Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects. Cloud Run will populate some annotations using 'run.googleapis.com' or 'serving.knative.dev' namespaces. This field follows Kubernetes annotations' namespacing, limits, and rules. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations + Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, + 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 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 Job. + - !ruby/object:Api::Type::KeyValuePairs + name: "annotations" + description: |- + Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects. + + 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 on new resources. + All system annotations in v1 now have a corresponding field in v2 Job. + + This field follows Kubernetes annotations' namespacing, limits, and rules. - !ruby/object:Api::Type::String name: 'client' description: | @@ -184,12 +192,21 @@ properties: - !ruby/object:Api::Type::KeyValuePairs name: 'labels' description: |- - KRM-style labels for the resource. - # blocked on b/244872932 - # - !ruby/object:Api::Type::KeyValuePairs - # name: "annotations" - # description: |- - # KRM-style annotations for the resource. + Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, + or break down billing charges by team, component, 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 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. + - !ruby/object:Api::Type::KeyValuePairs + name: "annotations" + description: |- + Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects. + + 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. + + This field follows Kubernetes annotations' namespacing, limits, and rules. - !ruby/object:Api::Type::Integer name: 'parallelism' description: |- diff --git a/mmv1/products/cloudrunv2/Service.yaml b/mmv1/products/cloudrunv2/Service.yaml index 9edfd6513739..0f7e415de10b 100644 --- a/mmv1/products/cloudrunv2/Service.yaml +++ b/mmv1/products/cloudrunv2/Service.yaml @@ -147,11 +147,20 @@ properties: - !ruby/object:Api::Type::KeyValuePairs name: 'labels' description: |- - Map of string keys and values that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, 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. + Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, + 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 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 Service. - !ruby/object:Api::Type::KeyValuePairs name: 'annotations' description: |- - Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects. Cloud Run will populate some annotations using 'run.googleapis.com' or 'serving.knative.dev' namespaces. This field follows Kubernetes annotations' namespacing, limits, and rules. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations + Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects. + + 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 in new resources. + All system annotations in v1 now have a corresponding field in v2 Service. + + This field follows Kubernetes annotations' namespacing, limits, and rules. - !ruby/object:Api::Type::String name: 'client' description: | @@ -211,11 +220,20 @@ properties: - !ruby/object:Api::Type::KeyValuePairs name: 'labels' description: |- - KRM-style labels for the resource. + Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, 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 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 RevisionTemplate. - !ruby/object:Api::Type::KeyValuePairs name: 'annotations' description: |- - KRM-style annotations for the resource. + Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects. + + 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 RevisionTemplate. + + This field follows Kubernetes annotations' namespacing, limits, and rules. - !ruby/object:Api::Type::NestedObject name: 'scaling' description: | diff --git a/mmv1/third_party/terraform/tests/resource_cloud_run_v2_job_test.go b/mmv1/third_party/terraform/tests/resource_cloud_run_v2_job_test.go index 75e03892a4ae..526ea3048ebb 100644 --- a/mmv1/third_party/terraform/tests/resource_cloud_run_v2_job_test.go +++ b/mmv1/third_party/terraform/tests/resource_cloud_run_v2_job_test.go @@ -49,6 +49,9 @@ func testAccCloudRunV2Job_cloudrunv2JobFull(context map[string]interface{}) stri labels = { label-1 = "value-1" } + annotations = { + job-annotation-1 = "job-value-1" + } client = "client-1" client_version = "client-version-1" @@ -56,6 +59,9 @@ func testAccCloudRunV2Job_cloudrunv2JobFull(context map[string]interface{}) stri labels = { label-1 = "value-1" } + annotations = { + temp-annotation-1 = "temp-value-1" + } parallelism = 4 task_count = 4 template { @@ -115,6 +121,9 @@ resource "google_cloud_run_v2_job" "default" { labels = { label-1 = "value-update" } + annotations = { + job-annotation-1 = "job-value-update" + } client = "client-update" client_version = "client-version-update" @@ -122,6 +131,9 @@ resource "google_cloud_run_v2_job" "default" { labels = { label-1 = "value-update" } + annotations = { + temp-annotation-1 = "temp-value-update" + } parallelism = 2 task_count = 8 template {