diff --git a/packages/google-cloud-container/google/cloud/container/__init__.py b/packages/google-cloud-container/google/cloud/container/__init__.py index 61533223fabf..eca392d831c7 100644 --- a/packages/google-cloud-container/google/cloud/container/__init__.py +++ b/packages/google-cloud-container/google/cloud/container/__init__.py @@ -126,6 +126,7 @@ NotificationConfig, Operation, OperationProgress, + PodCIDROverprovisionConfig, PrivateClusterConfig, PrivateClusterMasterGlobalAccessConfig, PrivateIPv6GoogleAccess, @@ -274,6 +275,7 @@ "NotificationConfig", "Operation", "OperationProgress", + "PodCIDROverprovisionConfig", "PrivateClusterConfig", "PrivateClusterMasterGlobalAccessConfig", "RecurringTimeWindow", diff --git a/packages/google-cloud-container/google/cloud/container_v1/__init__.py b/packages/google-cloud-container/google/cloud/container_v1/__init__.py index 9797ab283124..e22b409fee22 100644 --- a/packages/google-cloud-container/google/cloud/container_v1/__init__.py +++ b/packages/google-cloud-container/google/cloud/container_v1/__init__.py @@ -121,6 +121,7 @@ NotificationConfig, Operation, OperationProgress, + PodCIDROverprovisionConfig, PrivateClusterConfig, PrivateClusterMasterGlobalAccessConfig, PrivateIPv6GoogleAccess, @@ -272,6 +273,7 @@ "NotificationConfig", "Operation", "OperationProgress", + "PodCIDROverprovisionConfig", "PrivateClusterConfig", "PrivateClusterMasterGlobalAccessConfig", "PrivateIPv6GoogleAccess", diff --git a/packages/google-cloud-container/google/cloud/container_v1/types/__init__.py b/packages/google-cloud-container/google/cloud/container_v1/types/__init__.py index 27f62df52337..01e4f29ff097 100644 --- a/packages/google-cloud-container/google/cloud/container_v1/types/__init__.py +++ b/packages/google-cloud-container/google/cloud/container_v1/types/__init__.py @@ -115,6 +115,7 @@ NotificationConfig, Operation, OperationProgress, + PodCIDROverprovisionConfig, PrivateClusterConfig, PrivateClusterMasterGlobalAccessConfig, PrivateIPv6GoogleAccess, @@ -261,6 +262,7 @@ "NotificationConfig", "Operation", "OperationProgress", + "PodCIDROverprovisionConfig", "PrivateClusterConfig", "PrivateClusterMasterGlobalAccessConfig", "RecurringTimeWindow", diff --git a/packages/google-cloud-container/google/cloud/container_v1/types/cluster_service.py b/packages/google-cloud-container/google/cloud/container_v1/types/cluster_service.py index 1c231ebff212..d92b7b40a9e9 100644 --- a/packages/google-cloud-container/google/cloud/container_v1/types/cluster_service.py +++ b/packages/google-cloud-container/google/cloud/container_v1/types/cluster_service.py @@ -68,6 +68,7 @@ "LegacyAbac", "NetworkPolicy", "BinaryAuthorization", + "PodCIDROverprovisionConfig", "IPAllocationPolicy", "Cluster", "NodePoolAutoConfig", @@ -896,6 +897,20 @@ class NodeNetworkConfig(proto.Message): Network bandwidth tier configuration. This field is a member of `oneof`_ ``_network_performance_config``. + pod_cidr_overprovision_config (google.cloud.container_v1.types.PodCIDROverprovisionConfig): + [PRIVATE FIELD] Pod CIDR size overprovisioning config for + the nodepool. + + Pod CIDR size per node depends on max_pods_per_node. By + default, the value of max_pods_per_node is rounded off to + next power of 2 and we then double that to get the size of + pod CIDR block per node. Example: max_pods_per_node of 30 + would result in 64 IPs (/26). + + This config can disable the doubling of IPs (we still round + off to next power of 2) Example: max_pods_per_node of 30 + will result in 32 IPs (/27) when overprovisioning is + disabled. """ class NetworkPerformanceConfig(proto.Message): @@ -954,6 +969,11 @@ class Tier(proto.Enum): optional=True, message=NetworkPerformanceConfig, ) + pod_cidr_overprovision_config: "PodCIDROverprovisionConfig" = proto.Field( + proto.MESSAGE, + number=13, + message="PodCIDROverprovisionConfig", + ) class ShieldedInstanceConfig(proto.Message): @@ -1847,6 +1867,22 @@ class EvaluationMode(proto.Enum): ) +class PodCIDROverprovisionConfig(proto.Message): + r"""[PRIVATE FIELD] Config for pod CIDR size overprovisioning. + + Attributes: + disable (bool): + Whether Pod CIDR overprovisioning is + disabled. Note: Pod CIDR overprovisioning is + enabled by default. + """ + + disable: bool = proto.Field( + proto.BOOL, + number=1, + ) + + class IPAllocationPolicy(proto.Message): r"""Configuration for controlling how IPs are allocated in the cluster. @@ -1970,6 +2006,20 @@ class IPAllocationPolicy(proto.Message): ipv6_access_type (google.cloud.container_v1.types.IPv6AccessType): The ipv6 access type (internal or external) when create_subnetwork is true + pod_cidr_overprovision_config (google.cloud.container_v1.types.PodCIDROverprovisionConfig): + [PRIVATE FIELD] Pod CIDR size overprovisioning config for + the cluster. + + Pod CIDR size per node depends on max_pods_per_node. By + default, the value of max_pods_per_node is doubled and then + rounded off to next power of 2 to get the size of pod CIDR + block per node. Example: max_pods_per_node of 30 would + result in 64 IPs (/26). + + This config can disable the doubling of IPs (we still round + off to next power of 2) Example: max_pods_per_node of 30 + will result in 32 IPs (/27) when overprovisioning is + disabled. subnet_ipv6_cidr_block (str): Output only. [Output only] The subnet's IPv6 CIDR block used by nodes and pods. @@ -2040,6 +2090,11 @@ class IPAllocationPolicy(proto.Message): number=17, enum="IPv6AccessType", ) + pod_cidr_overprovision_config: "PodCIDROverprovisionConfig" = proto.Field( + proto.MESSAGE, + number=21, + message="PodCIDROverprovisionConfig", + ) subnet_ipv6_cidr_block: str = proto.Field( proto.STRING, number=22, diff --git a/packages/google-cloud-container/google/cloud/container_v1beta1/__init__.py b/packages/google-cloud-container/google/cloud/container_v1beta1/__init__.py index 9f9b393dc669..ad1c8db5bdd5 100644 --- a/packages/google-cloud-container/google/cloud/container_v1beta1/__init__.py +++ b/packages/google-cloud-container/google/cloud/container_v1beta1/__init__.py @@ -128,6 +128,7 @@ NotificationConfig, Operation, OperationProgress, + PodCIDROverprovisionConfig, PodSecurityPolicyConfig, PrivateClusterConfig, PrivateClusterMasterGlobalAccessConfig, @@ -293,6 +294,7 @@ "NotificationConfig", "Operation", "OperationProgress", + "PodCIDROverprovisionConfig", "PodSecurityPolicyConfig", "PrivateClusterConfig", "PrivateClusterMasterGlobalAccessConfig", diff --git a/packages/google-cloud-container/google/cloud/container_v1beta1/types/__init__.py b/packages/google-cloud-container/google/cloud/container_v1beta1/types/__init__.py index e7cb4f310352..a9a8d1069fe7 100644 --- a/packages/google-cloud-container/google/cloud/container_v1beta1/types/__init__.py +++ b/packages/google-cloud-container/google/cloud/container_v1beta1/types/__init__.py @@ -122,6 +122,7 @@ NotificationConfig, Operation, OperationProgress, + PodCIDROverprovisionConfig, PodSecurityPolicyConfig, PrivateClusterConfig, PrivateClusterMasterGlobalAccessConfig, @@ -283,6 +284,7 @@ "NotificationConfig", "Operation", "OperationProgress", + "PodCIDROverprovisionConfig", "PodSecurityPolicyConfig", "PrivateClusterConfig", "PrivateClusterMasterGlobalAccessConfig", diff --git a/packages/google-cloud-container/google/cloud/container_v1beta1/types/cluster_service.py b/packages/google-cloud-container/google/cloud/container_v1beta1/types/cluster_service.py index f5c6e4e30633..7b4eaf968fdd 100644 --- a/packages/google-cloud-container/google/cloud/container_v1beta1/types/cluster_service.py +++ b/packages/google-cloud-container/google/cloud/container_v1beta1/types/cluster_service.py @@ -71,6 +71,7 @@ "MasterAuthorizedNetworksConfig", "LegacyAbac", "NetworkPolicy", + "PodCIDROverprovisionConfig", "IPAllocationPolicy", "BinaryAuthorization", "PodSecurityPolicyConfig", @@ -902,6 +903,20 @@ class NodeNetworkConfig(proto.Message): Network bandwidth tier configuration. This field is a member of `oneof`_ ``_network_performance_config``. + pod_cidr_overprovision_config (google.cloud.container_v1beta1.types.PodCIDROverprovisionConfig): + [PRIVATE FIELD] Pod CIDR size overprovisioning config for + the nodepool. + + Pod CIDR size per node depends on max_pods_per_node. By + default, the value of max_pods_per_node is rounded off to + next power of 2 and we then double that to get the size of + pod CIDR block per node. Example: max_pods_per_node of 30 + would result in 64 IPs (/26). + + This config can disable the doubling of IPs (we still round + off to next power of 2) Example: max_pods_per_node of 30 + will result in 32 IPs (/27) when overprovisioning is + disabled. """ class NetworkPerformanceConfig(proto.Message): @@ -972,6 +987,11 @@ class Tier(proto.Enum): optional=True, message=NetworkPerformanceConfig, ) + pod_cidr_overprovision_config: "PodCIDROverprovisionConfig" = proto.Field( + proto.MESSAGE, + number=13, + message="PodCIDROverprovisionConfig", + ) class ShieldedInstanceConfig(proto.Message): @@ -1933,6 +1953,22 @@ class Provider(proto.Enum): ) +class PodCIDROverprovisionConfig(proto.Message): + r"""[PRIVATE FIELD] Config for pod CIDR size overprovisioning. + + Attributes: + disable (bool): + Whether Pod CIDR overprovisioning is + disabled. Note: Pod CIDR overprovisioning is + enabled by default. + """ + + disable: bool = proto.Field( + proto.BOOL, + number=1, + ) + + class IPAllocationPolicy(proto.Message): r"""Configuration for controlling how IPs are allocated in the cluster. @@ -2075,6 +2111,20 @@ class IPAllocationPolicy(proto.Message): ipv6_access_type (google.cloud.container_v1beta1.types.IPAllocationPolicy.IPv6AccessType): The ipv6 access type (internal or external) when create_subnetwork is true + pod_cidr_overprovision_config (google.cloud.container_v1beta1.types.PodCIDROverprovisionConfig): + [PRIVATE FIELD] Pod CIDR size overprovisioning config for + the cluster. + + Pod CIDR size per node depends on max_pods_per_node. By + default, the value of max_pods_per_node is doubled and then + rounded off to next power of 2 to get the size of pod CIDR + block per node. Example: max_pods_per_node of 30 would + result in 64 IPs (/26). + + This config can disable the doubling of IPs (we still round + off to next power of 2) Example: max_pods_per_node of 30 + will result in 32 IPs (/27) when overprovisioning is + disabled. subnet_ipv6_cidr_block (str): Output only. [Output only] The subnet's IPv6 CIDR block used by nodes and pods. @@ -2183,6 +2233,11 @@ class IPv6AccessType(proto.Enum): number=17, enum=IPv6AccessType, ) + pod_cidr_overprovision_config: "PodCIDROverprovisionConfig" = proto.Field( + proto.MESSAGE, + number=21, + message="PodCIDROverprovisionConfig", + ) subnet_ipv6_cidr_block: str = proto.Field( proto.STRING, number=22, diff --git a/packages/google-cloud-container/samples/generated_samples/snippet_metadata_google.container.v1.json b/packages/google-cloud-container/samples/generated_samples/snippet_metadata_google.container.v1.json index df02e5b518ed..34c1cf39dd18 100644 --- a/packages/google-cloud-container/samples/generated_samples/snippet_metadata_google.container.v1.json +++ b/packages/google-cloud-container/samples/generated_samples/snippet_metadata_google.container.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-container", - "version": "2.18.0" + "version": "0.1.0" }, "snippets": [ { diff --git a/packages/google-cloud-container/samples/generated_samples/snippet_metadata_google.container.v1beta1.json b/packages/google-cloud-container/samples/generated_samples/snippet_metadata_google.container.v1beta1.json index 0cdcffa1c22d..15a962189221 100644 --- a/packages/google-cloud-container/samples/generated_samples/snippet_metadata_google.container.v1beta1.json +++ b/packages/google-cloud-container/samples/generated_samples/snippet_metadata_google.container.v1beta1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-container", - "version": "2.18.0" + "version": "0.1.0" }, "snippets": [ {