google-cloud-container 1.6.0 → 2.0.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: 1d63c2852013e21dbc4ce7a00e3e04679a3690e564fbec11223e542af261589f
4
- data.tar.gz: 7a63ca66affb5ab70ee096dd098f05fc2b0283896e5ab101eef31c07b55a65ee
3
+ metadata.gz: 8b3565c1e07fa325993515a83d6a251d2687ef4716ddab5c3c014f09d3de187f
4
+ data.tar.gz: cbc37c0a9e6c2931c0a100d610aa9ee6a9fea746781da1f42cf230b7d7310031
5
5
  SHA512:
6
- metadata.gz: d5ba8a0b795537ed3fd62b7b8da48e15a2779e93375f1036d392bf721630cd116b34a41abea43f24bf99849d88fcb9a2f6a0905972fdfecb80eb4a5350ea16dc
7
- data.tar.gz: 1cb4b7baf3ee076d557211ff242a9dbfcbaee74553084a5838ddd1d772b7819153175e0b7dbeeb1d73bb75158851322f5d8bf6f159657beebeb16b4fbbe06435
6
+ metadata.gz: 17225c73088aace638ca7982bdbf37ef3ae528fd24991a359e0a82dd9288b9132c157aeb3bb24b5c26b58e27b00239833a6ebefb9374582e6e8d5573061faa7c
7
+ data.tar.gz: 0a7d46f27ae8bb2f6767d8177db6a06649bb21c50a87a739dbe09e8b2c1da16caf7fd48dc8787ea90e364be99b48c04635c9cde68f2cc9d42675028dce6e724f
data/.yardopts CHANGED
@@ -8,5 +8,4 @@
8
8
  -
9
9
  README.md
10
10
  AUTHENTICATION.md
11
- MIGRATING.md
12
11
  LICENSE.md
data/README.md CHANGED
@@ -16,8 +16,7 @@ for this library, google-cloud-container, to see the convenience methods for
16
16
  constructing client objects. Reference documentation for the client objects
17
17
  themselves can be found in the client library documentation for the versioned
18
18
  client gems:
