google-cloud-run-v2 0.3.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a007073c4a186a0453d2a181e590440d464ea1e7928f8ca9afe6a8075e8dff70
4
- data.tar.gz: ed2e7d6650d23b1d8d19e90816cd08403a9e11c2e85876aec57b9c4445cbec8b
3
+ metadata.gz: 2a37b489155da1d8766a45a844fc55d7d49a3abebee914a83d5c8115306a9f6d
4
+ data.tar.gz: 6184eb9fb9fa7dca712e6d365006a7a0e486bcb572e0633c0a2451eaa34f4579
5
5
  SHA512:
6
- metadata.gz: 54b076c125b6d9ce629b7a6090c981f48dc4fa4d24082e1d1f0f7c81ffaeb6c2fc038617acaae1b386780a164ae60dd0395d6f9377da7519c2148d51b5e8f13e
7
- data.tar.gz: 4fc93f4e239f395fb10701228385d8db5d39cffe81bb19c80018a481dba17f0dc7a1d9c8512f9770d70df9d51de491d8f3eb2637a55cc9e6a435ea20ad619299
6
+ metadata.gz: 5830e0dd70ea15f36e82d50ab5b66ce81e6c48b335b02e593359cf84e78a6ad871ed6070ebc278a3e16b9f17a35dbc75ac77c51eda8f34bef1de5d0837b613eb
7
+ data.tar.gz: 5159409c5c7f947d87081a76c6108a91a852fa64c50ef2169be7f7518200601e6ec4273b73c551bab4cff8506aabf79788c411fa8fdf9c650bbf5b52cf390252
@@ -67,6 +67,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
67
67
  value :EXECUTION_REASON_UNDEFINED, 0
68
68
  value :JOB_STATUS_SERVICE_POLLING_ERROR, 1
69
69
  value :NON_ZERO_EXIT_CODE, 2
70
+ value :CANCELLED, 3
70
71
  end
71
72
  end
72
73
  end
@@ -17,6 +17,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
17
17
  optional :resources, :message, 6, "google.cloud.run.v2.ResourceRequirements"
18
18
  repeated :ports, :message, 7, "google.cloud.run.v2.ContainerPort"
19
19
  repeated :volume_mounts, :message, 8, "google.cloud.run.v2.VolumeMount"
20
+ optional :working_dir, :string, 9
21
+ optional :liveness_probe, :message, 10, "google.cloud.run.v2.Probe"
22
+ optional :startup_probe, :message, 11, "google.cloud.run.v2.Probe"
20
23
  end
21
24
  add_message "google.cloud.run.v2.ResourceRequirements" do
22
25
  map :limits, :string, :string, 1
@@ -64,6 +67,27 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
64
67
  add_message "google.cloud.run.v2.CloudSqlInstance" do
65
68
  repeated :instances, :string, 1
66
69
  end
70
+ add_message "google.cloud.run.v2.Probe" do
71
+ optional :initial_delay_seconds, :int32, 1
72
+ optional :timeout_seconds, :int32, 2
73
+ optional :period_seconds, :int32, 3
74
+ optional :failure_threshold, :int32, 4
75
+ oneof :probe_type do
76
+ optional :http_get, :message, 5, "google.cloud.run.v2.HTTPGetAction"
77
+ optional :tcp_socket, :message, 6, "google.cloud.run.v2.TCPSocketAction"
78
+ end
79
+ end
80
+ add_message "google.cloud.run.v2.HTTPGetAction" do
81
+ optional :path, :string, 1
82
+ repeated :http_headers, :message, 4, "google.cloud.run.v2.HTTPHeader"
83
+ end
84
+ add_message "google.cloud.run.v2.HTTPHeader" do
85
+ optional :name, :string, 1
86
+ optional :value, :string, 2
87
+ end
88
+ add_message "google.cloud.run.v2.TCPSocketAction" do
89
+ optional :port, :int32, 1
90
+ end
67
91
  end
68
92
  end
69
93
 
@@ -82,6 +106,10 @@ module Google
82
106
  SecretVolumeSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.SecretVolumeSource").msgclass
83
107
  VersionToPath = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.VersionToPath").msgclass
84
108
  CloudSqlInstance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.CloudSqlInstance").msgclass
109
+ Probe = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.Probe").msgclass
110
+ HTTPGetAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.HTTPGetAction").msgclass
111
+ HTTPHeader = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.HTTPHeader").msgclass
112
+ TCPSocketAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.TCPSocketAction").msgclass
85
113
  end
86
114
  end
87
115
  end
@@ -18,6 +18,7 @@
18
18
 
19
19
  require "google/cloud/errors"
20
20
  require "google/cloud/run/v2/revision_pb"
21
+ require "google/cloud/location"
21
22
 
