From c9c29c46f3c6a8d4dfebec3ec36e5c7fc6052bb7 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 05:42:27 -0400 Subject: [PATCH 1/2] feat: Add support for updating additional pod IPv4 ranges for Standard and Autopilot clusters (#365) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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: https://github.com/googleapis/googleapis/commit/0b7078edd5ca48f3f43d90f4a22ba8c577ee8944 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: https://github.com/googleapis/googleapis/commit/2ddfcb8dc096563243837a32f06ad471b971396c 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 --- google/cloud/container/__init__.py | 2 + google/cloud/container_v1/__init__.py | 2 + google/cloud/container_v1/types/__init__.py | 2 + .../container_v1/types/cluster_service.py | 37 +++++++++++++++++++ google/cloud/container_v1beta1/__init__.py | 2 + .../cloud/container_v1beta1/types/__init__.py | 2 + .../types/cluster_service.py | 37 +++++++++++++++++++ .../snippet_metadata_google.container.v1.json | 2 +- ...pet_metadata_google.container.v1beta1.json | 2 +- 9 files changed, 86 insertions(+), 2 deletions(-) diff --git a/google/cloud/container/__init__.py b/google/cloud/container/__init__.py index eca392d8..10d63a13 100644 --- a/google/cloud/container/__init__.py +++ b/google/cloud/container/__init__.py @@ -26,6 +26,7 @@ ) from google.cloud.container_v1.types.cluster_service import ( AcceleratorConfig, + AdditionalPodRangesConfig, AddonsConfig, AdvancedMachineFeatures, AuthenticatorGroupsConfig, @@ -178,6 +179,7 @@ "ClusterManagerClient", "ClusterManagerAsyncClient", "AcceleratorConfig", + "AdditionalPodRangesConfig", "AddonsConfig", "AdvancedMachineFeatures", "AuthenticatorGroupsConfig", diff --git a/google/cloud/container_v1/__init__.py b/google/cloud/container_v1/__init__.py index e22b409f..86c11d3e 100644 --- a/google/cloud/container_v1/__init__.py +++ b/google/cloud/container_v1/__init__.py @@ -21,6 +21,7 @@ from .services.cluster_manager import ClusterManagerAsyncClient, ClusterManagerClient from .types.cluster_service import ( AcceleratorConfig, + AdditionalPodRangesConfig, AddonsConfig, AdvancedMachineFeatures, AuthenticatorGroupsConfig, @@ -172,6 +173,7 @@ __all__ = ( "ClusterManagerAsyncClient", "AcceleratorConfig", + "AdditionalPodRangesConfig", "AddonsConfig", "AdvancedMachineFeatures", "AuthenticatorGroupsConfig", diff --git a/google/cloud/container_v1/types/__init__.py b/google/cloud/container_v1/types/__init__.py index 01e4f29f..913d39ab 100644 --- a/google/cloud/container_v1/types/__init__.py +++ b/google/cloud/container_v1/types/__init__.py @@ -15,6 +15,7 @@ # from .cluster_service import ( AcceleratorConfig, + AdditionalPodRangesConfig, AddonsConfig, AdvancedMachineFeatures, AuthenticatorGroupsConfig, @@ -165,6 +166,7 @@ __all__ = ( "AcceleratorConfig", + "AdditionalPodRangesConfig", "AddonsConfig", "AdvancedMachineFeatures", "AuthenticatorGroupsConfig", diff --git a/google/cloud/container_v1/types/cluster_service.py b/google/cloud/container_v1/types/cluster_service.py index d92b7b40..4b87e5d0 100644 --- a/google/cloud/container_v1/types/cluster_service.py +++ b/google/cloud/container_v1/types/cluster_service.py @@ -75,6 +75,7 @@ "NodePoolDefaults", "NodeConfigDefaults", "ClusterUpdate", + "AdditionalPodRangesConfig", "Operation", "OperationProgress", "CreateClusterRequest", @@ -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( @@ -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): @@ -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( @@ -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): diff --git a/google/cloud/container_v1beta1/__init__.py b/google/cloud/container_v1beta1/__init__.py index ad1c8db5..05d6baf5 100644 --- a/google/cloud/container_v1beta1/__init__.py +++ b/google/cloud/container_v1beta1/__init__.py @@ -21,6 +21,7 @@ from .services.cluster_manager import ClusterManagerAsyncClient, ClusterManagerClient from .types.cluster_service import ( AcceleratorConfig, + AdditionalPodRangesConfig, AddonsConfig, AdvancedMachineFeatures, AuthenticatorGroupsConfig, @@ -186,6 +187,7 @@ __all__ = ( "ClusterManagerAsyncClient", "AcceleratorConfig", + "AdditionalPodRangesConfig", "AddonsConfig", "AdvancedMachineFeatures", "AuthenticatorGroupsConfig", diff --git a/google/cloud/container_v1beta1/types/__init__.py b/google/cloud/container_v1beta1/types/__init__.py index a9a8d106..ccd60805 100644 --- a/google/cloud/container_v1beta1/types/__init__.py +++ b/google/cloud/container_v1beta1/types/__init__.py @@ -15,6 +15,7 @@ # from .cluster_service import ( AcceleratorConfig, + AdditionalPodRangesConfig, AddonsConfig, AdvancedMachineFeatures, AuthenticatorGroupsConfig, @@ -179,6 +180,7 @@ __all__ = ( "AcceleratorConfig", + "AdditionalPodRangesConfig", "AddonsConfig", "AdvancedMachineFeatures", "AuthenticatorGroupsConfig", diff --git a/google/cloud/container_v1beta1/types/cluster_service.py b/google/cloud/container_v1beta1/types/cluster_service.py index 7b4eaf96..6247aea2 100644 --- a/google/cloud/container_v1beta1/types/cluster_service.py +++ b/google/cloud/container_v1beta1/types/cluster_service.py @@ -84,6 +84,7 @@ "NodeConfigDefaults", "NodePoolAutoConfig", "ClusterUpdate", + "AdditionalPodRangesConfig", "Operation", "OperationProgress", "CreateClusterRequest", @@ -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): @@ -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): @@ -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( @@ -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): diff --git a/samples/generated_samples/snippet_metadata_google.container.v1.json b/samples/generated_samples/snippet_metadata_google.container.v1.json index ecd94663..34c1cf39 100644 --- a/samples/generated_samples/snippet_metadata_google.container.v1.json +++ b/samples/generated_samples/snippet_metadata_google.container.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-container", - "version": "2.19.0" + "version": "0.1.0" }, "snippets": [ { diff --git a/samples/generated_samples/snippet_metadata_google.container.v1beta1.json b/samples/generated_samples/snippet_metadata_google.container.v1beta1.json index 13e22be3..15a96218 100644 --- a/samples/generated_samples/snippet_metadata_google.container.v1beta1.json +++ b/samples/generated_samples/snippet_metadata_google.container.v1beta1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-container", - "version": "2.19.0" + "version": "0.1.0" }, "snippets": [ { From 67e13fc45c0968963c294bfcdfea9a9f31d22ec1 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:05:35 -0400 Subject: [PATCH 2/2] chore(main): release 2.20.0 (#366) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- .release-please-manifest.json | 2 +- CHANGELOG.md | 7 +++++++ google/cloud/container/gapic_version.py | 2 +- google/cloud/container_v1/gapic_version.py | 2 +- google/cloud/container_v1beta1/gapic_version.py | 2 +- .../snippet_metadata_google.container.v1.json | 2 +- .../snippet_metadata_google.container.v1beta1.json | 2 +- 7 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 89652a35..da2177c6 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "2.19.0" + ".": "2.20.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 16c4f246..9315b710 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://pypi.org/project/google-cloud-container/#history +## [2.20.0](https://github.com/googleapis/python-container/compare/v2.19.0...v2.20.0) (2023-04-11) + + +### Features + +* Add support for updating additional pod IPv4 ranges for Standard and Autopilot clusters ([#365](https://github.com/googleapis/python-container/issues/365)) ([c9c29c4](https://github.com/googleapis/python-container/commit/c9c29c46f3c6a8d4dfebec3ec36e5c7fc6052bb7)) + ## [2.19.0](https://github.com/googleapis/python-container/compare/v2.18.0...v2.19.0) (2023-04-06) diff --git a/google/cloud/container/gapic_version.py b/google/cloud/container/gapic_version.py index 0f1a446f..551f0d2e 100644 --- a/google/cloud/container/gapic_version.py +++ b/google/cloud/container/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "2.19.0" # {x-release-please-version} +__version__ = "2.20.0" # {x-release-please-version} diff --git a/google/cloud/container_v1/gapic_version.py b/google/cloud/container_v1/gapic_version.py index 0f1a446f..551f0d2e 100644 --- a/google/cloud/container_v1/gapic_version.py +++ b/google/cloud/container_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "2.19.0" # {x-release-please-version} +__version__ = "2.20.0" # {x-release-please-version} diff --git a/google/cloud/container_v1beta1/gapic_version.py b/google/cloud/container_v1beta1/gapic_version.py index 0f1a446f..551f0d2e 100644 --- a/google/cloud/container_v1beta1/gapic_version.py +++ b/google/cloud/container_v1beta1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "2.19.0" # {x-release-please-version} +__version__ = "2.20.0" # {x-release-please-version} diff --git a/samples/generated_samples/snippet_metadata_google.container.v1.json b/samples/generated_samples/snippet_metadata_google.container.v1.json index 34c1cf39..dc18a98d 100644 --- a/samples/generated_samples/snippet_metadata_google.container.v1.json +++ b/samples/generated_samples/snippet_metadata_google.container.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-container", - "version": "0.1.0" + "version": "2.20.0" }, "snippets": [ { diff --git a/samples/generated_samples/snippet_metadata_google.container.v1beta1.json b/samples/generated_samples/snippet_metadata_google.container.v1beta1.json index 15a96218..6b428d22 100644 --- a/samples/generated_samples/snippet_metadata_google.container.v1beta1.json +++ b/samples/generated_samples/snippet_metadata_google.container.v1beta1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-container", - "version": "0.1.0" + "version": "2.20.0" }, "snippets": [ {