diff --git a/google/cloud/container/__init__.py b/google/cloud/container/__init__.py index bfbbb4be..133ec009 100644 --- a/google/cloud/container/__init__.py +++ b/google/cloud/container/__init__.py @@ -26,6 +26,8 @@ ) from google.cloud.container_v1.types.cluster_service import ( AcceleratorConfig, + AdditionalNodeNetworkConfig, + AdditionalPodNetworkConfig, AdditionalPodRangesConfig, AddonsConfig, AdvancedDatapathObservabilityConfig, @@ -191,6 +193,8 @@ "ClusterManagerClient", "ClusterManagerAsyncClient", "AcceleratorConfig", + "AdditionalNodeNetworkConfig", + "AdditionalPodNetworkConfig", "AdditionalPodRangesConfig", "AddonsConfig", "AdvancedDatapathObservabilityConfig", diff --git a/google/cloud/container_v1/__init__.py b/google/cloud/container_v1/__init__.py index f6251cee..563c5b82 100644 --- a/google/cloud/container_v1/__init__.py +++ b/google/cloud/container_v1/__init__.py @@ -21,6 +21,8 @@ from .services.cluster_manager import ClusterManagerAsyncClient, ClusterManagerClient from .types.cluster_service import ( AcceleratorConfig, + AdditionalNodeNetworkConfig, + AdditionalPodNetworkConfig, AdditionalPodRangesConfig, AddonsConfig, AdvancedDatapathObservabilityConfig, @@ -185,6 +187,8 @@ __all__ = ( "ClusterManagerAsyncClient", "AcceleratorConfig", + "AdditionalNodeNetworkConfig", + "AdditionalPodNetworkConfig", "AdditionalPodRangesConfig", "AddonsConfig", "AdvancedDatapathObservabilityConfig", diff --git a/google/cloud/container_v1/types/__init__.py b/google/cloud/container_v1/types/__init__.py index 5e7edfe2..88c4b4c2 100644 --- a/google/cloud/container_v1/types/__init__.py +++ b/google/cloud/container_v1/types/__init__.py @@ -15,6 +15,8 @@ # from .cluster_service import ( AcceleratorConfig, + AdditionalNodeNetworkConfig, + AdditionalPodNetworkConfig, AdditionalPodRangesConfig, AddonsConfig, AdvancedDatapathObservabilityConfig, @@ -178,6 +180,8 @@ __all__ = ( "AcceleratorConfig", + "AdditionalNodeNetworkConfig", + "AdditionalPodNetworkConfig", "AdditionalPodRangesConfig", "AddonsConfig", "AdvancedDatapathObservabilityConfig", diff --git a/google/cloud/container_v1/types/cluster_service.py b/google/cloud/container_v1/types/cluster_service.py index 55a353ef..7347bd75 100644 --- a/google/cloud/container_v1/types/cluster_service.py +++ b/google/cloud/container_v1/types/cluster_service.py @@ -39,6 +39,8 @@ "NodeConfig", "AdvancedMachineFeatures", "NodeNetworkConfig", + "AdditionalNodeNetworkConfig", + "AdditionalPodNetworkConfig", "ShieldedInstanceConfig", "SandboxConfig", "GcfsConfig", @@ -947,6 +949,15 @@ class NodeNetworkConfig(proto.Message): off to next power of 2) Example: max_pods_per_node of 30 will result in 32 IPs (/27) when overprovisioning is disabled. + additional_node_network_configs (MutableSequence[google.cloud.container_v1.types.AdditionalNodeNetworkConfig]): + We specify the additional node networks for + this node pool using this list. Each node + network corresponds to an additional interface + additional_pod_network_configs (MutableSequence[google.cloud.container_v1.types.AdditionalPodNetworkConfig]): + We specify the additional pod networks for + this node pool using this list. Each pod network + corresponds to an additional alias IP range for + the node pod_ipv4_range_utilization (float): Output only. [Output only] The utilization of the IPv4 range for the pod. The ratio is Usage/[Total number of IPs in the @@ -1014,12 +1025,86 @@ class Tier(proto.Enum): number=13, message="PodCIDROverprovisionConfig", ) + additional_node_network_configs: MutableSequence[ + "AdditionalNodeNetworkConfig" + ] = proto.RepeatedField( + proto.MESSAGE, + number=14, + message="AdditionalNodeNetworkConfig", + ) + additional_pod_network_configs: MutableSequence[ + "AdditionalPodNetworkConfig" + ] = proto.RepeatedField( + proto.MESSAGE, + number=15, + message="AdditionalPodNetworkConfig", + ) pod_ipv4_range_utilization: float = proto.Field( proto.DOUBLE, number=16, ) +class AdditionalNodeNetworkConfig(proto.Message): + r"""AdditionalNodeNetworkConfig is the configuration for + additional node networks within the NodeNetworkConfig message + + Attributes: + network (str): + Name of the VPC where the additional + interface belongs + subnetwork (str): + Name of the subnetwork where the additional + interface belongs + """ + + network: str = proto.Field( + proto.STRING, + number=1, + ) + subnetwork: str = proto.Field( + proto.STRING, + number=2, + ) + + +class AdditionalPodNetworkConfig(proto.Message): + r"""AdditionalPodNetworkConfig is the configuration for + additional pod networks within the NodeNetworkConfig message + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + subnetwork (str): + Name of the subnetwork where the additional + pod network belongs + secondary_pod_range (str): + The name of the secondary range on the subnet + which provides IP address for this pod range + max_pods_per_node (google.cloud.container_v1.types.MaxPodsConstraint): + The maximum number of pods per node which use + this pod network + + This field is a member of `oneof`_ ``_max_pods_per_node``. + """ + + subnetwork: str = proto.Field( + proto.STRING, + number=1, + ) + secondary_pod_range: str = proto.Field( + proto.STRING, + number=2, + ) + max_pods_per_node: "MaxPodsConstraint" = proto.Field( + proto.MESSAGE, + number=3, + optional=True, + message="MaxPodsConstraint", + ) + + class ShieldedInstanceConfig(proto.Message): r"""A set of Shielded Instance options. @@ -5702,6 +5787,12 @@ class PlacementPolicy(proto.Message): Attributes: type_ (google.cloud.container_v1.types.NodePool.PlacementPolicy.Type): The type of placement. + policy_name (str): + If set, refers to the name of a custom + resource policy supplied by the user. The + resource policy must be in the same project and + region as the node pool. If not found, + InvalidArgument error is returned. """ class Type(proto.Enum): @@ -5724,6 +5815,10 @@ class Type(proto.Enum): number=1, enum="NodePool.PlacementPolicy.Type", ) + policy_name: str = proto.Field( + proto.STRING, + number=3, + ) name: str = proto.Field( proto.STRING, @@ -7251,6 +7346,9 @@ class NetworkConfig(proto.Message): gateway_api_config (google.cloud.container_v1.types.GatewayAPIConfig): GatewayAPIConfig contains the desired config of Gateway API on this cluster. + enable_multi_networking (bool): + Whether multi-networking is enabled for this + cluster. network_performance_config (google.cloud.container_v1.types.NetworkConfig.ClusterNetworkPerformanceConfig): Network bandwidth tier configuration. enable_fqdn_network_policy (bool): @@ -7339,6 +7437,10 @@ class Tier(proto.Enum): number=16, message="GatewayAPIConfig", ) + enable_multi_networking: bool = proto.Field( + proto.BOOL, + number=17, + ) network_performance_config: ClusterNetworkPerformanceConfig = proto.Field( proto.MESSAGE, number=18,