22
23
  module Google
23
24
  module Cloud
@@ -139,6 +140,12 @@ module Google
139
140
  config.endpoint = @config.endpoint
140
141
  end
141
142
 
143
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
144
+ config.credentials = credentials
145
+ config.quota_project = @quota_project_id
146
+ config.endpoint = @config.endpoint
147
+ end
148
+
142
149
  @revisions_stub = ::Gapic::ServiceStub.new(
143
150
  ::Google::Cloud::Run::V2::Revisions::Stub,
144
151
  credentials: credentials,
@@ -155,6 +162,13 @@ module Google
155
162
  #
156
163
  attr_reader :operations_client
157
164
 
165
+ ##
166
+ # Get the associated client for mix-in of the Locations.
167
+ #
168
+ # @return [Google::Cloud::Location::Locations::Client]
169
+ #
170
+ attr_reader :location_client
171
+
158
172
  # Service calls
159
173
 
160
174
  ##
@@ -18,6 +18,7 @@
18
18
 
19
19
  require "google/cloud/errors"
20
20
  require "google/cloud/run/v2/service_pb"
21
+ require "google/cloud/location"
21
22
 
22
23
  module Google
23
24
  module Cloud
@@ -155,6 +156,12 @@ module Google
155
156
  config.endpoint = @config.endpoint
156
157
  end
157
158
 
159
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
160
+ config.credentials = credentials
161
+ config.quota_project = @quota_project_id
162
+ config.endpoint = @config.endpoint
163
+ end
164
+
158
165
  @services_stub = ::Gapic::ServiceStub.new(
159
166
  ::Google::Cloud::Run::V2::Services::Stub,
160
167
  credentials: credentials,
@@ -171,6 +178,13 @@ module Google
171
178
  #
172
179
  attr_reader :operations_client
173
180
 
181
+ ##
182
+ # Get the associated client for mix-in of the Locations.
183
+ #
184
+ # @return [Google::Cloud::Location::Locations::Client]
185
+ #
186
+ attr_reader :location_client
187
+
174
188
  # Service calls
175
189
 
176
190
  ##
@@ -192,13 +206,15 @@ module Google
192
206
  # the default parameter values, pass an empty Hash as a request object (see above).
193
207
  #
194
208
  # @param parent [::String]
195
- # Required. The location and project in which this service should be created.
196
- # Format: projects/\\{projectnumber}/locations/\\{location}
209
+ # The location and project in which this service should be created.
210
+ # Format: projects/\\{project}/locations/\\{location}
211
+ # Only lowercase characters, digits, and hyphens.
197
212
  # @param service [::Google::Cloud::Run::V2::Service, ::Hash]
198
213
  # Required. The Service instance to create.
199
214
  # @param service_id [::String]
200
- # Required. The unique identifier for the Service. The name of the service becomes
201
- # \\{parent}/services/\\{service_id}.
215
+ # Required. The unique identifier for the Service. It must begin with letter,
216
+ # and may not end with hyphen; must contain fewer than 50 characters.
217
+ # The name of the service becomes \\{parent}/services/\\{service_id}.
202
218
  # @param validate_only [::Boolean]
203
219
  # Indicates that the request should be validated and default values
204
220
  # populated, without persisting the request or creating any resources.
@@ -298,7 +314,7 @@ module Google
298
314
  #
299
315
  # @param name [::String]
300
316
  # Required. The full name of the Service.
301
- # Format: projects/\\{projectnumber}/locations/\\{location}/services/\\{service}
317
+ # Format: projects/\\{project}/locations/\\{location}/services/\\{service}
302
318
  #
303
319
  # @yield [response, operation] Access the result along with the RPC operation
304
320
  # @yieldparam response [::Google::Cloud::Run::V2::Service]
@@ -388,7 +404,7 @@ module Google
388
404
  # @param parent [::String]
389
405
  # Required. The location and project to list resources on.
390
406
  # Location must be a valid GCP region, and may not be the "-" wildcard.
391
- # Format: projects/\\{projectnumber}/locations/\\{location}
407
+ # Format: projects/\\{project}/locations/\\{location}
392
408
  # @param page_size [::Integer]
393
409
  # Maximum number of Services to return in this call.
394
410
  # @param page_token [::String]
@@ -596,7 +612,7 @@ module Google
596
612
  #
597
613
  # @param name [::String]
598
614
  # Required. The full name of the Service.
599
- # Format: projects/\\{projectnumber}/locations/\\{location}/services/\\{service}
615
+ # Format: projects/\\{project}/locations/\\{location}/services/\\{service}
600
616
  # @param validate_only [::Boolean]
601
617
  # Indicates that the request should be validated without actually
602
618
  # deleting any resources.
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Run
23
23
  module V2
24
- VERSION = "0.3.1"
24
+ VERSION = "0.4.0"
25
25
  end
26
26
  end
27
27
  end
@@ -191,6 +191,9 @@ module Google
191
191
  # A task reached its retry limit and the last attempt failed due to the
192
192
  # user container exiting with a non-zero exit code.
193
193
  NON_ZERO_EXIT_CODE = 2
194
+
195
+ # The execution was cancelled by users.
196
+ CANCELLED = 3
194
197
  end
195
198
  end
196
199
  end
@@ -74,6 +74,25 @@ module Google
74
74
  # @!attribute [rw] volume_mounts
75
75
  # @return [::Array<::Google::Cloud::Run::V2::VolumeMount>]
76
76
  # Volume to mount into the container's filesystem.
77
+ # @!attribute [rw] working_dir
78
+ # @return [::String]
79
+ # Container's working directory.
80
+ # If not specified, the container runtime's default will be used, which
81
+ # might be configured in the container image.
82
+ # @!attribute [rw] liveness_probe
83
+ # @return [::Google::Cloud::Run::V2::Probe]
84
+ # Periodic probe of container liveness.
85
+ # Container will be restarted if the probe fails.
86
+ # More info:
87
+ # https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
88
+ # @!attribute [rw] startup_probe
89
+ # @return [::Google::Cloud::Run::V2::Probe]
90
+ # Startup probe of application within the container.
91
+ # All other probes are disabled if a startup probe is provided, until it
92
+ # succeeds. Container will not be added to service endpoints if the probe
93
+ # fails.
94
+ # More info:
95
+ # https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
77
96
  class Container
78
97
  include ::Google::Protobuf::MessageExts
79
98
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -219,7 +238,7 @@ module Google
219
238
  # @!attribute [rw] default_mode
220
239
  # @return [::Integer]
221
240
  # Integer representation of mode bits to use on created files by default.
222
- # Must be a value between 0000 and 0777 (octal), defaulting to 0644.
241
+ # Must be a value between 0000 and 0777 (octal), defaulting to 0444.
223
242
  # Directories within the path are not affected by this setting.
224
243
  #
225
244
  # Notes
@@ -284,6 +303,79 @@ module Google
284
303
  include ::Google::Protobuf::MessageExts
285
304
  extend ::Google::Protobuf::MessageExts::ClassMethods
286
305
  end
306
+
307
+ # Probe describes a health check to be performed against a container to
308
+ # determine whether it is alive or ready to receive traffic.
309
+ # @!attribute [rw] initial_delay_seconds
310
+ # @return [::Integer]
311
+ # Number of seconds after the container has started before the probe is
312
+ # initiated.
313
+ # Defaults to 0 seconds. Minimum value is 0. Maximum value for liveness probe
314
+ # is 3600. Maximum value for startup probe is 240.
315
+ # More info:
316
+ # https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
317
+ # @!attribute [rw] timeout_seconds
318
+ # @return [::Integer]
319
+ # Number of seconds after which the probe times out.
320
+ # Defaults to 1 second. Minimum value is 1. Maximum value is 3600.
321
+ # Must be smaller than period_seconds.
322
+ # More info:
323
+ # https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
324
+ # @!attribute [rw] period_seconds
325
+ # @return [::Integer]
326
+ # How often (in seconds) to perform the probe.
327
+ # Default to 10 seconds. Minimum value is 1. Maximum value for liveness probe
328
+ # is 3600. Maximum value for startup probe is 240.
329
+ # Must be greater or equal than timeout_seconds.
330
+ # @!attribute [rw] failure_threshold
331
+ # @return [::Integer]
332
+ # Minimum consecutive failures for the probe to be considered failed after
333
+ # having succeeded. Defaults to 3. Minimum value is 1.
334
+ # @!attribute [rw] http_get
335
+ # @return [::Google::Cloud::Run::V2::HTTPGetAction]
336
+ # HTTPGet specifies the http request to perform.
337
+ # Exactly one of HTTPGet or TCPSocket must be specified.
338
+ # @!attribute [rw] tcp_socket
339
+ # @return [::Google::Cloud::Run::V2::TCPSocketAction]
340
+ # TCPSocket specifies an action involving a TCP port.
341
+ # Exactly one of HTTPGet or TCPSocket must be specified.
342
+ class Probe
343
+ include ::Google::Protobuf::MessageExts
344
+ extend ::Google::Protobuf::MessageExts::ClassMethods
345
+ end
346
+
347
+ # HTTPGetAction describes an action based on HTTP Get requests.
348
+ # @!attribute [rw] path
349
+ # @return [::String]
350
+ # Path to access on the HTTP server. Defaults to '/'.
351
+ # @!attribute [rw] http_headers
352
+ # @return [::Array<::Google::Cloud::Run::V2::HTTPHeader>]
353
+ # Custom headers to set in the request. HTTP allows repeated headers.
354
+ class HTTPGetAction
355
+ include ::Google::Protobuf::MessageExts
356
+ extend ::Google::Protobuf::MessageExts::ClassMethods
357
+ end
358
+
359
+ # HTTPHeader describes a custom header to be used in HTTP probes
360
+ # @!attribute [rw] name
361
+ # @return [::String]
362
+ # Required. The header field name
363
+ # @!attribute [rw] value
364
+ # @return [::String]
365
+ # The header field value
366
+ class HTTPHeader
367
+ include ::Google::Protobuf::MessageExts
368
+ extend ::Google::Protobuf::MessageExts::ClassMethods
369
+ end
370
+
371
+ # TCPSocketAction describes an action based on opening a socket
372
+ # @!attribute [rw] port
373
+ # @return [::Integer]
374
+ # Port number to access on the container. Must be in the range 1 to 65535.
375
+ class TCPSocketAction
376
+ include ::Google::Protobuf::MessageExts
377
+ extend ::Google::Protobuf::MessageExts::ClassMethods
378
+ end
287
379
  end
288
380
  end
289
381
  end
@@ -24,15 +24,17 @@ module Google
24
24
  # Request message for creating a Service.
25
25
  # @!attribute [rw] parent
26
26
  # @return [::String]
27
- # Required. The location and project in which this service should be created.
28
- # Format: projects/\\{projectnumber}/locations/\\{location}
27
+ # The location and project in which this service should be created.
28
+ # Format: projects/\\{project}/locations/\\{location}
29
+ # Only lowercase characters, digits, and hyphens.
29
30
  # @!attribute [rw] service
30
31
  # @return [::Google::Cloud::Run::V2::Service]
31
32
  # Required. The Service instance to create.
32
33
  # @!attribute [rw] service_id
33
34
  # @return [::String]
34
- # Required. The unique identifier for the Service. The name of the service becomes
35
- # \\{parent}/services/\\{service_id}.
35
+ # Required. The unique identifier for the Service. It must begin with letter,
36
+ # and may not end with hyphen; must contain fewer than 50 characters.
37
+ # The name of the service becomes \\{parent}/services/\\{service_id}.
36
38
  # @!attribute [rw] validate_only
37
39
  # @return [::Boolean]
38
40
  # Indicates that the request should be validated and default values
@@ -65,7 +67,7 @@ module Google
65
67
  # @return [::String]
66
68
  # Required. The location and project to list resources on.
67
69
  # Location must be a valid GCP region, and may not be the "-" wildcard.
68
- # Format: projects/\\{projectnumber}/locations/\\{location}
70
+ # Format: projects/\\{project}/locations/\\{location}
69
71
  # @!attribute [rw] page_size
70
72
  # @return [::Integer]
71
73
  # Maximum number of Services to return in this call.
@@ -98,7 +100,7 @@ module Google
98
100
  # @!attribute [rw] name
99
101
  # @return [::String]
100
102
  # Required. The full name of the Service.
101
- # Format: projects/\\{projectnumber}/locations/\\{location}/services/\\{service}
103
+ # Format: projects/\\{project}/locations/\\{location}/services/\\{service}
102
104
  class GetServiceRequest
103
105
  include ::Google::Protobuf::MessageExts
104
106
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -108,7 +110,7 @@ module Google
108
110
  # @!attribute [rw] name
109
111
  # @return [::String]
110
112
  # Required. The full name of the Service.
111
- # Format: projects/\\{projectnumber}/locations/\\{location}/services/\\{service}
113
+ # Format: projects/\\{project}/locations/\\{location}/services/\\{service}
112
114
  # @!attribute [rw] validate_only
113
115
  # @return [::Boolean]
114
116
  # Indicates that the request should be validated without actually
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-run-v2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-15 00:00:00.000000000 Z
11
+ date: 2022-10-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0.10'
19
+ version: '0.12'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: '0.10'
29
+ version: '0.12'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -44,6 +44,26 @@ dependencies:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
46
  version: '1.0'
47
+ - !ruby/object:Gem::Dependency
48
+ name: google-cloud-location
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: '0.0'
54
+ - - "<"
55
+ - !ruby/object:Gem::Version
56
+ version: 2.a
57
+ type: :runtime
58
+ prerelease: false
59
+ version_requirements: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - ">="
62
+ - !ruby/object:Gem::Version
63
+ version: '0.0'
64
+ - - "<"
65
+ - !ruby/object:Gem::Version
66
+ version: 2.a
47
67
  - !ruby/object:Gem::Dependency
48
68
  name: grpc-google-iam-v1
49
69
  requirement: !ruby/object:Gem::Requirement