google-cloud-container 1.5.0 → 1.6.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: 58e2188439f9b8c21985f2f7672ecc257655529eed1600081cad725930274c6a
4
- data.tar.gz: e6a221d73bee3f9f3fbbbd86529529aba517b8b02425b900edc0d0a2d1b0c16b
3
+ metadata.gz: 1d63c2852013e21dbc4ce7a00e3e04679a3690e564fbec11223e542af261589f
4
+ data.tar.gz: 7a63ca66affb5ab70ee096dd098f05fc2b0283896e5ab101eef31c07b55a65ee
5
5
  SHA512:
6
- metadata.gz: 5834f7a5313eeaf10a56f246bc1812dca35881399f87f4a1903fbfe6c74026b2b9a557a5bc82bf6f3528f12e34355de3dd2b6189cd9d95689cae7984cca21095
7
- data.tar.gz: dd4cca6e41e33fef5011064922eb577f9e4234e1ba1ff793e0ccff72af26c946932a68c74ad8d31ff6bbe1789272b0cca2d33b285bb3245c0e01dd8fdd310cee
6
+ metadata.gz: d5ba8a0b795537ed3fd62b7b8da48e15a2779e93375f1036d392bf721630cd116b34a41abea43f24bf99849d88fcb9a2f6a0905972fdfecb80eb4a5350ea16dc
7
+ data.tar.gz: 1cb4b7baf3ee076d557211ff242a9dbfcbaee74553084a5838ddd1d772b7819153175e0b7dbeeb1d73bb75158851322f5d8bf6f159657beebeb16b4fbbe06435
data/README.md CHANGED
@@ -43,35 +43,40 @@ and includes substantial interface changes. Existing code written for earlier
43
43
  versions of this library will likely require updates to use this version.
44
44
  See the {file:MIGRATING.md MIGRATING.md} document for more information.
45
45
 
46
- ## Enabling Logging
47
-
48
- To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
49
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
50
- or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest)
51
- that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
52
- and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
53
-
54
- Configuring a Ruby stdlib logger:
55
-
56
- ```ruby
57
- require "logger"
58
-
59
- module MyLogger
60
- LOGGER = Logger.new $stderr, level: Logger::WARN
61
- def logger
62
- LOGGER
63
- end
64
- end
65
-
66
- # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
67
- module GRPC
68
- extend MyLogger
69
- end
70
- ```
46
+ ## Debug Logging
47
+
48
+ This library comes with opt-in Debug Logging that can help you troubleshoot
49
+ your application's integration with the API. When logging is activated, key
50
+ events such as requests and responses, along with data payloads and metadata
51
+ such as headers and client configuration, are logged to the standard error
52
+ stream.
53
+
54
+ **WARNING:** Client Library Debug Logging includes your data payloads in
55
+ plaintext, which could include sensitive data such as PII for yourself or your
56
+ customers, private keys, or other security data that could be compromising if
57
+ leaked. Always practice good data hygiene with your application logs, and follow
58
+ the principle of least access. Google also recommends that Client Library Debug
59
+ Logging be enabled only temporarily during active debugging, and not used
60
+ permanently in production.
61
+
62
+ To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
63
+ to the value `all`. Alternatively, you can set the value to a comma-delimited
64
+ list of client library gem names. This will select the default logging behavior,
65
+ which writes logs to the standard error stream. On a local workstation, this may
66
+ result in logs appearing on the console. When running on a Google Cloud hosting
67
+ service such as [Google Cloud Run](https://cloud.google.com/run), this generally
68
+ results in logs appearing alongside your application logs in the
69
+ [Google Cloud Logging](https://cloud.google.com/logging/) service.
70
+
71
+ Debug logging also requires that the versioned clients for this service be
72
+ sufficiently recent, released after about Dec 10, 2024. If logging is not
73
+ 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).
71
76
 
72
77
  ## Supported Ruby Versions
73
78
 
74
- This library is supported on Ruby 2.7+.
79
+ This library is supported on Ruby 3.0+.
75
80
 
76
81
  Google provides official support for Ruby versions that are actively supported
77
82
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module Container
23
- VERSION = "1.5.0"
23
+ VERSION = "1.6.0"
24
24
  end
25
25
  end
26
26
  end
@@ -56,6 +56,11 @@ module Google
56
56
  # supported by that API version, and the corresponding gem is available, the
57
57
  # appropriate versioned client will be returned.
58
58
  #
59
+ # Raises an exception if the currently installed versioned client gem for the
60
+ # given API version does not support the ClusterManager service.
61
+ # You can determine whether the method will succeed by calling
62
+ # {Google::Cloud::Container.cluster_manager_available?}.
63
+ #
59
64
  # ## About ClusterManager
60
65
  #
61
66
  # Google Kubernetes Engine Cluster Manager v1
@@ -75,6 +80,32 @@ module Google
75
80
  service_module.const_get(:Client).new(&block)
76
81
  end
77
82
 
83
+ ##
84
+ # Determines whether the ClusterManager service is supported by the current client.
85
+ # If true, you can retrieve a client object by calling {Google::Cloud::Container.cluster_manager}.
86
+ # If false, that method will raise an exception. This could happen if the given
87
+ # API version does not exist or does not support the ClusterManager service,
88
+ # or if the versioned client gem needs an update to support the ClusterManager service.
89
+ #
90
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
91
+ # Defaults to `:v1`.
92
+ # @return [boolean] Whether the service is available.
93
+ #
94
+ def self.cluster_manager_available? version: :v1
95
+ require "google/cloud/container/#{version.to_s.downcase}"
96
+ package_name = Google::Cloud::Container
97
+ .constants
98
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
99
+ .first
100
+ return false unless package_name
101
+ service_module = Google::Cloud::Container.const_get package_name
102
+ return false unless service_module.const_defined? :ClusterManager
103
+ service_module = service_module.const_get :ClusterManager
104
+ service_module.const_defined? :Client
105
+ rescue ::LoadError
106
+ false
107
+ end
108
+
78
109
  ##
79
110
  # Configure the google-cloud-container library.
80
111
  #
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-container
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-02-26 00:00:00.000000000 Z
10
+ date: 2025-01-29 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: google-cloud-container-v1
@@ -83,7 +82,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
83
82
  licenses:
84
83
  - Apache-2.0
85
84
  metadata: {}
86
- post_install_message:
87
85
  rdoc_options: []
88
86
  require_paths:
89
87
  - lib
@@ -91,15 +89,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
91
89
  requirements:
92
90
  - - ">="
93
91
  - !ruby/object:Gem::Version
94
- version: '2.7'
92
+ version: '3.0'
95
93
  required_rubygems_version: !ruby/object:Gem::Requirement
96
94
  requirements:
97
95
  - - ">="
98
96
  - !ruby/object:Gem::Version
99
97
  version: '0'
100
98
  requirements: []
101
- rubygems_version: 3.5.6
102
- signing_key:
99
+ rubygems_version: 3.6.2
103
100
  specification_version: 4
104
101
  summary: API Client library for the Kubernetes Engine API
105
102
  test_files: []