Skip to content
This repository was archived by the owner on Nov 29, 2023. It is now read-only.

Commit a1e508c

Browse files
feat: add machine_type, disk_type, disk_size_gb fields to UpdateNodePoolRequest (#408)
* feat: add support for NodeConfig Update --- feat: publicize tpu topology in v1 API PiperOrigin-RevId: 560116372 Source-Link: googleapis/googleapis@cf6f9ee Source-Link: https://github.com/googleapis/googleapis-gen/commit/b618aafa641741a5615c216b87860065bdc30f8d Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjYxOGFhZmE2NDE3NDFhNTYxNWMyMTZiODc4NjAwNjViZGMzMGY4ZCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: add UpdateNodePoolRequest.machine_type, disk_type, disk_size_gb PiperOrigin-RevId: 560146115 Source-Link: googleapis/googleapis@35ffd82 Source-Link: https://github.com/googleapis/googleapis-gen/commit/0b4e0dc4207935cc9feaabec93b1741ff24681ad Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMGI0ZTBkYzQyMDc5MzVjYzlmZWFhYmVjOTNiMTc0MWZmMjQ2ODFhZCJ9 * 🦉 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 af62348 commit a1e508c

File tree

6 files changed

+68
-4
lines changed

6 files changed

+68
-4
lines changed

google/cloud/container_v1/types/cluster_service.py

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4286,6 +4286,24 @@ class UpdateNodePoolRequest(proto.Message):
42864286
windows_node_config (google.cloud.container_v1.types.WindowsNodeConfig):
42874287
Parameters that can be configured on Windows
42884288
nodes.
4289+
machine_type (str):
4290+
Optional. The desired `Google Compute Engine machine
4291+
type <https://cloud.google.com/compute/docs/machine-types>`__
4292+
for nodes in the node pool. Initiates an upgrade operation
4293+
that migrates the nodes in the node pool to the specified
4294+
machine type.
4295+
disk_type (str):
4296+
Optional. The desired disk type (e.g.
4297+
'pd-standard', 'pd-ssd' or 'pd-balanced') for
4298+
nodes in the node pool. Initiates an upgrade
4299+
operation that migrates the nodes in the node
4300+
pool to the specified disk type.
4301+
disk_size_gb (int):
4302+
Optional. The desired disk size for nodes in
4303+
the node pool specified in GB. The smallest
4304+
allowed disk size is 10GB. Initiates an upgrade
4305+
operation that migrates the nodes in the node
4306+
pool to the specified disk size.
42894307
"""
42904308

42914309
project_id: str = proto.Field(
@@ -4399,6 +4417,18 @@ class UpdateNodePoolRequest(proto.Message):
43994417
number=34,
44004418
message="WindowsNodeConfig",
44014419
)
4420+
machine_type: str = proto.Field(
4421+
proto.STRING,
4422+
number=36,
4423+
)
4424+
disk_type: str = proto.Field(
4425+
proto.STRING,
4426+
number=37,
4427+
)
4428+
disk_size_gb: int = proto.Field(
4429+
proto.INT64,
4430+
number=38,
4431+
)
44024432

44034433

44044434
class SetNodePoolAutoscalingRequest(proto.Message):
@@ -5787,6 +5817,9 @@ class PlacementPolicy(proto.Message):
57875817
Attributes:
57885818
type_ (google.cloud.container_v1.types.NodePool.PlacementPolicy.Type):
57895819
The type of placement.
5820+
tpu_topology (str):
5821+
Optional. TPU placement topology for pod slice node pool.
5822+
https://cloud.google.com/tpu/docs/types-topologies#tpu_topologies
57905823
policy_name (str):
57915824
If set, refers to the name of a custom
57925825
resource policy supplied by the user. The
@@ -5815,6 +5848,10 @@ class Type(proto.Enum):
58155848
number=1,
58165849
enum="NodePool.PlacementPolicy.Type",
58175850
)
5851+
tpu_topology: str = proto.Field(
5852+
proto.STRING,
5853+
number=2,
5854+
)
58185855
policy_name: str = proto.Field(
58195856
proto.STRING,
58205857
number=3,

google/cloud/container_v1beta1/types/cluster_service.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4904,6 +4904,21 @@ class UpdateNodePoolRequest(proto.Message):
49044904
windows_node_config (google.cloud.container_v1beta1.types.WindowsNodeConfig):
49054905
Parameters that can be configured on Windows
49064906
nodes.
4907+
machine_type (str):
4908+
Optional. The desired machine type for nodes
4909+
in the node pool. Initiates an upgrade operation
4910+
that migrates the nodes in the node pool to the
4911+
specified machine type.
4912+
disk_type (str):
4913+
Optional. The desired disk type for nodes in
4914+
the node pool. Initiates an upgrade operation
4915+
that migrates the nodes in the node pool to the
4916+
specified disk type.
4917+
disk_size_gb (int):
4918+
Optional. The desired disk size for nodes in
4919+
the node pool. Initiates an upgrade operation
4920+
that migrates the nodes in the node pool to the
4921+
specified disk size.
49074922
"""
49084923

49094924
project_id: str = proto.Field(
@@ -5017,6 +5032,18 @@ class UpdateNodePoolRequest(proto.Message):
50175032
number=34,
50185033
message="WindowsNodeConfig",
50195034
)
5035+
machine_type: str = proto.Field(
5036+
proto.STRING,
5037+
number=36,
5038+
)
5039+
disk_type: str = proto.Field(
5040+
proto.STRING,
5041+
number=37,
5042+
)
5043+
disk_size_gb: int = proto.Field(
5044+
proto.INT64,
5045+
number=38,
5046+
)
50205047

50215048

50225049
class SetNodePoolAutoscalingRequest(proto.Message):

samples/generated_samples/snippet_metadata_google.container.v1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-container",
11-
"version": "2.30.0"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

samples/generated_samples/snippet_metadata_google.container.v1beta1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-container",
11-
"version": "2.30.0"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

scripts/fixup_container_v1_keywords.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class containerCallTransformer(cst.CSTTransformer):
7272
'start_ip_rotation': ('project_id', 'zone', 'cluster_id', 'name', 'rotate_credentials', ),
7373
'update_cluster': ('update', 'project_id', 'zone', 'cluster_id', 'name', ),
7474
'update_master': ('master_version', 'project_id', 'zone', 'cluster_id', 'name', ),
75-
'update_node_pool': ('node_version', 'image_type', 'project_id', 'zone', 'cluster_id', 'node_pool_id', 'name', 'locations', 'workload_metadata_config', 'upgrade_settings', 'tags', 'taints', 'labels', 'linux_node_config', 'kubelet_config', 'node_network_config', 'gcfs_config', 'confidential_nodes', 'gvnic', 'etag', 'fast_socket', 'logging_config', 'resource_labels', 'windows_node_config', ),
75+
'update_node_pool': ('node_version', 'image_type', 'project_id', 'zone', 'cluster_id', 'node_pool_id', 'name', 'locations', 'workload_metadata_config', 'upgrade_settings', 'tags', 'taints', 'labels', 'linux_node_config', 'kubelet_config', 'node_network_config', 'gcfs_config', 'confidential_nodes', 'gvnic', 'etag', 'fast_socket', 'logging_config', 'resource_labels', 'windows_node_config', 'machine_type', 'disk_type', 'disk_size_gb', ),
7676
}
7777

