Skip to content

Commit c9c29c4

Browse files
feat: Add support for updating additional pod IPv4 ranges for Standard and Autopilot clusters (googleapis#365)
* feat: Add support for updating additional pod IPv4 ranges for Standard and Autopilot clusters Users can append more pod ranges by name to an existing cluster at the cluster level. When users or Node Auto-provisioning create new node pools, GKE will select the most available pod range and assign it to the node pool. These pod ranges can be removed once no node pool is using it. PiperOrigin-RevId: 522620905 Source-Link: googleapis/googleapis@0b7078e Source-Link: https://github.com/googleapis/googleapis-gen/commit/13d50d1f565497a654327fcb81c7959c5c1f058a Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTNkNTBkMWY1NjU0OTdhNjU0MzI3ZmNiODFjNzk1OWM1YzFmMDU4YSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: Add support for updating additional pod IPv4 ranges for Standard and Autopilot clusters Users can append more pod ranges by name to an existing cluster at the cluster level. When users or Node Auto-provisioning create new node pools, GKE will select the most available pod range and assign it to the node pool. These pod ranges can be removed once no node pool is using it. PiperOrigin-RevId: 522620935 Source-Link: googleapis/googleapis@2ddfcb8 Source-Link: https://github.com/googleapis/googleapis-gen/commit/8c7eccd097b7989d72cae955faf5ed8e3fdcbc75 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOGM3ZWNjZDA5N2I3OTg5ZDcyY2FlOTU1ZmFmNWVkOGUzZmRjYmM3NSJ9 * 🦉 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 3b815dd commit c9c29c4

File tree

9 files changed

+86
-2
lines changed

9 files changed

+86
-2
lines changed

google/cloud/container/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
)
2727
from google.cloud.container_v1.types.cluster_service import (
2828
AcceleratorConfig,
29+
AdditionalPodRangesConfig,
2930
AddonsConfig,
3031
AdvancedMachineFeatures,
3132
AuthenticatorGroupsConfig,
@@ -178,6 +179,7 @@
178179
"ClusterManagerClient",
179180
"ClusterManagerAsyncClient",
180181
"AcceleratorConfig",
182+
"AdditionalPodRangesConfig",
181183
"AddonsConfig",
182184
"AdvancedMachineFeatures",
183185
"AuthenticatorGroupsConfig",

google/cloud/container_v1/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from .services.cluster_manager import ClusterManagerAsyncClient, ClusterManagerClient
2222
from .types.cluster_service import (
2323
AcceleratorConfig,
24+
AdditionalPodRangesConfig,
2425
AddonsConfig,
2526
AdvancedMachineFeatures,
2627
AuthenticatorGroupsConfig,
@@ -172,6 +173,7 @@
172173
__all__ = (
173174
"ClusterManagerAsyncClient",
174175
"AcceleratorConfig",
176+
"AdditionalPodRangesConfig",
175177
"AddonsConfig",
176178
"AdvancedMachineFeatures",
177179
"AuthenticatorGroupsConfig",

google/cloud/container_v1/types/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#
1616
from .cluster_service import (
1717
AcceleratorConfig,
18+
AdditionalPodRangesConfig,
1819
AddonsConfig,
1920
AdvancedMachineFeatures,
2021
AuthenticatorGroupsConfig,
@@ -165,6 +166,7 @@
165166

166167
__all__ = (
167168
"AcceleratorConfig",
169+
"AdditionalPodRangesConfig",
168170
"AddonsConfig",
169171
"AdvancedMachineFeatures",
170172
"AuthenticatorGroupsConfig",

google/cloud/container_v1/types/cluster_service.py

+37
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
"NodePoolDefaults",
7676
"NodeConfigDefaults",
7777
"ClusterUpdate",
78+
"AdditionalPodRangesConfig",
7879
"Operation",
7980
"OperationProgress",
8081
"CreateClusterRequest",
@@ -2026,6 +2027,11 @@ class IPAllocationPolicy(proto.Message):
20262027
services_ipv6_cidr_block (str):
20272028
Output only. [Output only] The services IPv6 CIDR block for
20282029
the cluster.
2030+
additional_pod_ranges_config (google.cloud.container_v1.types.AdditionalPodRangesConfig):
2031+
Output only. [Output only] The additional pod ranges that
2032+
are added to the cluster. These pod ranges can be used by
2033+
new node pools to allocate pod IPs automatically. Once the
2034+
range is removed it will not show up in IPAllocationPolicy.
20292035
"""
20302036

20312037
use_ip_aliases: bool = proto.Field(
@@ -2103,6 +2109,11 @@ class IPAllocationPolicy(proto.Message):
21032109
proto.STRING,
21042110
number=23,
21052111
)
2112+
additional_pod_ranges_config: "AdditionalPodRangesConfig" = proto.Field(
2113+
proto.MESSAGE,
2114+
number=24,
2115+
message="AdditionalPodRangesConfig",
2116+
)
21062117

21072118

21082119
class Cluster(proto.Message):
@@ -2987,6 +2998,15 @@ class ClusterUpdate(proto.Message):
29872998
the current stack type of the cluster, update
29882999
will attempt to change the stack type to the new
29893000
type.
3001+
additional_pod_ranges_config (google.cloud.container_v1.types.AdditionalPodRangesConfig):
3002+
The additional pod ranges to be added to the
3003+
cluster. These pod ranges can be used by node
3004+
pools to allocate pod IPs.
3005+
removed_additional_pod_ranges_config (google.cloud.container_v1.types.AdditionalPodRangesConfig):
3006+
The additional pod ranges that are to be removed from the
3007+
cluster. The pod ranges specified here must have been
3008+
specified earlier in the 'additional_pod_ranges_config'
3009+
argument.
29903010
"""
29913011

29923012
desired_node_version: str = proto.Field(
@@ -3183,6 +3203,23 @@ class ClusterUpdate(proto.Message):
31833203
number=119,
31843204
enum="StackType",
31853205
)
3206+
additional_pod_ranges_config: "AdditionalPodRangesConfig" = proto.Field(
3207+
proto.MESSAGE,
3208+
number=120,
3209+
message="AdditionalPodRangesConfig",
3210+
)
3211+
removed_additional_pod_ranges_config: "AdditionalPodRangesConfig" = proto.Field(
3212+
proto.MESSAGE,
3213+
number=121,
3214+
message="AdditionalPodRangesConfig",
3215+
)
3216+
3217+
3218+
class AdditionalPodRangesConfig(proto.Message):
3219+
r"""AdditionalPodRangesConfig is the configuration for additional
3220+
pod secondary ranges supporting the ClusterUpdate message.
3221+
3222+
"""
31863223

31873224

31883225
class Operation(proto.Message):

google/cloud/container_v1beta1/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from .services.cluster_manager import ClusterManagerAsyncClient, ClusterManagerClient
2222
from .types.cluster_service import (
2323
AcceleratorConfig,
24+
AdditionalPodRangesConfig,
2425
AddonsConfig,
2526
AdvancedMachineFeatures,
2627
AuthenticatorGroupsConfig,
@@ -186,6 +187,7 @@
186187
__all__ = (
187188
"ClusterManagerAsyncClient",
188189
"AcceleratorConfig",
190+
"AdditionalPodRangesConfig",
189191
"AddonsConfig",
190192
"AdvancedMachineFeatures",
191193
"AuthenticatorGroupsConfig",

google/cloud/container_v1beta1/types/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#
1616
from .cluster_service import (
1717
AcceleratorConfig,
18+
AdditionalPodRangesConfig,
1819
AddonsConfig,
1920
AdvancedMachineFeatures,
2021
AuthenticatorGroupsConfig,
@@ -179,6 +180,7 @@
179180

180181
__all__ = (
181182
"AcceleratorConfig",
183+
"AdditionalPodRangesConfig",
182184
"AddonsConfig",
183185
"AdvancedMachineFeatures",
184186
"AuthenticatorGroupsConfig",

google/cloud/container_v1beta1/types/cluster_service.py

+37
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484
"NodeConfigDefaults",
8585
"NodePoolAutoConfig",
8686
"ClusterUpdate",
87+
"AdditionalPodRangesConfig",
8788
"Operation",
8889
"OperationProgress",
8990
"CreateClusterRequest",
@@ -2131,6 +2132,11 @@ class IPAllocationPolicy(proto.Message):
21312132
services_ipv6_cidr_block (str):
21322133
Output only. [Output only] The services IPv6 CIDR block for
21332134
the cluster.
2135+
additional_pod_ranges_config (google.cloud.container_v1beta1.types.AdditionalPodRangesConfig):
2136+
Output only. [Output only] The additional pod ranges that
2137+
are added to the cluster. These pod ranges can be used by
2138+
new node pools to allocate pod IPs automatically. Once the
2139+
range is removed it will not show up in IPAllocationPolicy.
21342140
"""
21352141

21362142
class StackType(proto.Enum):
@@ -2246,6 +2252,11 @@ class IPv6AccessType(proto.Enum):
22462252
proto.STRING,
22472253
number=23,
22482254
)
2255+
additional_pod_ranges_config: "AdditionalPodRangesConfig" = proto.Field(
2256+
proto.MESSAGE,
2257+
number=24,
2258+
message="AdditionalPodRangesConfig",
2259+
)
22492260

22502261

22512262
class BinaryAuthorization(proto.Message):
@@ -3451,6 +3462,15 @@ class ClusterUpdate(proto.Message):
34513462
the current stack type of the cluster, update
34523463
will attempt to change the stack type to the new
34533464
type.
3465+
additional_pod_ranges_config (google.cloud.container_v1beta1.types.AdditionalPodRangesConfig):
3466+
The additional pod ranges to be added to the
3467+
cluster. These pod ranges can be used by node
3468+
pools to allocate pod IPs.
3469+
removed_additional_pod_ranges_config (google.cloud.container_v1beta1.types.AdditionalPodRangesConfig):
3470+
The additional pod ranges that are to be removed from the
3471+
cluster. The pod ranges specified here must have been
3472+
specified earlier in the 'additional_pod_ranges_config'
3473+
argument.
34543474
"""
34553475

34563476
desired_node_version: str = proto.Field(
@@ -3683,6 +3703,23 @@ class ClusterUpdate(proto.Message):
36833703
number=119,
36843704
enum="StackType",
36853705
)
3706+
additional_pod_ranges_config: "AdditionalPodRangesConfig" = proto.Field(
3707+
proto.MESSAGE,
3708+
number=120,
3709+
message="AdditionalPodRangesConfig",
3710+
)
3711+
removed_additional_pod_ranges_config: "AdditionalPodRangesConfig" = proto.Field(
3712+
proto.MESSAGE,
3713+
number=121,
3714+
message="AdditionalPodRangesConfig",
3715+
)
3716+
3717+
3718+
class AdditionalPodRangesConfig(proto.Message):
3719+
r"""AdditionalPodRangesConfig is the configuration for additional
3720+
pod secondary ranges supporting the ClusterUpdate message.
3721+
3722+
"""
36863723

36873724

36883725
class Operation(proto.Message):

samples/generated_samples/snippet_metadata_google.container.v1.json

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

samples/generated_samples/snippet_metadata_google.container.v1beta1.json

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

0 commit comments

Comments
 (0)