Skip to content

Commit

Permalink
add http get port (GoogleCloudPlatform#7764)
Browse files Browse the repository at this point in the history
  • Loading branch information
yanweiguo authored and Madhura Phadnis committed Apr 27, 2023
1 parent def64ea commit baca546
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 14 deletions.
15 changes: 15 additions & 0 deletions mmv1/products/cloudrun/Service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,7 @@ properties:
name: port
description: |-
Port number to access on the container. Number must be in the range 1 to 65535.
If not specified, defaults to the same value as container.ports[0].containerPort.
default_from_api: true
- !ruby/object:Api::Type::NestedObject
name: httpGet
Expand All @@ -583,6 +584,12 @@ properties:
description: |-
Path to access on the HTTP server. If set, it should not be empty string.
default_value: "/"
- !ruby/object:Api::Type::Integer
name: port
description: |-
Port number to access on the container. Number must be in the range 1 to 65535.
If not specified, defaults to the same value as container.ports[0].containerPort.
default_from_api: true
- !ruby/object:Api::Type::Array
name: httpHeaders
description: |-
Expand Down Expand Up @@ -615,6 +622,7 @@ properties:
name: port
description: |-
Port number to access on the container. Number must be in the range 1 to 65535.
If not specified, defaults to the same value as container.ports[0].containerPort.
default_from_api: true
- !ruby/object:Api::Type::String
name: service
Expand Down Expand Up @@ -669,6 +677,12 @@ properties:
description: |-
Path to access on the HTTP server. If set, it should not be empty string.
default_value: "/"
- !ruby/object:Api::Type::Integer
name: port
description: |-
Port number to access on the container. Number must be in the range 1 to 65535.
If not specified, defaults to the same value as container.ports[0].containerPort.
default_from_api: true
- !ruby/object:Api::Type::Array
name: httpHeaders
description: |-
Expand Down Expand Up @@ -700,6 +714,7 @@ properties:
name: port
description: |-
Port number to access on the container. Number must be in the range 1 to 65535.
If not specified, defaults to the same value as container.ports[0].containerPort.
default_from_api: true
- !ruby/object:Api::Type::String
name: service
Expand Down
21 changes: 18 additions & 3 deletions mmv1/products/cloudrunv2/Service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,12 @@ properties:
default_value: "/"
description: |-
Path to access on the HTTP server. Defaults to '/'.
- !ruby/object:Api::Type::Integer
name: port
description: |-
Port number to access on the container. Number must be in the range 1 to 65535.
If not specified, defaults to the same value as container.ports[0].containerPort.
default_from_api: true
- !ruby/object:Api::Type::Array
name: "httpHeaders"
description: |-
Expand Down Expand Up @@ -436,7 +442,8 @@ properties:
- !ruby/object:Api::Type::Integer
name: port
description: |-
Port number to access on the container. Number must be in the range 1 to 65535. If not specified, defaults to the same value as container.ports[0].containerPort.
Port number to access on the container. Number must be in the range 1 to 65535.
If not specified, defaults to the same value as container.ports[0].containerPort.
default_from_api: true
- !ruby/object:Api::Type::String
name: service
Expand Down Expand Up @@ -486,6 +493,12 @@ properties:
default_value: "/"
description: |-
Path to access on the HTTP server. Defaults to '/'.
- !ruby/object:Api::Type::Integer
name: port
description: |-
Port number to access on the container. Must be in the range 1 to 65535.
If not specified, defaults to the same value as container.ports[0].containerPort.
default_from_api: true
- !ruby/object:Api::Type::Array
name: "httpHeaders"
description: |-
Expand Down Expand Up @@ -517,7 +530,8 @@ properties:
- !ruby/object:Api::Type::Integer
name: port
description: |-
Port number to access on the container. Must be in the range 1 to 65535. If not specified, defaults to 8080.
Port number to access on the container. Must be in the range 1 to 65535.
If not specified, defaults to the same value as container.ports[0].containerPort.
default_from_api: true
- !ruby/object:Api::Type::NestedObject
name: grpc
Expand All @@ -533,7 +547,8 @@ properties:
- !ruby/object:Api::Type::Integer
name: port
description: |-
Port number to access on the container. Number must be in the range 1 to 65535. If not specified, defaults to the same value as container.ports[0].containerPort.
Port number to access on the container. Number must be in the range 1 to 65535.
If not specified, defaults to the same value as container.ports[0].containerPort.
default_from_api: true
- !ruby/object:Api::Type::String
name: service
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ resource "google_cloud_run_service" "<%= ctx[:primary_resource_id] %>" {

name = "<%= ctx[:vars]['cloud_run_service_name'] %>"
location = "us-central1"
metadata {
annotations = {
"run.googleapis.com/launch-stage" = "BETA"
}
}

template {
spec {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,6 @@ resource "google_cloud_run_service" "default" {
namespace = "%s"
annotations = {
generated-by = "magic-modules"
"run.googleapis.com/launch-stage" = "BETA"
}
}

Expand Down Expand Up @@ -480,7 +479,6 @@ resource "google_cloud_run_service" "default" {
namespace = "%s"
annotations = {
generated-by = "magic-modules"
"run.googleapis.com/launch-stage" = "BETA"
}
}

Expand All @@ -507,6 +505,7 @@ resource "google_cloud_run_service" "default" {
failure_threshold = %s
http_get {
path = "/some-path"
port = 8080
http_headers {
name = "User-Agent"
value = "magic-modules"
Expand Down Expand Up @@ -539,7 +538,6 @@ resource "google_cloud_run_service" "default" {
namespace = "%s"
annotations = {
generated-by = "magic-modules"
"run.googleapis.com/launch-stage" = "BETA"
}
}

Expand Down Expand Up @@ -573,7 +571,6 @@ resource "google_cloud_run_service" "default" {
namespace = "%s"
annotations = {
generated-by = "magic-modules"
"run.googleapis.com/launch-stage" = "BETA"
}
}

Expand All @@ -584,6 +581,7 @@ resource "google_cloud_run_service" "default" {
startup_probe {
http_get {
path = "/some-path"
port = 8080
http_headers {
name = "User-Agent"
value = "magic-modules"
Expand Down Expand Up @@ -616,7 +614,6 @@ resource "google_cloud_run_service" "default" {
namespace = "%s"
annotations = {
generated-by = "magic-modules"
"run.googleapis.com/launch-stage" = "BETA"
}
}

Expand Down Expand Up @@ -650,7 +647,6 @@ resource "google_cloud_run_service" "default" {
namespace = "%s"
annotations = {
generated-by = "magic-modules"
"run.googleapis.com/launch-stage" = "BETA"
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ resource "google_cloud_run_v2_service" "default" {
failure_threshold = 2
http_get {
path = "/some-path"
port = 8080
http_headers {
name = "User-Agent"
value = "magic-modules"
Expand Down Expand Up @@ -448,6 +449,7 @@ resource "google_cloud_run_v2_service" "default" {
failure_threshold = 3
http_get {
path = "/some-path"
port = 8080
http_headers {
name = "User-Agent"
value = "magic-modules"
Expand Down

0 comments on commit baca546

Please sign in to comment.