19
- [google-cloud-container-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-container-v1/latest),
20
- [google-cloud-container-v1beta1](https://cloud.google.com/ruby/docs/reference/google-cloud-container-v1beta1/latest).
19
+ [google-cloud-container-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-container-v1/latest).
21
20
 
22
21
  See also the [Product Documentation](https://cloud.google.com/kubernetes-engine)
23
22
  for more usage information.
@@ -35,14 +34,6 @@ In order to use this library, you first need to go through the following steps:
35
34
  1. [Enable the API.](https://console.cloud.google.com/apis/library/container.googleapis.com)
36
35
  1. {file:AUTHENTICATION.md Set up authentication.}
37
36
 
38
- ## Migrating from 0.x versions
39
-
40
- The 1.0 release of the google-cloud-container client is a significant upgrade
41
- based on a [next-gen code generator](https://github.com/googleapis/gapic-generator-ruby),
42
- and includes substantial interface changes. Existing code written for earlier
43
- versions of this library will likely require updates to use this version.
44
- See the {file:MIGRATING.md MIGRATING.md} document for more information.
45
-
46
37
  ## Debug Logging
47
38
 
48
39
  This library comes with opt-in Debug Logging that can help you troubleshoot
@@ -71,8 +62,7 @@ results in logs appearing alongside your application logs in the
71
62
  Debug logging also requires that the versioned clients for this service be
72
63
  sufficiently recent, released after about Dec 10, 2024. If logging is not
73
64
  working, try updating the versioned clients in your bundle or installed gems:
74
- [google-cloud-container-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-container-v1/latest),
75
- [google-cloud-container-v1beta1](https://cloud.google.com/ruby/docs/reference/google-cloud-container-v1beta1/latest).
65
+ [google-cloud-container-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-container-v1/latest).
76
66
 
77
67
  ## Supported Ruby Versions
78
68
 
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module Container
23
- VERSION = "1.6.0"
23
+ VERSION = "2.0.0"
24
24
  end
25
25
  end
26
26
  end
metadata CHANGED
@@ -1,54 +1,28 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-container
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-01-29 00:00:00.000000000 Z
10
+ date: 2025-02-13 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: google-cloud-container-v1
14
14
  requirement: !ruby/object:Gem::Requirement
15
15
  requirements:
16
- - - ">="
17
- - !ruby/object:Gem::Version
18
- version: '0.33'
19
- - - "<"
20
- - !ruby/object:Gem::Version
21
- version: 2.a
22
- type: :runtime
23
- prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- requirements:
26
- - - ">="
27
- - !ruby/object:Gem::Version
28
- version: '0.33'
29
- - - "<"
30
- - !ruby/object:Gem::Version
31
- version: 2.a
32
- - !ruby/object:Gem::Dependency
33
- name: google-cloud-container-v1beta1
34
- requirement: !ruby/object:Gem::Requirement
35
- requirements:
36
- - - ">="
37
- - !ruby/object:Gem::Version
38
- version: '0.34'
39
- - - "<"
16
+ - - "~>"
40
17
  - !ruby/object:Gem::Version
41
- version: 2.a
18
+ version: '1.6'
42
19
  type: :runtime
43
20
  prerelease: false
44
21
  version_requirements: !ruby/object:Gem::Requirement
45
22
  requirements:
46
- - - ">="
47
- - !ruby/object:Gem::Version
48
- version: '0.34'
49
- - - "<"
23
+ - - "~>"
50
24
  - !ruby/object:Gem::Version
51
- version: 2.a
25
+ version: '1.6'
52
26
  - !ruby/object:Gem::Dependency
53
27
  name: google-cloud-core
54
28
  requirement: !ruby/object:Gem::Requirement
@@ -73,7 +47,6 @@ files:
73
47
  - ".yardopts"
74
48
  - AUTHENTICATION.md
75
49
  - LICENSE.md
76
- - MIGRATING.md
77
50
  - README.md
78
51
  - lib/google-cloud-container.rb
79
52
  - lib/google/cloud/container.rb
@@ -96,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
96
69
  - !ruby/object:Gem::Version
97
70
  version: '0'
98
71
  requirements: []
99
- rubygems_version: 3.6.2
72
+ rubygems_version: 3.6.3
100
73
  specification_version: 4
101
74
  summary: API Client library for the Kubernetes Engine API
102
75
  test_files: []
data/MIGRATING.md DELETED
@@ -1,280 +0,0 @@
1
- ## Migrating to google-cloud-container 1.0
2
-
3
- The 1.0 release of the google-cloud-container client is a significant upgrade
4
- based on a [next-gen code generator](https://github.com/googleapis/gapic-generator-ruby),
5
- and includes substantial interface changes. Existing code written for earlier
6
- versions of this library will likely require updates to use this version.
7
- This document describes the changes that have been made, and what you need to
8
- do to update your usage.
9
-
10
- To summarize:
11
-
12
- * The library has been broken out into three libraries. The new gems
13
- `google-cloud-container-v1` and `google-cloud-container-v1beta1` contain the
14
- actual client classes for versions V1 and V1beta1 of the Kubernetes Engine
15
- service, and the gem `google-cloud-container` now simply provides a
16
- convenience wrapper. See [Library Structure](#library-structure) for more
17
- info.
18
- * The library uses a new configuration mechanism giving you closer control
19
- over endpoint address, network timeouts, and retry. See
20
- [Client Configuration](#client-configuration) for more info. Furthermore,
21
- when creating a client object, you can customize its configuration in a
22
- block rather than passing arguments to the constructor. See
23
- [Creating Clients](#creating-clients) for more info.
24
- * Previously, positional arguments were used to indicate required arguments.
25
- Now, all method arguments are keyword arguments, with documentation that
26
- specifies whether they are required or optional. Additionally, you can pass
27
- a proto request object instead of separate arguments. See
28
- [Passing Arguments](#passing-arguments) for more info.
29
- * Previously, clients reported RPC errors by raising instances of
30
- `Google::Gax::GaxError` and its subclasses. Now, RPC exceptions are of type
31
- `Google::Cloud::Error` and its subclasses. See
32
- [Handling Errors](#handling-errors) for more info.
33
- * Some classes have moved into different namespaces. See
34
- [Class Namespaces](#class-namespaces) for more info.
35
-
36
- ### Library Structure
37
-
38
- Older 0.x releases of the `google-cloud-container` gem were all-in-one gems that
39
- included potentially multiple clients for multiple versions of the Kubernetes
40
- Engine service. The `Google::Cloud::Container.new` factory method would
41
- return you an instance of a `Google::Cloud::Container::V1::ClusterManagerClient`
42
- object for the V1 version of the service, or a
43
- `Google::Cloud::Container::V1beta1::ClusterManagerClient` object for the
44
- V1beta1 version of the service. All these classes were defined in the same gem.
45
-
46
- With the 1.0 release, the `google-cloud-container` gem still provides factory
47
- methods for obtaining clients. (The method signatures will have changed. See
48
- [Creating Clients](#creating-clients) for details.) However, the actual client
49
- classes have been moved into separate gems, one per service version. The
50
- `Google::Cloud::Container::V1::ClusterManager::Client` class, along with its
51
- helpers and data types, is now part of the `google-cloud-container-v1` gem.
52
- Similarly, the `Google::Cloud::Container::V1beta1::ClusterManager::Client`
53
- class is part of the `google-cloud-container-v1beta1` gem.
54
-
55
- For normal usage, you can continue to install the `google-cloud-container` gem
56
- (which will bring in the versioned client gems as dependencies) and continue to
57
- use factory methods to create clients. However, you may alternatively choose to
58
- install only one of the versioned gems. For example, if you know you will only
59
- `V1` of the service, you can install `google-cloud-container-v1` by itself, and
60
- construct instances of the
61
- `Google::Cloud::Container::V1::ClusterManager::Client` client class directly.
62
-
63
- ### Client Configuration
64
-
65
- In older releases, if you wanted to customize performance parameters or
66
- low-level behavior of the client (such as credentials, timeouts, or
67
- instrumentation), you would pass a variety of keyword arguments to the client
68
- constructor. It was also extremely difficult to customize the default settings.
69
-
70
- With the 1.0 release, a configuration interface provides control over these
71
- parameters, including defaults for all instances of a client, and settings for
72
- each specific client instance. For example, to set default credentials and
73
- timeout for all Kubernetes Engine V1 ClusterManager clients:
74
-
75
- ```
76
- Google::Cloud::Container::V1::ClusterManager::Client.configure do |config|
77
- config.credentials = "/path/to/credentials.json"
78
- config.timeout = 10.0
79
- end
80
- ```
81
-
82
- Individual RPCs can also be configured independently. For example, to set the
83
- timeout for the `create_cluster` call:
84
-
85
- ```
86
- Google::Cloud::Container::V1::ClusterManager::Client.configure do |config|
87
- config.rpcs.create_cluster.timeout = 20.0
88
- end
89
- ```
90
-
91
- Defaults for certain configurations can be set for all Kubernetes Engine versions
92
- globally:
93
-
94
- ```
95
- Google::Cloud::Container.configure do |config|
96
- config.credentials = "/path/to/credentials.json"
97
- config.timeout = 10.0
98
- end
99
- ```
100
-
101
- Finally, you can override the configuration for each client instance. See the
102
- next section on [Creating Clients](#creating-clients) for details.
103
-
104
- ### Creating Clients
105
-
106
- In older releases, to create a client object, you would use the
107
- `Google::Cloud::Container.new` class method. Keyword arguments were available to
108
- select a service version and to configure parameters such as credentials and
109
- timeouts.
110
-
111
- With the 1.0 release, use the `Google::Cloud::Container.cluster_manager` class
112
- method to create a client object. You may select a service version using the
113
- `:version` keyword argument. However, other configuration parameters should be
114
- set in a configuration block when you create the client.
115
-
116
- Old:
117
- ```
118
- client = Google::Cloud::Container.new credentials: "/path/to/credentials.json"
119
- ```
120
-
121
- New:
122
- ```
123
- client = Google::Cloud::Container.cluster_manager do |config|
124
- config.credentials = "/path/to/credentials.json"
125
- end
126
- ```
127
-
128
- The configuration block is optional. If you do not provide it, or you do not
129
- set some configuration parameters, then the default configuration is used. See
130
- [Client Configuration](#client-configuration).
131
-
132
- ### Passing Arguments
133
-
134
- In older releases, the intent had been for required arguments to be passed as
135
- positional method arguments, and for optional arguments to be passed as keyword
136
- arguments. However, this rule didn't always hold cleanly because some arguments,
137
- including required arguments, were at one point deprecated and replaced, leading
138
- to a confusing mix of positional and keyword arguments, as well as some breaking
139
- changes.
140
-
141
- With the 1.0 release, all RPC arguments are passed as keyword arguments,
142
- regardless of whether they are required or optional. For example:
143
-
144
- Old:
145
- ```
146
- client = Google::Cloud::Container.new
147
-
148
- name = "projects/my-project/locations/-/clusters/my-cluster"
149
- logging_service = "logging.googleapis.com"
150
-
151
- # logging_service is a positional argument and name is a keyword argument,
152
- # although both are required.
153
- response = client.set_logging_service logging_service, name: name
154
- ```
155
-
156
- New:
157
- ```
158
- client = Google::Cloud::Container.cluster_manager
159
-
160
- name = "projects/my-project/locations/-/clusters/my-cluster"
161
- logging_service = "logging.googleapis.com"
162
-
163
- # Both name and logging_service are keyword arguments.
164
- response = client.set_logging_service name: name,
165
- logging_service: logging_service
166
- ```
167
-
168
- In the 1.0 release, it is also possible to pass a request object, either
169
- as a hash or as a protocol buffer.
170
-
171
- New:
172
- ```
173
- client = Google::Cloud::Container.cluster_manager
174
-
175
- request = Google::Cloud::Container::V1::SetLoggingServiceRequest.new(
176
- name: "projects/my-project/locations/-/clusters/my-cluster",
177
- logging_service: "logging.googleapis.com"
178
- )
179
-
180
- # Pass a request object as a positional argument:
181
- response = client.set_logging_service request
182
- ```
183
-
184
- Finally, in older releases, to provide call options, you would pass a
185
- `Google::Gax::CallOptions` object with the `:options` keyword argument. In the
186
- 1.0 release, pass call options using a _second set_ of keyword arguments.
187
-
188
- Old:
189
- ```
190
- client = Google::Cloud::Container.new
191
-
192
- name = "projects/my-project/locations/-/clusters/my-cluster"
193
- logging_service = "logging.googleapis.com"
194
-
195
- options = Google::Gax::CallOptions.new timeout: 10.0
196
-
197
- response = client.set_logging_service logging_service, name: name, options: options
198
- ```
199
-
200
- New:
201
- ```
202
- client = Google::Cloud::Container.cluster_manager
203
-
204
- name = "projects/my-project/locations/-/clusters/my-cluster"
205
- logging_service = "logging.googleapis.com"
206
-
207
- # Use a hash to wrap the normal call arguments (or pass a request object), and
208
- # then add further keyword arguments for the call options.
209
- response = client.set_logging_service(
210
- { name: name, logging_service: logging_service },
211
- timeout: 10.0
212
- )
213
- ```
214
-
215
- ### Handling Errors
216
-
217
- The client reports standard
218
- [gRPC error codes](https://github.com/grpc/grpc/blob/master/doc/statuscodes.md)
219
- by raising exceptions. In older releases, these exceptions were located in the
220
- `Google::Gax` namespace and were subclasses of the `Google::Gax::GaxError` base
221
- exception class, defined in the `google-gax` gem. However, these classes were
222
- different from the standard exceptions (subclasses of `Google::Cloud::Error`)
223
- thrown by other client libraries such as `google-cloud-storage`.
224
-
225
- The 1.0 client library now uses the `Google::Cloud::Error` exception hierarchy,
226
- for consistency across all the Google Cloud client libraries. In general, these
227
- exceptions have the same name as their counterparts from older releases, but
228
- are located in the `Google::Cloud` namespace rather than the `Google::Gax`
229
- namespace.
230
-
231
- Old:
232
- ```
233
- client = Google::Cloud::Container.new
234
-
235
- name = "projects/my-project/locations/-/clusters/my-cluster"
236
- logging_service = "logging.googleapis.com"
237
-
238
- begin
239
- response = client.set_logging_service logging_service, name: name
240
- rescue Google::Gax::Error => e
241
- # Handle exceptions that subclass Google::Gax::Error
242
- end
243
- ```
244
-
245
- New:
246
- ```
247
- client = Google::Cloud::Container.cluster_manager
248
-
249
- name = "projects/my-project/locations/-/clusters/my-cluster"
250
- logging_service = "logging.googleapis.com"
251
-
252
- begin
253
- response = client.set_logging_service name: name,
254
- logging_service: logging_service
255
- rescue Google::Cloud::Error => e
256
- # Handle exceptions that subclass Google::Cloud::Error
257
- end
258
- ```
259
-
260
- ### Class Namespaces
261
-
262
- In older releases, some data type (protobuf) classes were located under the module
263
- `Google::Container`. In the 1.0 release, these classes have been moved into the
264
- same `Google::Cloud::Container` module by the client object, for consistency.
265
-
266
- In older releases, the client object was of class
267
- `Google::Cloud::Container::V1::ClusterManagerClient`.
268
- In the 1.0 release, the client object is of class
269
- `Google::Cloud::Container::V1::ClusterManager::Client`.
270
- Note that most users will use the `Google::Cloud::Container.cluster_manager`
271
- factory method to create instances of the client object, so you may not need to
272
- reference the actual class directly.
273
- See [Creating Clients](#creating-clients).
274
-
275
- In older releases, the credentials object was of class
276
- `Google::Cloud::Container::V1::Credentials`.
277
- In the 1.0 release, the credentials object is of class
278
- `Google::Cloud::Container::V1::ClusterManager::Credentials`.
279
- Again, most users will not need to reference this class directly.
280
- See [Client Configuration](#client-configuration).