google-cloud-container-v1beta1 0.51.1 → 0.52.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 44dcda218d61125e17f9e539c7b9bc5b195cd11a52722f93531eb8a3f077ca7a
4
- data.tar.gz: 5e918460a1f50b2d81954a1a8fd471f9d7cd3bc36953aba9a4c6e08d3c6439c8
3
+ metadata.gz: 42af6f095c4efacfe1f7c6fa0c05b5cee13b8a413d3fabdc5b71aec4145066a1
4
+ data.tar.gz: cf89f83a7e750502277d5aea14764d68e6aaeb00e9f0cc515d6699924291f147
5
5
  SHA512:
6
- metadata.gz: 6e1206a6090cb57e8e2f86dfeab365dc6ee908a3f6d50d18a8fdddb801b6efc82dcce208892c72fe84572d9534976bf74add09450a0e12854a05606763cb82f8
7
- data.tar.gz: 2a955d4b153b8207b5ab0156b7e15586791a5be068599b11c562deba4ec35010a7b210f4ee2ac1f5c51fefc234add787c69874a6784bea50cc19dd2c76d31535
6
+ metadata.gz: 6e01a264d83ca6dc978c5e2a78828ce5e907030e93126cb1893634b9fd8ab283a47ee77ddf1200cf4373244afc748de32309a0819e1a5d422b8158c8216e2990
7
+ data.tar.gz: 4f7a36528650d5327565907609608dc3b5158da4d0629e82694682e9d3a59aa9f9c317f4dc80515d201e0816529feb622a46f5ffd8b3053207f23f201e578ee6
@@ -699,7 +699,7 @@ module Google
699
699
  # @param options [::Gapic::CallOptions, ::Hash]
700
700
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
701
701
  #
702
- # @overload update_node_pool(project_id: nil, zone: nil, cluster_id: nil, node_pool_id: nil, node_version: nil, image_type: nil, locations: nil, workload_metadata_config: nil, name: nil, upgrade_settings: nil, tags: nil, taints: nil, labels: nil, linux_node_config: nil, kubelet_config: nil, node_network_config: nil, gcfs_config: nil, confidential_nodes: nil, gvnic: nil, etag: nil, fast_socket: nil, logging_config: nil, resource_labels: nil, windows_node_config: nil, accelerators: nil, machine_type: nil, disk_type: nil, disk_size_gb: nil, resource_manager_tags: nil, containerd_config: nil, queued_provisioning: nil, storage_pools: nil, max_run_duration: nil, flex_start: nil, boot_disk: nil)
702
+ # @overload update_node_pool(project_id: nil, zone: nil, cluster_id: nil, node_pool_id: nil, node_version: nil, image_type: nil, locations: nil, workload_metadata_config: nil, name: nil, upgrade_settings: nil, tags: nil, taints: nil, labels: nil, linux_node_config: nil, kubelet_config: nil, node_network_config: nil, gcfs_config: nil, confidential_nodes: nil, gvnic: nil, etag: nil, fast_socket: nil, logging_config: nil, resource_labels: nil, windows_node_config: nil, accelerators: nil, machine_type: nil, disk_type: nil, disk_size_gb: nil, resource_manager_tags: nil, containerd_config: nil, queued_provisioning: nil, storage_pools: nil, max_run_duration: nil, flex_start: nil, boot_disk: nil, node_drain_config: nil, consolidation_delay: nil)
703
703
  # Pass arguments to `update_node_pool` via keyword arguments. Note that at
704
704
  # least one keyword argument is required. To specify no parameters, or to keep all
705
705
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -834,6 +834,12 @@ module Google
834
834
  # The desired boot disk config for nodes in the node pool.
835
835
  # Initiates an upgrade operation that migrates the nodes in the
836
836
  # node pool to the specified boot disk config.
837
+ # @param node_drain_config [::Google::Cloud::Container::V1beta1::NodePool::NodeDrainConfig, ::Hash]
838
+ # The desired node drain configuration for nodes in the node pool.
839
+ # @param consolidation_delay [::Google::Protobuf::Duration, ::Hash]
840
+ # Consolidation delay defines duration after which the Cluster Autoscaler can
841
+ # scale down underutilized nodes. If not set, nodes are scaled down by
842
+ # default behavior, i.e. according to the chosen autoscaling profile.
837
843
  #
838
844
  # @yield [response, operation] Access the result along with the RPC operation
839
845
  # @yieldparam response [::Google::Cloud::Container::V1beta1::Operation]
@@ -4096,6 +4102,95 @@ module Google
4096
4102
  raise ::Google::Cloud::Error.from_error(e)
4097
4103
  end
4098
4104
 
