From e656b42cfb072e3db77c08bc26aa8fa179e767da Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 21 Jul 2023 02:32:12 +0000 Subject: [PATCH 1/3] build(deps): [autoapprove] bump pygments from 2.13.0 to 2.15.0 (#394) Source-Link: https://togithub.com/googleapis/synthtool/commit/eaef28efd179e6eeb9f4e9bf697530d074a6f3b9 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:f8ca7655fa8a449cadcabcbce4054f593dcbae7aeeab34aa3fcc8b5cf7a93c9e --- .github/.OwlBot.lock.yaml | 4 ++-- .kokoro/requirements.txt | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index ae4a522b..17c21d96 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:39f0f3f2be02ef036e297e376fe3b6256775576da8a6ccb1d5eeb80f4c8bf8fb -# created: 2023-07-17T15:20:13.819193964Z + digest: sha256:f8ca7655fa8a449cadcabcbce4054f593dcbae7aeeab34aa3fcc8b5cf7a93c9e +# created: 2023-07-21T02:12:46.49799314Z diff --git a/.kokoro/requirements.txt b/.kokoro/requirements.txt index 67d70a11..b563eb28 100644 --- a/.kokoro/requirements.txt +++ b/.kokoro/requirements.txt @@ -396,9 +396,9 @@ pycparser==2.21 \ --hash=sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9 \ --hash=sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206 # via cffi -pygments==2.13.0 \ - --hash=sha256:56a8508ae95f98e2b9bdf93a6be5ae3f7d8af858b43e02c5a2ff083726be40c1 \ - --hash=sha256:f643f331ab57ba3c9d89212ee4a2dabc6e94f117cf4eefde99a0574720d14c42 +pygments==2.15.0 \ + --hash=sha256:77a3299119af881904cd5ecd1ac6a66214b6e9bed1f2db16993b54adede64094 \ + --hash=sha256:f7e36cffc4c517fbc252861b9a6e4644ca0e5abadf9a113c72d1358ad09b9500 # via # readme-renderer # rich From 02c497ec42f3d51a28e31b3cca940e5a147960bd Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 24 Jul 2023 10:24:49 -0400 Subject: [PATCH 2/3] feat: add policy_name to PlacementPolicy message within a node pool (#395) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add policy_name to PlacementPolicy message within a node pool feat: add support for HostMaintenancePolicy feat: add support for AdditionalPodNetworkConfig and AdditionalNodeNetworkConfig feat: add enable_multi_networking to NetworkConfig PiperOrigin-RevId: 550168784 Source-Link: https://github.com/googleapis/googleapis/commit/b53aeac1895ce28b78a8295ee6e04187f4268f43 Source-Link: https://github.com/googleapis/googleapis-gen/commit/6e0edf48c9d991a2d02aa94e723bbd07e45e14d4 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNmUwZWRmNDhjOWQ5OTFhMmQwMmFhOTRlNzIzYmJkMDdlNDVlMTRkNCJ9 * 🦉 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_v1beta1/__init__.py | 6 + .../cloud/container_v1beta1/types/__init__.py | 6 + .../types/cluster_service.py | 180 ++++++++++++++++++ .../snippet_metadata_google.container.v1.json | 2 +- ...pet_metadata_google.container.v1beta1.json | 2 +- 5 files changed, 194 insertions(+), 2 deletions(-) diff --git a/google/cloud/container_v1beta1/__init__.py b/google/cloud/container_v1beta1/__init__.py index 49293099..1b66aa68 100644 --- a/google/cloud/container_v1beta1/__init__.py +++ b/google/cloud/container_v1beta1/__init__.py @@ -21,6 +21,8 @@ from .services.cluster_manager import ClusterManagerAsyncClient, ClusterManagerClient from .types.cluster_service import ( AcceleratorConfig, + AdditionalNodeNetworkConfig, + AdditionalPodNetworkConfig, AdditionalPodRangesConfig, AddonsConfig, AdvancedDatapathObservabilityConfig, @@ -78,6 +80,7 @@ GPUDriverInstallationConfig, GPUSharingConfig, HorizontalPodAutoscaling, + HostMaintenancePolicy, HttpLoadBalancing, IdentityServiceConfig, ILBSubsettingConfig, @@ -199,6 +202,8 @@ __all__ = ( "ClusterManagerAsyncClient", "AcceleratorConfig", + "AdditionalNodeNetworkConfig", + "AdditionalPodNetworkConfig", "AdditionalPodRangesConfig", "AddonsConfig", "AdvancedDatapathObservabilityConfig", @@ -257,6 +262,7 @@ "GetServerConfigRequest", "GkeBackupAgentConfig", "HorizontalPodAutoscaling", + "HostMaintenancePolicy", "HttpLoadBalancing", "ILBSubsettingConfig", "IPAllocationPolicy", diff --git a/google/cloud/container_v1beta1/types/__init__.py b/google/cloud/container_v1beta1/types/__init__.py index 38ccae7d..6d4f4ff1 100644 --- a/google/cloud/container_v1beta1/types/__init__.py +++ b/google/cloud/container_v1beta1/types/__init__.py @@ -15,6 +15,8 @@ # from .cluster_service import ( AcceleratorConfig, + AdditionalNodeNetworkConfig, + AdditionalPodNetworkConfig, AdditionalPodRangesConfig, AddonsConfig, AdvancedDatapathObservabilityConfig, @@ -72,6 +74,7 @@ GPUDriverInstallationConfig, GPUSharingConfig, HorizontalPodAutoscaling, + HostMaintenancePolicy, HttpLoadBalancing, IdentityServiceConfig, ILBSubsettingConfig, @@ -192,6 +195,8 @@ __all__ = ( "AcceleratorConfig", + "AdditionalNodeNetworkConfig", + "AdditionalPodNetworkConfig", "AdditionalPodRangesConfig", "AddonsConfig", "AdvancedDatapathObservabilityConfig", @@ -248,6 +253,7 @@ "GPUDriverInstallationConfig", "GPUSharingConfig", "HorizontalPodAutoscaling", + "HostMaintenancePolicy", "HttpLoadBalancing", "IdentityServiceConfig", "ILBSubsettingConfig", diff --git a/google/cloud/container_v1beta1/types/cluster_service.py b/google/cloud/container_v1beta1/types/cluster_service.py index 6216aaa2..927fc82a 100644 --- a/google/cloud/container_v1beta1/types/cluster_service.py +++ b/google/cloud/container_v1beta1/types/cluster_service.py @@ -39,6 +39,8 @@ "NodeConfig", "AdvancedMachineFeatures", "NodeNetworkConfig", + "AdditionalNodeNetworkConfig", + "AdditionalPodNetworkConfig", "ShieldedInstanceConfig", "SandboxConfig", "EphemeralStorageConfig", @@ -47,6 +49,7 @@ "GcfsConfig", "ReservationAffinity", "SoleTenantConfig", + "HostMaintenancePolicy", "NodeTaint", "NodeTaints", "NodeLabels", @@ -687,6 +690,10 @@ class NodeConfig(proto.Message): sole_tenant_config (google.cloud.container_v1beta1.types.SoleTenantConfig): Parameters for node pools to be backed by shared sole tenant node groups. + host_maintenance_policy (google.cloud.container_v1beta1.types.HostMaintenancePolicy): + HostMaintenancePolicy contains the desired + maintenance policy for the Google Compute Engine + hosts. """ machine_type: str = proto.Field( @@ -852,6 +859,11 @@ class NodeConfig(proto.Message): number=42, message="SoleTenantConfig", ) + host_maintenance_policy: "HostMaintenancePolicy" = proto.Field( + proto.MESSAGE, + number=44, + message="HostMaintenancePolicy", + ) class AdvancedMachineFeatures(proto.Message): @@ -953,6 +965,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_v1beta1.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_v1beta1.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 @@ -1032,12 +1053,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_v1beta1.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. @@ -1303,6 +1398,56 @@ class Operator(proto.Enum): ) +class HostMaintenancePolicy(proto.Message): + r"""HostMaintenancePolicy contains the maintenance policy for the + hosts on which the GKE VMs run on. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + maintenance_interval (google.cloud.container_v1beta1.types.HostMaintenancePolicy.MaintenanceInterval): + Specifies the frequency of planned + maintenance events. + + This field is a member of `oneof`_ ``_maintenance_interval``. + """ + + class MaintenanceInterval(proto.Enum): + r"""Allows selecting how infrastructure upgrades should be + applied to the cluster or node pool. + + Values: + MAINTENANCE_INTERVAL_UNSPECIFIED (0): + The maintenance interval is not explicitly + specified. + AS_NEEDED (1): + Nodes are eligible to receive infrastructure + and hypervisor updates as they become available. + This may result in more maintenance operations + (live migrations or terminations) for the node + than the PERIODIC option. + PERIODIC (2): + Nodes receive infrastructure and hypervisor updates on a + periodic basis, minimizing the number of maintenance + operations (live migrations or terminations) on an + individual VM. This may mean underlying VMs will take longer + to receive an update than if it was configured for + AS_NEEDED. Security updates will still be applied as soon as + they are available. + """ + MAINTENANCE_INTERVAL_UNSPECIFIED = 0 + AS_NEEDED = 1 + PERIODIC = 2 + + maintenance_interval: MaintenanceInterval = proto.Field( + proto.ENUM, + number=1, + optional=True, + enum=MaintenanceInterval, + ) + + class NodeTaint(proto.Message): r"""Kubernetes taint is composed of three fields: key, value, and effect. Effect can only be one of three types: NoSchedule, @@ -3474,6 +3619,10 @@ class NodeConfigDefaults(proto.Message): known as Riptide) options. logging_config (google.cloud.container_v1beta1.types.NodePoolLoggingConfig): Logging configuration for node pools. + host_maintenance_policy (google.cloud.container_v1beta1.types.HostMaintenancePolicy): + HostMaintenancePolicy contains the desired + maintenance policy for the Google Compute Engine + hosts. """ gcfs_config: "GcfsConfig" = proto.Field( @@ -3486,6 +3635,11 @@ class NodeConfigDefaults(proto.Message): number=3, message="NodePoolLoggingConfig", ) + host_maintenance_policy: "HostMaintenancePolicy" = proto.Field( + proto.MESSAGE, + number=5, + message="HostMaintenancePolicy", + ) class NodePoolAutoConfig(proto.Message): @@ -3751,6 +3905,10 @@ class ClusterUpdate(proto.Message): the autopilot cluster. desired_k8s_beta_apis (google.cloud.container_v1beta1.types.K8sBetaAPIConfig): Beta APIs enabled for cluster. + desired_host_maintenance_policy (google.cloud.container_v1beta1.types.HostMaintenancePolicy): + HostMaintenancePolicy contains the desired + maintenance policy for the Google Compute Engine + hosts. """ desired_node_version: str = proto.Field( @@ -4028,6 +4186,11 @@ class ClusterUpdate(proto.Message): number=131, message="K8sBetaAPIConfig", ) + desired_host_maintenance_policy: "HostMaintenancePolicy" = proto.Field( + proto.MESSAGE, + number=132, + message="HostMaintenancePolicy", + ) class AdditionalPodRangesConfig(proto.Message): @@ -6314,6 +6477,12 @@ class PlacementPolicy(proto.Message): tpu_topology (str): TPU placement topology for pod slice node pool. https://cloud.google.com/tpu/docs/types-topologies#tpu_topologies + 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): @@ -6340,6 +6509,10 @@ class Type(proto.Enum): proto.STRING, number=2, ) + policy_name: str = proto.Field( + proto.STRING, + number=3, + ) name: str = proto.Field( proto.STRING, @@ -8008,6 +8181,9 @@ class NetworkConfig(proto.Message): gateway_api_config (google.cloud.container_v1beta1.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_v1beta1.types.NetworkConfig.ClusterNetworkPerformanceConfig): Network bandwidth tier configuration. enable_fqdn_network_policy (bool): @@ -8096,6 +8272,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, diff --git a/samples/generated_samples/snippet_metadata_google.container.v1.json b/samples/generated_samples/snippet_metadata_google.container.v1.json index 97e671e8..477de1ee 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.27.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 5e7d1e7a..afdb562b 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.27.0" + "version": "0.1.0" }, "snippets": [ { From a835ab2b09f3ebcb56fbca0bba3097b61939ea38 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 24 Jul 2023 16:51:47 -0400 Subject: [PATCH 3/3] chore(main): release 2.28.0 (#396) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- .release-please-manifest.json | 2 +- CHANGELOG.md | 10 ++++++++++ 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, 16 insertions(+), 6 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 05b2e26e..5a1fd619 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "2.27.0" + ".": "2.28.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index abaf63f1..7edfa12d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,16 @@ [1]: https://pypi.org/project/google-cloud-container/#history +## [2.28.0](https://github.com/googleapis/python-container/compare/v2.27.0...v2.28.0) (2023-07-24) + + +### Features + +* **v1beta1:** Add enable_multi_networking to NetworkConfig ([02c497e](https://github.com/googleapis/python-container/commit/02c497ec42f3d51a28e31b3cca940e5a147960bd)) +* **v1beta1:** Add policy_name to PlacementPolicy message within a node pool ([02c497e](https://github.com/googleapis/python-container/commit/02c497ec42f3d51a28e31b3cca940e5a147960bd)) +* **v1beta1:** Add support for AdditionalPodNetworkConfig and AdditionalNodeNetworkConfig ([02c497e](https://github.com/googleapis/python-container/commit/02c497ec42f3d51a28e31b3cca940e5a147960bd)) +* **v1beta1:** Add support for HostMaintenancePolicy ([02c497e](https://github.com/googleapis/python-container/commit/02c497ec42f3d51a28e31b3cca940e5a147960bd)) + ## [2.27.0](https://github.com/googleapis/python-container/compare/v2.26.0...v2.27.0) (2023-07-19) diff --git a/google/cloud/container/gapic_version.py b/google/cloud/container/gapic_version.py index f0fcebfa..8f0f03c0 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.27.0" # {x-release-please-version} +__version__ = "2.28.0" # {x-release-please-version} diff --git a/google/cloud/container_v1/gapic_version.py b/google/cloud/container_v1/gapic_version.py index f0fcebfa..8f0f03c0 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.27.0" # {x-release-please-version} +__version__ = "2.28.0" # {x-release-please-version} diff --git a/google/cloud/container_v1beta1/gapic_version.py b/google/cloud/container_v1beta1/gapic_version.py index f0fcebfa..8f0f03c0 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.27.0" # {x-release-please-version} +__version__ = "2.28.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 477de1ee..92e41474 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.28.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 afdb562b..441d8010 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.28.0" }, "snippets": [ {