7878
def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode:

scripts/fixup_container_v1beta1_keywords.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class containerCallTransformer(cst.CSTTransformer):
7373
'start_ip_rotation': ('project_id', 'zone', 'cluster_id', 'name', 'rotate_credentials', ),
7474
'update_cluster': ('project_id', 'zone', 'cluster_id', 'update', 'name', ),
7575
'update_master': ('project_id', 'zone', 'cluster_id', 'master_version', 'name', ),
76-
'update_node_pool': ('project_id', 'zone', 'cluster_id', 'node_pool_id', 'node_version', 'image_type', 'locations', 'workload_metadata_config', 'name', 'upgrade_settings', 'tags', 'taints', 'labels', 'linux_node_config', 'kubelet_config', 'node_network_config', 'gcfs_config', 'confidential_nodes', 'gvnic', 'etag', 'fast_socket', 'logging_config', 'resource_labels', 'windows_node_config', ),
76+
'update_node_pool': ('project_id', 'zone', 'cluster_id', 'node_pool_id', 'node_version', 'image_type', 'locations', 'workload_metadata_config', 'name', 'upgrade_settings', 'tags', 'taints', 'labels', 'linux_node_config', 'kubelet_config', 'node_network_config', 'gcfs_config', 'confidential_nodes', 'gvnic', 'etag', 'fast_socket', 'logging_config', 'resource_labels', 'windows_node_config', 'machine_type', 'disk_type', 'disk_size_gb', ),
7777
}
7878

7979
def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode:

0 commit comments

Comments
 (0)