Skip to content

Commit 54d2650

Browse files
authored
Merge branch 'GoogleCloudPlatform:main' into logscope
2 parents 5c43ea9 + 7f1b8e6 commit 54d2650

File tree

67 files changed

+5311
-48
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+5311
-48
lines changed

mmv1/go.mod

+4
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,7 @@ require (
88
)
99

1010
require github.com/golang/glog v1.2.0
11+
12+
require github.com/otiai10/copy v1.9.0
13+
14+
require golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 // indirect

mmv1/go.sum

+8
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,16 @@ github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68=
22
github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w=
33
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
44
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
5+
github.com/otiai10/copy v1.9.0 h1:7KFNiCgZ91Ru4qW4CWPf/7jqtxLagGRmIxWldPP9VY4=
6+
github.com/otiai10/copy v1.9.0/go.mod h1:hsfX19wcn0UWIHUQ3/4fHuehhk2UyArQ9dVFAn3FczI=
7+
github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE=
8+
github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs=
9+
github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo=
10+
github.com/otiai10/mint v1.4.0/go.mod h1:gifjb2MYOoULtKLqUAEILUG/9KONW6f7YsJ6vQLTlFI=
511
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 h1:LfspQV/FYTatPTr/3HzIcmiUFH7PGP+OQ6mgDYo3yuQ=
612
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc=
13+
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 h1:0A+M6Uqn+Eje4kHMK80dtF3JCXC4ykBgQG4Fe06QRhQ=
14+
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
715
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
816
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
917
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=

mmv1/main.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@ func main() {
149149
providerToGenerate = setProvider(*forceProvider, *version, productsForVersion[0], startTime)
150150
providerToGenerate.CopyCommonFiles(*outputPath, generateCode, generateDocs)
151151

152-
log.Printf("Compiling common files for terraform")
153152
if generateCode {
154153
providerToGenerate.CompileCommonFiles(*outputPath, productsForVersion, "")
155154

@@ -236,6 +235,8 @@ func setProvider(forceProvider, version string, productApi *api.Product, startTi
236235
switch forceProvider {
237236
case "tgc":
238237
return provider.NewTerraformGoogleConversion(productApi, version, startTime)
238+
case "tgc_cai2hcl":
239+
return provider.NewCaiToTerraformConversion(productApi, version, startTime)
239240
default:
240241
return provider.NewTerraform(productApi, version, startTime)
241242
}

mmv1/products/cloudrun/go_Service.yaml

+15-1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,14 @@ examples:
6969
cloud_run_service_name: 'cloudrun-srv'
7070
test_env_vars:
7171
project: 'PROJECT_NAME'
72+
- name: 'cloud_run_service_gpu'
73+
primary_resource_id: 'default'
74+
primary_resource_name: 'fmt.Sprintf("tf-test-cloudrun-srv%s", context["random_suffix"])'
75+
min_version: 'beta'
76+
vars:
77+
cloud_run_service_name: 'cloudrun-srv'
78+
test_env_vars:
79+
project: 'PROJECT_NAME'
7280
- name: 'cloud_run_service_sql'
7381
primary_resource_id: 'default'
7482
primary_resource_name: 'fmt.Sprintf("tf-test-cloudrun-srv%s", context["random_suffix"])'
@@ -737,7 +745,13 @@ properties:
737745
The name of the service to place in the gRPC HealthCheckRequest
738746
(see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).
739747
If this is not specified, the default behavior is defined by gRPC.
740-
748+
- name: 'nodeSelector'
749+
type: KeyValuePairs
750+
description: |-
751+
Node Selector describes the hardware requirements of the resources.
752+
Use the following node selector keys to configure features on a Revision:
753+
- `run.googleapis.com/accelerator` sets the [type of GPU](https://cloud.google.com/run/docs/configuring/services/gpu) required by the Revision to run.
754+
min_version: 'beta'
741755
- name: 'containerConcurrency'
742756
type: Integer
743757
description: |-

mmv1/products/cloudrunv2/go_Service.yaml

+19-1
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,14 @@ examples:
100100
cloud_run_service_name: 'cloudrun-service'
101101
ignore_read_extra:
102102
- 'deletion_protection'
103+
- name: 'cloudrunv2_service_gpu'
104+
primary_resource_id: 'default'
105+
primary_resource_name: 'fmt.Sprintf("tf-test-cloudrun-srv%s", context["random_suffix"])'
106+
min_version: 'beta'
107+
vars:
108+
cloud_run_service_name: 'cloudrun-service'
109+
ignore_read_extra:
110+
- 'deletion_protection'
103111
- name: 'cloudrunv2_service_probes'
104112
primary_resource_id: 'default'
105113
primary_resource_name: 'fmt.Sprintf("tf-test-cloudrun-srv%s", context["random_suffix"])'
@@ -495,7 +503,7 @@ properties:
495503
- name: 'limits'
496504
type: KeyValuePairs
497505
description: |-
498-
Only memory and CPU are supported. Use key `cpu` for CPU limit and `memory` for memory limit. Note: The only supported values for CPU are '1', '2', '4', and '8'. Setting 4 CPU requires at least 2Gi of memory. The values of the map is string form of the 'quantity' k8s type: https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go
506+
Only memory, CPU, and nvidia.com/gpu are supported. Use key `cpu` for CPU limit, `memory` for memory limit, `nvidia.com/gpu` for gpu limit. Note: The only supported values for CPU are '1', '2', '4', and '8'. Setting 4 CPU requires at least 2Gi of memory. The values of the map is string form of the 'quantity' k8s type: https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go
499507
default_from_api: true
500508
- name: 'cpuIdle'
501509
type: Boolean
@@ -904,6 +912,16 @@ properties:
904912
type: String
905913
description: |-
906914
The Mesh resource name. For more information see https://cloud.google.com/service-mesh/docs/reference/network-services/rest/v1/projects.locations.meshes#resource:-mesh.
915+
- name: 'nodeSelector'
916+
type: NestedObject
917+
description: Node Selector describes the hardware requirements of the resources.
918+
min_version: 'beta'
919+
properties:
920+
- name: 'accelerator'
921+
type: String
922+
description:
923+
The GPU to attach to an instance. See https://cloud.google.com/run/docs/configuring/services/gpu for configuring GPU.
924+
required: true
907925
- name: 'traffic'
908926
type: Array
909927
description: |-

0 commit comments

Comments
 (0)