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

Commit

Permalink
feat: Add support for updating additional pod IPv4 ranges for Standar…
Browse files Browse the repository at this point in the history
…d and Autopilot clusters (#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: googleapis/googleapis-gen@13d50d1
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: googleapis/googleapis-gen@8c7eccd
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>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] committed Apr 11, 2023
1 parent 3b815dd commit c9c29c4
Show file tree
Hide file tree
Showing 9 changed files with 86 additions and 2 deletions.
2 changes: 2 additions & 0 deletions google/cloud/container/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
)
from google.cloud.container_v1.types.cluster_service import (
AcceleratorConfig,
AdditionalPodRangesConfig,
AddonsConfig,
AdvancedMachineFeatures,
AuthenticatorGroupsConfig,
Expand Down Expand Up @@ -178,6 +179,7 @@
"ClusterManagerClient",
"ClusterManagerAsyncClient",
"AcceleratorConfig",
"AdditionalPodRangesConfig",
"AddonsConfig",
"AdvancedMachineFeatures",
"AuthenticatorGroupsConfig",
Expand Down
2 changes: 2 additions & 0 deletions google/cloud/container_v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from .services.cluster_manager import ClusterManagerAsyncClient, ClusterManagerClient
from .types.cluster_service import (
AcceleratorConfig,
AdditionalPodRangesConfig,
AddonsConfig,
AdvancedMachineFeatures,
AuthenticatorGroupsConfig,
Expand Down Expand Up @@ -172,6 +173,7 @@
__all__ = (
"ClusterManagerAsyncClient",
"AcceleratorConfig",
"AdditionalPodRangesConfig",
"AddonsConfig",
"AdvancedMachineFeatures",
"AuthenticatorGroupsConfig",
Expand Down
2 changes: 2 additions & 0 deletions google/cloud/container_v1/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#
from .cluster_service import (
AcceleratorConfig,
AdditionalPodRangesConfig,
AddonsConfig,
AdvancedMachineFeatures,
AuthenticatorGroupsConfig,
Expand Down Expand Up @@ -165,6 +166,7 @@

__all__ = (
"AcceleratorConfig",
"AdditionalPodRangesConfig",
"AddonsConfig",
"AdvancedMachineFeatures",
"AuthenticatorGroupsConfig",
Expand Down
37 changes: 37 additions & 0 deletions google/cloud/container_v1/types/cluster_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
"NodePoolDefaults",
"NodeConfigDefaults",
"ClusterUpdate",
"AdditionalPodRangesConfig",
"Operation",
"OperationProgress",
"CreateClusterRequest",
Expand Down Expand Up @@ -2026,6 +2027,11 @@ class IPAllocationPolicy(proto.Message):
services_ipv6_cidr_block (str):
Output only. [Output only] The services IPv6 CIDR block for
the cluster.
additional_pod_ranges_config (google.cloud.container_v1.types.AdditionalPodRangesConfig):
Output only. [Output only] The additional pod ranges that
are added to the cluster. These pod ranges can be used by
new node pools to allocate pod IPs automatically. Once the
range is removed it will not show up in IPAllocationPolicy.
"""

use_ip_aliases: bool = proto.Field(
Expand Down Expand Up @@ -2103,6 +2109,11 @@ class IPAllocationPolicy(proto.Message):
proto.STRING,
number=23,
)
additional_pod_ranges_config: "AdditionalPodRangesConfig" = proto.Field(
proto.MESSAGE,
number=24,
message="AdditionalPodRangesConfig",
)


class Cluster(proto.Message):
Expand Down Expand Up @@ -2987,6 +2998,15 @@ class ClusterUpdate(proto.Message):
the current stack type of the cluster, update
will attempt to change the stack type to the new
type.
additional_pod_ranges_config (google.cloud.container_v1.types.AdditionalPodRangesConfig):
The additional pod ranges to be added to the
cluster. These pod ranges can be used by node
pools to allocate pod IPs.
removed_additional_pod_ranges_config (google.cloud.container_v1.types.AdditionalPodRangesConfig):
The additional pod ranges that are to be removed from the
cluster. The pod ranges specified here must have been
specified earlier in the 'additional_pod_ranges_config'
argument.
"""

desired_node_version: str = proto.Field(
Expand Down Expand Up @@ -3183,6 +3203,23 @@ class ClusterUpdate(proto.Message):
number=119,
enum="StackType",
)
additional_pod_ranges_config: "AdditionalPodRangesConfig" = proto.Field(
proto.MESSAGE,
number=120,
message="AdditionalPodRangesConfig",
)
removed_additional_pod_ranges_config: "AdditionalPodRangesConfig" = proto.Field(
proto.MESSAGE,
number=121,
message="AdditionalPodRangesConfig",
)


class AdditionalPodRangesConfig(proto.Message):
r"""AdditionalPodRangesConfig is the configuration for additional
pod secondary ranges supporting the ClusterUpdate message.
"""


class Operation(proto.Message):
Expand Down
2 changes: 2 additions & 0 deletions google/cloud/container_v1beta1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from .services.cluster_manager import ClusterManagerAsyncClient, ClusterManagerClient
from .types.cluster_service import (
AcceleratorConfig,
AdditionalPodRangesConfig,
AddonsConfig,
AdvancedMachineFeatures,
AuthenticatorGroupsConfig,
Expand Down Expand Up @@ -186,6 +187,7 @@
__all__ = (
"ClusterManagerAsyncClient",
"AcceleratorConfig",
"AdditionalPodRangesConfig",
"AddonsConfig",
"AdvancedMachineFeatures",
"AuthenticatorGroupsConfig",
Expand Down
2 changes: 2 additions & 0 deletions google/cloud/container_v1beta1/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#
from .cluster_service import (
AcceleratorConfig,
AdditionalPodRangesConfig,
AddonsConfig,
AdvancedMachineFeatures,
AuthenticatorGroupsConfig,
Expand Down Expand Up @@ -179,6 +180,7 @@

__all__ = (
"AcceleratorConfig",
"AdditionalPodRangesConfig",
"AddonsConfig",
"AdvancedMachineFeatures",
"AuthenticatorGroupsConfig",
Expand Down
37 changes: 37 additions & 0 deletions google/cloud/container_v1beta1/types/cluster_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
"NodeConfigDefaults",
"NodePoolAutoConfig",
"ClusterUpdate",
"AdditionalPodRangesConfig",
"Operation",
"OperationProgress",
"CreateClusterRequest",
Expand Down Expand Up @@ -2131,6 +2132,11 @@ class IPAllocationPolicy(proto.Message):
services_ipv6_cidr_block (str):
Output only. [Output only] The services IPv6 CIDR block for
the cluster.
additional_pod_ranges_config (google.cloud.container_v1beta1.types.AdditionalPodRangesConfig):
Output only. [Output only] The additional pod ranges that
are added to the cluster. These pod ranges can be used by
new node pools to allocate pod IPs automatically. Once the
range is removed it will not show up in IPAllocationPolicy.
"""

class StackType(proto.Enum):
Expand Down Expand Up @@ -2246,6 +2252,11 @@ class IPv6AccessType(proto.Enum):
proto.STRING,
number=23,
)
additional_pod_ranges_config: "AdditionalPodRangesConfig" = proto.Field(
proto.MESSAGE,
number=24,
message="AdditionalPodRangesConfig",
)


class BinaryAuthorization(proto.Message):
Expand Down Expand Up @@ -3451,6 +3462,15 @@ class ClusterUpdate(proto.Message):
the current stack type of the cluster, update
will attempt to change the stack type to the new
type.
additional_pod_ranges_config (google.cloud.container_v1beta1.types.AdditionalPodRangesConfig):
The additional pod ranges to be added to the
cluster. These pod ranges can be used by node
pools to allocate pod IPs.
removed_additional_pod_ranges_config (google.cloud.container_v1beta1.types.AdditionalPodRangesConfig):
The additional pod ranges that are to be removed from the
cluster. The pod ranges specified here must have been
specified earlier in the 'additional_pod_ranges_config'
argument.
"""

desired_node_version: str = proto.Field(
Expand Down Expand Up @@ -3683,6 +3703,23 @@ class ClusterUpdate(proto.Message):
number=119,
enum="StackType",
)
additional_pod_ranges_config: "AdditionalPodRangesConfig" = proto.Field(
proto.MESSAGE,
number=120,
message="AdditionalPodRangesConfig",
)
removed_additional_pod_ranges_config: "AdditionalPodRangesConfig" = proto.Field(
proto.MESSAGE,
number=121,
message="AdditionalPodRangesConfig",
)


class AdditionalPodRangesConfig(proto.Message):
r"""AdditionalPodRangesConfig is the configuration for additional
pod secondary ranges supporting the ClusterUpdate message.
"""


class Operation(proto.Message):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-container",
"version": "2.19.0"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-container",
"version": "2.19.0"
"version": "0.1.0"
},
"snippets": [
{
Expand Down

0 comments on commit c9c29c4

Please sign in to comment.