4105
+ ##
4106
+ # CompleteControlPlaneUpgrade completes the rollback-safe upgrade by
4107
+ # performing the step two upgrade for a specific cluster.
4108
+ #
4109
+ # @overload complete_control_plane_upgrade(request, options = nil)
4110
+ # Pass arguments to `complete_control_plane_upgrade` via a request object, either of type
4111
+ # {::Google::Cloud::Container::V1beta1::CompleteControlPlaneUpgradeRequest} or an equivalent Hash.
4112
+ #
4113
+ # @param request [::Google::Cloud::Container::V1beta1::CompleteControlPlaneUpgradeRequest, ::Hash]
4114
+ # A request object representing the call parameters. Required. To specify no
4115
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
4116
+ # @param options [::Gapic::CallOptions, ::Hash]
4117
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
4118
+ #
4119
+ # @overload complete_control_plane_upgrade(name: nil, version: nil)
4120
+ # Pass arguments to `complete_control_plane_upgrade` via keyword arguments. Note that at
4121
+ # least one keyword argument is required. To specify no parameters, or to keep all
4122
+ # the default parameter values, pass an empty Hash as a request object (see above).
4123
+ #
4124
+ # @param name [::String]
4125
+ # The name (project, location, cluster) of the cluster to complete upgrade.
4126
+ # Specified in the format `projects/*/locations/*/clusters/*`.
4127
+ # @param version [::String]
4128
+ # API request version that initiates this operation.
4129
+ #
4130
+ # @yield [response, operation] Access the result along with the RPC operation
4131
+ # @yieldparam response [::Google::Cloud::Container::V1beta1::Operation]
4132
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
4133
+ #
4134
+ # @return [::Google::Cloud::Container::V1beta1::Operation]
4135
+ #
4136
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
4137
+ #
4138
+ # @example Basic example
4139
+ # require "google/cloud/container/v1beta1"
4140
+ #
4141
+ # # Create a client object. The client can be reused for multiple calls.
4142
+ # client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new
4143
+ #
4144
+ # # Create a request. To set request fields, pass in keyword arguments.
4145
+ # request = Google::Cloud::Container::V1beta1::CompleteControlPlaneUpgradeRequest.new
4146
+ #
4147
+ # # Call the complete_control_plane_upgrade method.
4148
+ # result = client.complete_control_plane_upgrade request
4149
+ #
4150
+ # # The returned object is of type Google::Cloud::Container::V1beta1::Operation.
4151
+ # p result
4152
+ #
4153
+ def complete_control_plane_upgrade request, options = nil
4154
+ raise ::ArgumentError, "request must be provided" if request.nil?
4155
+
4156
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1beta1::CompleteControlPlaneUpgradeRequest
4157
+
4158
+ # Converts hash and nil to an options object
4159
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
4160
+
4161
+ # Customize the options with defaults
4162
+ metadata = @config.rpcs.complete_control_plane_upgrade.metadata.to_h
4163
+
4164
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
4165
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
4166
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
4167
+ gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
4168
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
4169
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
4170
+
4171
+ header_params = {}
4172
+ if request.name
4173
+ header_params["name"] = request.name
4174
+ end
4175
+
4176
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
4177
+ metadata[:"x-goog-request-params"] ||= request_params_header
4178
+
4179
+ options.apply_defaults timeout: @config.rpcs.complete_control_plane_upgrade.timeout,
4180
+ metadata: metadata,
4181
+ retry_policy: @config.rpcs.complete_control_plane_upgrade.retry_policy
4182
+
4183
+ options.apply_defaults timeout: @config.timeout,
4184
+ metadata: @config.metadata,
4185
+ retry_policy: @config.retry_policy
4186
+
4187
+ @cluster_manager_stub.call_rpc :complete_control_plane_upgrade, request, options: options do |response, operation|
4188
+ yield response, operation if block_given?
4189
+ end
4190
+ rescue ::GRPC::BadStatus => e
4191
+ raise ::Google::Cloud::Error.from_error(e)
4192
+ end
4193
+
4099
4194
  ##
4100
4195
  # Configuration class for the ClusterManager API.
4101
4196
  #
@@ -4464,6 +4559,11 @@ module Google
4464
4559
  # @return [::Gapic::Config::Method]
4465
4560
  #
4466
4561
  attr_reader :fetch_node_pool_upgrade_info
4562
+ ##
4563
+ # RPC-specific configuration for `complete_control_plane_upgrade`
4564
+ # @return [::Gapic::Config::Method]
4565
+ #
4566
+ attr_reader :complete_control_plane_upgrade
4467
4567
 
4468
4568
  # @private
4469
4569
  def initialize parent_rpcs = nil
@@ -4541,6 +4641,8 @@ module Google
4541
4641
  @fetch_cluster_upgrade_info = ::Gapic::Config::Method.new fetch_cluster_upgrade_info_config
4542
4642
  fetch_node_pool_upgrade_info_config = parent_rpcs.fetch_node_pool_upgrade_info if parent_rpcs.respond_to? :fetch_node_pool_upgrade_info
4543
4643
  @fetch_node_pool_upgrade_info = ::Gapic::Config::Method.new fetch_node_pool_upgrade_info_config
4644
+ complete_control_plane_upgrade_config = parent_rpcs.complete_control_plane_upgrade if parent_rpcs.respond_to? :complete_control_plane_upgrade
4645
+ @complete_control_plane_upgrade = ::Gapic::Config::Method.new complete_control_plane_upgrade_config
4544
4646
 
4545
4647
  yield self if block_given?
4546
4648
  end
@@ -66,6 +66,25 @@ module Google
66
66
  "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}/cryptoKeyVersions/#{crypto_key_version}"
67
67
  end
68
68
 
69
+ ##
70
+ # Create a fully-qualified Subnetwork resource string.
71
+ #
72
+ # The resource will be in the following format:
73
+ #
74
+ # `projects/{project}/regions/{region}/subnetworks/{subnetwork}`
75
+ #
76
+ # @param project [String]
77
+ # @param region [String]
78
+ # @param subnetwork [String]
79
+ #
80
+ # @return [::String]
81
+ def subnetwork_path project:, region:, subnetwork:
82
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
83
+ raise ::ArgumentError, "region cannot contain /" if region.to_s.include? "/"
84
+
85
+ "projects/#{project}/regions/#{region}/subnetworks/#{subnetwork}"
86
+ end
87
+
69
88
  ##
70
89
  # Create a fully-qualified Topic resource string.
71
90
  #
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Container
23
23
  module V1beta1
24
- VERSION = "0.51.1"
24
+ VERSION = "0.52.0"
25
25
  end
26
26
  end
27
27
  end