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

Commit

Permalink
feat(v1beta1): add a FastSocket API (#319)
Browse files Browse the repository at this point in the history
* feat: add a FastSocket API

PiperOrigin-RevId: 491381130

Source-Link: googleapis/googleapis@6485d9c

Source-Link: googleapis/googleapis-gen@36f17cc
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>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] committed Nov 30, 2022
1 parent 4d61084 commit 5072864
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 4 deletions.
2 changes: 2 additions & 0 deletions google/cloud/container_v1beta1/__init__.py
Expand Up @@ -52,6 +52,7 @@
DnsCacheConfig,
DNSConfig,
EphemeralStorageConfig,
FastSocket,
GatewayAPIConfig,
GcePersistentDiskCsiDriverConfig,
GcfsConfig,
Expand Down Expand Up @@ -211,6 +212,7 @@
"DeleteNodePoolRequest",
"DnsCacheConfig",
"EphemeralStorageConfig",
"FastSocket",
"GPUSharingConfig",
"GatewayAPIConfig",
"GcePersistentDiskCsiDriverConfig",
Expand Down
2 changes: 2 additions & 0 deletions google/cloud/container_v1beta1/types/__init__.py
Expand Up @@ -46,6 +46,7 @@
DnsCacheConfig,
DNSConfig,
EphemeralStorageConfig,
FastSocket,
GatewayAPIConfig,
GcePersistentDiskCsiDriverConfig,
GcfsConfig,
Expand Down Expand Up @@ -202,6 +203,7 @@
"DnsCacheConfig",
"DNSConfig",
"EphemeralStorageConfig",
"FastSocket",
"GatewayAPIConfig",
"GcePersistentDiskCsiDriverConfig",
"GcfsConfig",
Expand Down
40 changes: 37 additions & 3 deletions google/cloud/container_v1beta1/types/cluster_service.py
Expand Up @@ -158,6 +158,7 @@
"ResourceUsageExportConfig",
"ShieldedNodes",
"VirtualNIC",
"FastSocket",
"GetOpenIDConfigRequest",
"GetOpenIDConfigResponse",
"GetJSONWebKeysRequest",
Expand Down Expand Up @@ -510,6 +511,11 @@ class NodeConfig(proto.Message):
Confidential nodes config.
All the nodes in the node pool will be
Confidential VM once enabled.
fast_socket (google.cloud.container_v1beta1.types.FastSocket):
Enable or disable NCCL fast socket for the
node pool.
This field is a member of `oneof`_ ``_fast_socket``.
resource_labels (MutableMapping[str, str]):
The resource labels for the node pool to use
to annotate any related Google Compute Engine
Expand Down Expand Up @@ -645,6 +651,12 @@ class NodeConfig(proto.Message):
number=35,
message="ConfidentialNodes",
)
fast_socket: "FastSocket" = proto.Field(
proto.MESSAGE,
number=36,
optional=True,
message="FastSocket",
)
resource_labels: MutableMapping[str, str] = proto.MapField(
proto.STRING,
proto.STRING,
Expand Down Expand Up @@ -1906,9 +1918,8 @@ class BinaryAuthorization(proto.Message):
EVALUATION_MODE_UNSPECIFIED, this field is ignored.
evaluation_mode (google.cloud.container_v1beta1.types.BinaryAuthorization.EvaluationMode):
Mode of operation for binauthz policy
evaluation. Currently the only options are
equivalent to enable/disable. If unspecified,
defaults to DISABLED.
evaluation. If unspecified, defaults to
DISABLED.
"""

class EvaluationMode(proto.Enum):
Expand Down Expand Up @@ -3670,6 +3681,9 @@ class UpdateNodePoolRequest(proto.Message):
Confidential VM once enabled.
gvnic (google.cloud.container_v1beta1.types.VirtualNIC):
Enable or disable gvnic on the node pool.
fast_socket (google.cloud.container_v1beta1.types.FastSocket):
Enable or disable NCCL fast socket for the
node pool.
logging_config (google.cloud.container_v1beta1.types.NodePoolLoggingConfig):
Logging configuration.
resource_labels (google.cloud.container_v1beta1.types.ResourceLabels):
Expand Down Expand Up @@ -3765,6 +3779,11 @@ class UpdateNodePoolRequest(proto.Message):
number=29,
message="VirtualNIC",
)
fast_socket: "FastSocket" = proto.Field(
proto.MESSAGE,
number=31,
message="FastSocket",
)
logging_config: "NodePoolLoggingConfig" = proto.Field(
proto.MESSAGE,
number=32,
Expand Down Expand Up @@ -7248,6 +7267,21 @@ class VirtualNIC(proto.Message):
)


class FastSocket(proto.Message):
r"""Configuration of Fast Socket feature.
Attributes:
enabled (bool):
Whether Fast Socket features are enabled in
the node pool.
"""

enabled: bool = proto.Field(
proto.BOOL,
number=1,
)


class GetOpenIDConfigRequest(proto.Message):
r"""GetOpenIDConfigRequest gets the OIDC discovery document for
the cluster. See the OpenID Connect Discovery 1.0 specification
Expand Down
2 changes: 1 addition & 1 deletion scripts/fixup_container_v1beta1_keywords.py
Expand Up @@ -72,7 +72,7 @@ class containerCallTransformer(cst.CSTTransformer):
'start_ip_rotation': ('project_id', 'zone', 'cluster_id', 'name', 'rotate_credentials', ),
'update_cluster': ('project_id', 'zone', 'cluster_id', 'update', 'name', ),
'update_master': ('project_id', 'zone', 'cluster_id', 'master_version', 'name', ),
'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', ),
'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', ),
}

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

0 comments on commit 5072864

Please sign in to comment.