Skip to content

Commit 5145292

Browse files
feat: Add GPUDirectConfig to configure GPU Direct for node pools (#32389)
* feat: Add GPUDirectConfig to configure GPU Direct for node pools feat: Add consolidation_delay to configure Cluster Autoscaler node consolidation delay feat: Add RegistryHostConfig to ContainerdConfig for containerd registry host configuration feat: Add SliceControllerConfig to AddonsConfig to manage the Slice Controller addon feat: Add NodeDrainConfig to NodePool to configure node draining behavior feat: Add AutopilotGeneralProfile to ClusterAutoscaling to configure Autopilot profiles feat: Add SHORT_LIVED as a NodePoolUpdateStrategy feat: Add DRAINING status to AdditionalIPRangesConfig for subnet draining feat: Allow specifying subnetwork in NodeNetworkConfig during node pool creation feat: Add DisruptionEvent to provide details on node disruption events feat: Add ManagedOpenTelemetryConfig to Cluster to manage the OpenTelemetry pipeline feat: Add fields for Rollback-Safe upgrades, including RollbackSafeUpgrade, CompatibilityStatus, and CompleteControlPlaneUpgrade RPC feat: Add shutdown_grace_period_seconds and shutdown_grace_period_critical_pods_seconds to NodeKubeletConfig to configure graceful node shutdown for Spot VMs feat: Add PodSnapshotConfig to AddonsConfig to manage Pod Snapshots docs: A comment for field `sysctls` in message `.google.container.v1beta1.LinuxNodeConfig` is changed docs: A comment for field `subnetwork` in message `.google.container.v1beta1.NodeNetworkConfig` is changed docs: A comment for field `enable_legacy_lustre_port` in message `.google.container.v1beta1.LustreCsiDriverConfig` is changed docs: A comment for field `cluster_ipv4_cidr_block` in message `.google.container.v1beta1.IPAllocationPolicy` is changed docs: A comment for field `node_ipv4_cidr_block` in message `.google.container.v1beta1.IPAllocationPolicy` is changed docs: A comment for field `services_ipv4_cidr_block` in message `.google.container.v1beta1.IPAllocationPolicy` is changed docs: A comment for field `tpu_ipv4_cidr_block` in message `.google.container.v1beta1.IPAllocationPolicy` is changed docs: A comment for field `cluster_ipv4_cidr` in message `.google.container.v1beta1.Cluster` is changed docs: A comment for field `services_ipv4_cidr` in message `.google.container.v1beta1.Cluster` is changed docs: A comment for field `tpu_ipv4_cidr_block` in message `.google.container.v1beta1.Cluster` is change PiperOrigin-RevId: 859828557 Source-Link: googleapis/googleapis@6406df7 Source-Link: googleapis/googleapis-gen@baa9506 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWNvbnRhaW5lci12MWJldGExLy5Pd2xCb3QueWFtbCIsImgiOiJiYWE5NTA2MjkxODQ5NzI5ZWVkNGMyNDc1MTBkMDRhNjAxMTE1ZjhlIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent f56ff5e commit 5145292

11 files changed

Lines changed: 797 additions & 19 deletions

File tree

google-cloud-container-v1beta1/.owlbot-manifest.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"snippets/Gemfile",
4040
"snippets/cluster_manager/cancel_operation.rb",
4141
"snippets/cluster_manager/check_autopilot_compatibility.rb",
42+
"snippets/cluster_manager/complete_control_plane_upgrade.rb",
4243
"snippets/cluster_manager/complete_ip_rotation.rb",
4344
"snippets/cluster_manager/complete_node_pool_upgrade.rb",
4445
"snippets/cluster_manager/create_cluster.rb",

google-cloud-container-v1beta1/gapic_metadata.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,11 @@
194194
"methods": [
195195
"fetch_node_pool_upgrade_info"
196196
]
197+
},
198+
"CompleteControlPlaneUpgrade": {
199+
"methods": [
200+
"complete_control_plane_upgrade"
201+
]
197202
}
198203
}
199204
}

google-cloud-container-v1beta1/lib/google/cloud/container/v1beta1/cluster_manager/client.rb

Lines changed: 103 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ def update_cluster request, options = nil
699699
# @param options [::Gapic::CallOptions, ::Hash]
700700
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
701701
#
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)
703703
# Pass arguments to `update_node_pool` via keyword arguments. Note that at
704704
# least one keyword argument is required. To specify no parameters, or to keep all
705705
# the default parameter values, pass an empty Hash as a request object (see above).
@@ -834,6 +834,12 @@ def update_cluster request, options = nil
834834
# The desired boot disk config for nodes in the node pool.
835835
# Initiates an upgrade operation that migrates the nodes in the
836836
# 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.
837843
#
838844
# @yield [response, operation] Access the result along with the RPC operation
839845
# @yieldparam response [::Google::Cloud::Container::V1beta1::Operation]
@@ -4096,6 +4102,95 @@ def fetch_node_pool_upgrade_info request, options = nil
40964102
raise ::Google::Cloud::Error.from_error(e)
40974103
end
40984104

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+
40994194
##
41004195
# Configuration class for the ClusterManager API.
41014196
#
@@ -4464,6 +4559,11 @@ class Rpcs
44644559
# @return [::Gapic::Config::Method]
44654560
#
44664561
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
44674567

44684568
# @private
44694569
def initialize parent_rpcs = nil
@@ -4541,6 +4641,8 @@ def initialize parent_rpcs = nil
45414641
@fetch_cluster_upgrade_info = ::Gapic::Config::Method.new fetch_cluster_upgrade_info_config
45424642
fetch_node_pool_upgrade_info_config = parent_rpcs.fetch_node_pool_upgrade_info if parent_rpcs.respond_to? :fetch_node_pool_upgrade_info
45434643
@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
45444646

45454647
yield self if block_given?
45464648
end

google-cloud-container-v1beta1/lib/google/cloud/container/v1beta1/cluster_manager/paths.rb

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,25 @@ def crypto_key_version_path project:, location:, key_ring:, crypto_key:, crypto_
6666
"projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}/cryptoKeyVersions/#{crypto_key_version}"
6767
end
6868

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+
6988
##
7089
# Create a fully-qualified Topic resource string.
7190
#

google-cloud-container-v1beta1/lib/google/container/v1beta1/cluster_service_pb.rb

Lines changed: 24 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

google-cloud-container-v1beta1/lib/google/container/v1beta1/cluster_service_services_pb.rb

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)