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

Commit 5072864

Browse files
feat(v1beta1): add a FastSocket API (#319)
* feat: add a FastSocket API PiperOrigin-RevId: 491381130 Source-Link: googleapis/googleapis@6485d9c Source-Link: https://github.com/googleapis/googleapis-gen/commit/36f17cc94e07623aa384cbd40d694c111e97e41c Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzZmMTdjYzk0ZTA3NjIzYWEzODRjYmQ0MGQ2OTRjMTExZTk3ZTQxYyJ9 * 🦉 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 4d61084 commit 5072864

File tree

4 files changed

+42
-4
lines changed

4 files changed

+42
-4
lines changed

google/cloud/container_v1beta1/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
DnsCacheConfig,
5353
DNSConfig,
5454
EphemeralStorageConfig,
55+
FastSocket,
5556
GatewayAPIConfig,
5657
GcePersistentDiskCsiDriverConfig,
5758
GcfsConfig,
@@ -211,6 +212,7 @@
211212
"DeleteNodePoolRequest",
212213
"DnsCacheConfig",
213214
"EphemeralStorageConfig",
215+
"FastSocket",
214216
"GPUSharingConfig",
215217
"GatewayAPIConfig",
216218
"GcePersistentDiskCsiDriverConfig",

google/cloud/container_v1beta1/types/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
DnsCacheConfig,
4747
DNSConfig,
4848
EphemeralStorageConfig,
49+
FastSocket,
4950
GatewayAPIConfig,
5051
GcePersistentDiskCsiDriverConfig,
5152
GcfsConfig,
@@ -202,6 +203,7 @@
202203
"DnsCacheConfig",
203204
"DNSConfig",
204205
"EphemeralStorageConfig",
206+
"FastSocket",
205207
"GatewayAPIConfig",
206208
"GcePersistentDiskCsiDriverConfig",
207209
"GcfsConfig",

google/cloud/container_v1beta1/types/cluster_service.py

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@
158158
"ResourceUsageExportConfig",
159159
"ShieldedNodes",
160160
"VirtualNIC",
161+
"FastSocket",
161162
"GetOpenIDConfigRequest",
162163
"GetOpenIDConfigResponse",
163164
"GetJSONWebKeysRequest",
@@ -510,6 +511,11 @@ class NodeConfig(proto.Message):
510511
Confidential nodes config.
511512
All the nodes in the node pool will be
512513
Confidential VM once enabled.
514+
fast_socket (google.cloud.container_v1beta1.types.FastSocket):
515+
Enable or disable NCCL fast socket for the
516+
node pool.
517+
518+
This field is a member of `oneof`_ ``_fast_socket``.
513519
resource_labels (MutableMapping[str, str]):
514520
The resource labels for the node pool to use
515521
to annotate any related Google Compute Engine
@@ -645,6 +651,12 @@ class NodeConfig(proto.Message):
645651
number=35,
646652
message="ConfidentialNodes",
647653
)
654+
fast_socket: "FastSocket" = proto.Field(
655+
proto.MESSAGE,
656+
number=36,
657+
optional=True,
658+
message="FastSocket",
659+
)
648660
resource_labels: MutableMapping[str, str] = proto.MapField(
649661
proto.STRING,
650662
proto.STRING,
@@ -1906,9 +1918,8 @@ class BinaryAuthorization(proto.Message):
19061918
EVALUATION_MODE_UNSPECIFIED, this field is ignored.
19071919
evaluation_mode (google.cloud.container_v1beta1.types.BinaryAuthorization.EvaluationMode):
19081920
Mode of operation for binauthz policy
1909-
evaluation. Currently the only options are
1910-
equivalent to enable/disable. If unspecified,
1911-
defaults to DISABLED.
1921+
evaluation. If unspecified, defaults to
1922+
DISABLED.
19121923
"""
19131924

19141925
class EvaluationMode(proto.Enum):
@@ -3670,6 +3681,9 @@ class UpdateNodePoolRequest(proto.Message):
36703681
Confidential VM once enabled.
36713682
gvnic (google.cloud.container_v1beta1.types.VirtualNIC):
36723683
Enable or disable gvnic on the node pool.
3684+
fast_socket (google.cloud.container_v1beta1.types.FastSocket):
3685+
Enable or disable NCCL fast socket for the
3686+
node pool.
36733687
logging_config (google.cloud.container_v1beta1.types.NodePoolLoggingConfig):
36743688
Logging configuration.
36753689
resource_labels (google.cloud.container_v1beta1.types.ResourceLabels):
@@ -3765,6 +3779,11 @@ class UpdateNodePoolRequest(proto.Message):
37653779
number=29,
37663780
message="VirtualNIC",
37673781
)
3782+
fast_socket: "FastSocket" = proto.Field(
3783+
proto.MESSAGE,
3784+
number=31,
3785+
message="FastSocket",
3786+
)
37683787
logging_config: "NodePoolLoggingConfig" = proto.Field(
37693788
proto.MESSAGE,
37703789
number=32,
@@ -7248,6 +7267,21 @@ class VirtualNIC(proto.Message):
72487267
)
72497268

72507269

7270+
class FastSocket(proto.Message):
7271+
r"""Configuration of Fast Socket feature.
7272+
7273+
Attributes:
7274+
enabled (bool):
7275+
Whether Fast Socket features are enabled in
7276+
the node pool.
7277+
"""
7278+
7279+
enabled: bool = proto.Field(
7280+
proto.BOOL,
7281+
number=1,
7282+
)
7283+
7284+
72517285
class GetOpenIDConfigRequest(proto.Message):
72527286
r"""GetOpenIDConfigRequest gets the OIDC discovery document for
72537287
the cluster. See the OpenID Connect Discovery 1.0 specification

scripts/fixup_container_v1beta1_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': ('project_id', 'zone', 'cluster_id', 'update', 'name', ),
7474
'update_master': ('project_id', 'zone', 'cluster_id', 'master_version', 'name', ),
75-
'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', 'logging_config', 'resource_labels', ),
75+
'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', 'fast_socket', 'logging_config', 'resource_labels', ),
7676
}
7777

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

0 commit comments

Comments
 (0)