From 31d7cb9cee2b8e5d9f62b51ea93fc530d7273e98 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 25 May 2023 16:14:20 +0000 Subject: [PATCH 1/3] build(deps): bump requests to 2.31.0 [autoapprove] (#371) Source-Link: https://togithub.com/googleapis/synthtool/commit/30bd01b4ab78bf1b2a425816e15b3e7e090993dd Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:9bc5fa3b62b091f60614c08a7fb4fd1d3e1678e326f34dd66ce1eefb5dc3267b --- .github/.OwlBot.lock.yaml | 3 ++- .kokoro/requirements.txt | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index b8edda51..32b3c486 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:2e247c7bf5154df7f98cce087a20ca7605e236340c7d6d1a14447e5c06791bd6 + digest: sha256:9bc5fa3b62b091f60614c08a7fb4fd1d3e1678e326f34dd66ce1eefb5dc3267b +# created: 2023-05-25T14:56:16.294623272Z diff --git a/.kokoro/requirements.txt b/.kokoro/requirements.txt index 66a2172a..3b8d7ee8 100644 --- a/.kokoro/requirements.txt +++ b/.kokoro/requirements.txt @@ -419,9 +419,9 @@ readme-renderer==37.3 \ --hash=sha256:cd653186dfc73055656f090f227f5cb22a046d7f71a841dfa305f55c9a513273 \ --hash=sha256:f67a16caedfa71eef48a31b39708637a6f4664c4394801a7b0d6432d13907343 # via twine -requests==2.28.1 \ - --hash=sha256:7c5599b102feddaa661c826c56ab4fee28bfd17f5abca1ebbe3e7f19d7c97983 \ - --hash=sha256:8fefa2a1a1365bf5520aac41836fbee479da67864514bdb821f31ce07ce65349 +requests==2.31.0 \ + --hash=sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f \ + --hash=sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1 # via # gcp-releasetool # google-api-core From f3126afbc21296e5f3e0608276bc7903ae969fe3 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 1 Jun 2023 04:00:46 -0700 Subject: [PATCH 2/3] feat: add SoleTenantConfig API (#369) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: Operation.Type is now documented in detail docs: Operation.self_link and Operation.target_link given examples feat: Cluster resizes will now have their own operation type (RESIZE_CLUSTER) instead of reusing REPAIR_CLUSTER; they will start using this in the near future PiperOrigin-RevId: 526970355 Source-Link: https://github.com/googleapis/googleapis/commit/83fd1f9853a0d68f06ebbbae0f2f8cd1d5f07d6b Source-Link: https://github.com/googleapis/googleapis-gen/commit/5a191c3aa2c526a59eea597c7ddda79481b8e858 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNWExOTFjM2FhMmM1MjZhNTllZWE1OTdjN2RkZGE3OTQ4MWI4ZTg1OCJ9 docs: Operation.Type is now documented in detail docs: Operation.self_link and Operation.target_link given examples feat: Cluster resizes will now have their own operation type (RESIZE_CLUSTER) instead of reusing REPAIR_CLUSTER; they will start using this in the near future PiperOrigin-RevId: 526025502 Source-Link: https://github.com/googleapis/googleapis/commit/427318085badbe1714eb7e77f91ee4cb1911ffbb Source-Link: https://github.com/googleapis/googleapis-gen/commit/772e2cd48f561e1f0a4d172e9f9285ad9e1c1210 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNzcyZTJjZDQ4ZjU2MWUxZjBhNGQxNzJlOWY5Mjg1YWQ5ZTFjMTIxMCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: support fleet registration via cluster update PiperOrigin-RevId: 529131876 Source-Link: https://github.com/googleapis/googleapis/commit/d1752936bf63f93d5cf4f4b4a5b63d40e8c4db97 Source-Link: https://github.com/googleapis/googleapis-gen/commit/b680d48a0f6762d94e0e14ebffb7868e6c59335b Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjY4MGQ0OGEwZjY3NjJkOTRlMGUxNGViZmZiNzg2OGU2YzU5MzM1YiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: add a new feature for fleet registration via cluster update in v1alpha1, v1beta1, v1 PiperOrigin-RevId: 529516002 Source-Link: https://github.com/googleapis/googleapis/commit/5ce0665d7d8fb8c72457433fe4bacf3a39b96b8b Source-Link: https://github.com/googleapis/googleapis-gen/commit/5122c363014832df2113f474f56137b4bc0b3ca3 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTEyMmMzNjMwMTQ4MzJkZjIxMTNmNDc0ZjU2MTM3YjRiYzBiM2NhMyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * docs: clarified release channel defaulting behavior for create cluster requests when release channel is unspecified If release channel is left unspecified on cluster creation and a version is specified, the cluster is now enrolled in the most mature release channel where the version is available (first checking STABLE, then REGULAR, and finally RAPID) instead of being enrolled in STATIC. This only affects clusters with node auto upgrades enabled and no explicit node version specified. To ensure new clusters are enrolled in static, explicitly specify that the cluster should not be enrolled in a channel. PiperOrigin-RevId: 532773421 Source-Link: https://github.com/googleapis/googleapis/commit/633d3c16bfd53f2ed2e41a7180691cff97432398 Source-Link: https://github.com/googleapis/googleapis-gen/commit/f779f562476199d1f02156ac28f97ec9e37067eb Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjc3OWY1NjI0NzYxOTlkMWYwMjE1NmFjMjhmOTdlYzllMzcwNjdlYiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * docs: clarified release channel defaulting behavior for create cluster requests when release channel is unspecified If release channel is left unspecified on cluster creation and a version is specified, the cluster is now enrolled in the most mature release channel where the version is available (first checking STABLE, then REGULAR, and finally RAPID) instead of being enrolled in STATIC. This only affects clusters with node auto upgrades enabled and no explicit node version specified. To ensure new clusters are enrolled in static, explicitly specify that the cluster should not be enrolled in a channel. PiperOrigin-RevId: 532773462 Source-Link: https://github.com/googleapis/googleapis/commit/aeae5ea2b01ece6c0cee046ae84b881cdc62b95d Source-Link: https://github.com/googleapis/googleapis-gen/commit/d4d433d4eaa8b4d780f83062bf1a81d04646ea41 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZDRkNDMzZDRlYWE4YjRkNzgwZjgzMDYyYmYxYTgxZDA0NjQ2ZWE0MSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: add SoleTenantConfig API PiperOrigin-RevId: 536516473 Source-Link: https://github.com/googleapis/googleapis/commit/0fb1181647f076e33f936babee46cdf362798dd5 Source-Link: https://github.com/googleapis/googleapis-gen/commit/3d69310994242d5bdb9d345f4d894d45b7262f9d Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiM2Q2OTMxMDk5NDI0MmQ1YmRiOWQzNDVmNGQ4OTRkNDViNzI2MmY5ZCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: add SoleTenantConfig API PiperOrigin-RevId: 536569254 Source-Link: https://github.com/googleapis/googleapis/commit/3cc45f010cebf0e5b11afb88d2d3e1827244e2e3 Source-Link: https://github.com/googleapis/googleapis-gen/commit/ed8d7546cd177053d5312d0e40f7f506352ba805 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWQ4ZDc1NDZjZDE3NzA1M2Q1MzEyZDBlNDBmN2Y1MDYzNTJiYTgwNSJ9 * 🦉 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 Co-authored-by: Anthonios Partheniou --- 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 | 232 ++++++++++++++-- google/cloud/container_v1beta1/__init__.py | 4 + .../cloud/container_v1beta1/types/__init__.py | 4 + .../types/cluster_service.py | 256 ++++++++++++++++-- .../snippet_metadata_google.container.v1.json | 2 +- ...pet_metadata_google.container.v1beta1.json | 2 +- 9 files changed, 450 insertions(+), 56 deletions(-) diff --git a/google/cloud/container/__init__.py b/google/cloud/container/__init__.py index 10d63a13..477cb459 100644 --- a/google/cloud/container/__init__.py +++ b/google/cloud/container/__init__.py @@ -156,6 +156,7 @@ SetNodePoolSizeRequest, ShieldedInstanceConfig, ShieldedNodes, + SoleTenantConfig, StackType, StartIPRotationRequest, StatusCondition, @@ -305,6 +306,7 @@ "SetNodePoolSizeRequest", "ShieldedInstanceConfig", "ShieldedNodes", + "SoleTenantConfig", "StartIPRotationRequest", "StatusCondition", "TimeWindow", diff --git a/google/cloud/container_v1/__init__.py b/google/cloud/container_v1/__init__.py index 86c11d3e..c7cd3767 100644 --- a/google/cloud/container_v1/__init__.py +++ b/google/cloud/container_v1/__init__.py @@ -151,6 +151,7 @@ SetNodePoolSizeRequest, ShieldedInstanceConfig, ShieldedNodes, + SoleTenantConfig, StackType, StartIPRotationRequest, StatusCondition, @@ -304,6 +305,7 @@ "SetNodePoolSizeRequest", "ShieldedInstanceConfig", "ShieldedNodes", + "SoleTenantConfig", "StackType", "StartIPRotationRequest", "StatusCondition", diff --git a/google/cloud/container_v1/types/__init__.py b/google/cloud/container_v1/types/__init__.py index 913d39ab..bc9131a0 100644 --- a/google/cloud/container_v1/types/__init__.py +++ b/google/cloud/container_v1/types/__init__.py @@ -145,6 +145,7 @@ SetNodePoolSizeRequest, ShieldedInstanceConfig, ShieldedNodes, + SoleTenantConfig, StackType, StartIPRotationRequest, StatusCondition, @@ -292,6 +293,7 @@ "SetNodePoolSizeRequest", "ShieldedInstanceConfig", "ShieldedNodes", + "SoleTenantConfig", "StartIPRotationRequest", "StatusCondition", "TimeWindow", diff --git a/google/cloud/container_v1/types/cluster_service.py b/google/cloud/container_v1/types/cluster_service.py index 0f34acc6..52d7de75 100644 --- a/google/cloud/container_v1/types/cluster_service.py +++ b/google/cloud/container_v1/types/cluster_service.py @@ -43,6 +43,7 @@ "SandboxConfig", "GcfsConfig", "ReservationAffinity", + "SoleTenantConfig", "NodeTaint", "NodeTaints", "NodeLabels", @@ -656,6 +657,9 @@ class NodeConfig(proto.Message): Parameters for the node ephemeral storage using Local SSDs. If unspecified, ephemeral storage is backed by the boot disk. + sole_tenant_config (google.cloud.container_v1.types.SoleTenantConfig): + Parameters for node pools to be backed by + shared sole tenant node groups. """ machine_type: str = proto.Field( @@ -811,6 +815,11 @@ class NodeConfig(proto.Message): number=41, message="EphemeralStorageLocalSsdConfig", ) + sole_tenant_config: "SoleTenantConfig" = proto.Field( + proto.MESSAGE, + number=42, + message="SoleTenantConfig", + ) class AdvancedMachineFeatures(proto.Message): @@ -1108,6 +1117,67 @@ class Type(proto.Enum): ) +class SoleTenantConfig(proto.Message): + r"""SoleTenantConfig contains the NodeAffinities to specify what + shared sole tenant node groups should back the node pool. + + Attributes: + node_affinities (MutableSequence[google.cloud.container_v1.types.SoleTenantConfig.NodeAffinity]): + NodeAffinities used to match to a shared sole + tenant node group. + """ + + class NodeAffinity(proto.Message): + r"""Specifies the NodeAffinity key, values, and affinity operator + according to `shared sole tenant node group + affinities `__. + + Attributes: + key (str): + Key for NodeAffinity. + operator (google.cloud.container_v1.types.SoleTenantConfig.NodeAffinity.Operator): + Operator for NodeAffinity. + values (MutableSequence[str]): + Values for NodeAffinity. + """ + + class Operator(proto.Enum): + r"""Operator allows user to specify affinity or anti-affinity for + the given key values. + + Values: + OPERATOR_UNSPECIFIED (0): + Invalid or unspecified affinity operator. + IN (1): + Affinity operator. + NOT_IN (2): + Anti-affinity operator. + """ + OPERATOR_UNSPECIFIED = 0 + IN = 1 + NOT_IN = 2 + + key: str = proto.Field( + proto.STRING, + number=1, + ) + operator: "SoleTenantConfig.NodeAffinity.Operator" = proto.Field( + proto.ENUM, + number=2, + enum="SoleTenantConfig.NodeAffinity.Operator", + ) + values: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=3, + ) + + node_affinities: MutableSequence[NodeAffinity] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=NodeAffinity, + ) + + 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, @@ -2287,7 +2357,15 @@ class Cluster(proto.Message): shielded_nodes (google.cloud.container_v1.types.ShieldedNodes): Shielded Nodes configuration. release_channel (google.cloud.container_v1.types.ReleaseChannel): - Release channel configuration. + Release channel configuration. If left + unspecified on cluster creation and a version is + specified, the cluster is enrolled in the most + mature release channel where the version is + available (first checking STABLE, then REGULAR, + and finally RAPID). Otherwise, if no release + channel configuration and no version is + specified, the cluster is enrolled in the + REGULAR channel with its default version. workload_identity_config (google.cloud.container_v1.types.WorkloadIdentityConfig): Configuration for the use of Kubernetes Service Accounts in GCP IAM policies. @@ -2992,6 +3070,9 @@ class ClusterUpdate(proto.Message): desired_node_pool_logging_config (google.cloud.container_v1.types.NodePoolLoggingConfig): The desired node pool logging configuration defaults for the cluster. + desired_fleet (google.cloud.container_v1.types.Fleet): + The desired fleet configuration for the + cluster. desired_stack_type (google.cloud.container_v1.types.StackType): The desired stack type of the cluster. If a stack type is provided and does not match @@ -3198,6 +3279,11 @@ class ClusterUpdate(proto.Message): number=116, message="NodePoolLoggingConfig", ) + desired_fleet: "Fleet" = proto.Field( + proto.MESSAGE, + number=117, + message="Fleet", + ) desired_stack_type: "StackType" = proto.Field( proto.ENUM, number=119, @@ -3255,10 +3341,24 @@ class Operation(proto.Message): textual description of the error. Deprecated. Use the field error instead. self_link (str): - Server-defined URL for the resource. + Server-defined URI for the operation. Example: + ``https://container.googleapis.com/v1alpha1/projects/123/locations/us-central1/operations/operation-123``. target_link (str): - Server-defined URL for the target of the - operation. + Server-defined URI for the target of the operation. The + format of this is a URI to the resource being modified (such + as a cluster, node pool, or node). For node pool repairs, + there may be multiple nodes being repaired, but only one + will be the target. + + Examples: + + - + + ``https://container.googleapis.com/v1/projects/123/locations/us-central1/clusters/my-cluster`` + + ``https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np`` + + ``https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np/node/my-node`` location (str): [Output only] The name of the Google Compute Engine `zone `__ @@ -3310,43 +3410,120 @@ class Status(proto.Enum): ABORTING = 4 class Type(proto.Enum): - r"""Operation type. + r"""Operation type categorizes the operation. Values: TYPE_UNSPECIFIED (0): Not set. CREATE_CLUSTER (1): - Cluster create. + The cluster is being created. The cluster should be assumed + to be unusable until the operation finishes. + + In the event of the operation failing, the cluster will + enter the [ERROR state][Cluster.Status.ERROR] and eventually + be deleted. DELETE_CLUSTER (2): - Cluster delete. + The cluster is being deleted. The cluster should be assumed + to be unusable as soon as this operation starts. + + In the event of the operation failing, the cluster will + enter the [ERROR state][Cluster.Status.ERROR] and the + deletion will be automatically retried until completed. UPGRADE_MASTER (3): - A master upgrade. + The [cluster + version][google.container.v1.ClusterUpdate.desired_master_version] + is being updated. Note that this includes "upgrades" to the + same version, which are simply a recreation. This also + includes + `auto-upgrades `__. + For more details, see `documentation on cluster + upgrades `__. UPGRADE_NODES (4): - A node upgrade. + A node pool is being updated. Despite calling this an + "upgrade", this includes most forms of updates to node + pools. This also includes + `auto-upgrades `__. + + This operation sets the + [progress][google.container.v1.Operation.progress] field and + may be + [canceled][google.container.v1.ClusterManager.CancelOperation]. + + The upgrade strategy depends on `node pool + configuration `__. + The nodes are generally still usable during this operation. REPAIR_CLUSTER (5): - Cluster repair. + A problem has been detected with the control plane and is + being repaired. This operation type is initiated by GKE. For + more details, see `documentation on + repairs `__. UPDATE_CLUSTER (6): - Cluster update. + The cluster is being updated. This is a broad category of + operations and includes operations that only change metadata + as well as those that must recreate the entire cluster. If + the control plane must be recreated, this will cause + temporary downtime for zonal clusters. + + Some features require recreating the nodes as well. Those + will be recreated as separate operations and the update may + not be completely functional until the node pools + recreations finish. Node recreations will generally follow + `maintenance + policies `__. + + Some GKE-initiated operations use this type. This includes + certain types of auto-upgrades and incident mitigations. CREATE_NODE_POOL (7): - Node pool create. + A node pool is being created. The node pool should be + assumed to be unusable until this operation finishes. In the + event of an error, the node pool may be partially created. + + If enabled, `node + autoprovisioning `__ + may have automatically initiated such operations. DELETE_NODE_POOL (8): - Node pool delete. + The node pool is being deleted. The node pool + should be assumed to be unusable as soon as this + operation starts. SET_NODE_POOL_MANAGEMENT (9): - Set node pool management. + The node pool's + [manamagent][google.container.v1.NodePool.management] field + is being updated. These operations only update metadata and + may be concurrent with most other operations. AUTO_REPAIR_NODES (10): - Automatic node pool repair. + A problem has been detected with nodes and `they are being + repaired `__. + This operation type is initiated by GKE, typically + automatically. This operation may be concurrent with other + operations and there may be multiple repairs occurring on + the same node pool. AUTO_UPGRADE_NODES (11): - Automatic node upgrade. + Unused. Automatic node upgrade uses + [UPGRADE_NODES][google.container.v1.Operation.Type.UPGRADE_NODES]. SET_LABELS (12): - Set labels. + Unused. Updating labels uses + [UPDATE_CLUSTER][google.container.v1.Operation.Type.UPDATE_CLUSTER]. SET_MASTER_AUTH (13): - Set/generate master auth materials + Unused. Updating master auth uses + [UPDATE_CLUSTER][google.container.v1.Operation.Type.UPDATE_CLUSTER]. SET_NODE_POOL_SIZE (14): - Set node pool size. + The node pool is being resized. With the + exception of resizing to or from size zero, the + node pool is generally usable during this + operation. SET_NETWORK_POLICY (15): - Updates network policy for a cluster. + Unused. Updating network policy uses + [UPDATE_CLUSTER][google.container.v1.Operation.Type.UPDATE_CLUSTER]. SET_MAINTENANCE_POLICY (16): - Set the maintenance policy. + Unused. Updating maintenance policy uses + [UPDATE_CLUSTER][google.container.v1.Operation.Type.UPDATE_CLUSTER]. + RESIZE_CLUSTER (18): + The control plane is being resized. This operation type is + initiated by GKE. These operations are often performed + preemptively to ensure that the control plane has sufficient + resources and is not typically an indication of issues. For + more details, see `documentation on + resizes `__. """ TYPE_UNSPECIFIED = 0 CREATE_CLUSTER = 1 @@ -3365,6 +3542,7 @@ class Type(proto.Enum): SET_NODE_POOL_SIZE = 14 SET_NETWORK_POLICY = 15 SET_MAINTENANCE_POLICY = 16 + RESIZE_CLUSTER = 18 name: str = proto.Field( proto.STRING, @@ -7220,12 +7398,12 @@ class DatabaseEncryption(proto.Message): r"""Configuration of etcd encryption. Attributes: - state (google.cloud.container_v1.types.DatabaseEncryption.State): - Denotes the state of etcd encryption. key_name (str): Name of CloudKMS key to use for the encryption of secrets in etcd. Ex. projects/my-project/locations/global/keyRings/my-ring/cryptoKeys/my-key + state (google.cloud.container_v1.types.DatabaseEncryption.State): + The desired state of etcd encryption. """ class State(proto.Enum): @@ -7245,15 +7423,15 @@ class State(proto.Enum): ENCRYPTED = 1 DECRYPTED = 2 + key_name: str = proto.Field( + proto.STRING, + number=1, + ) state: State = proto.Field( proto.ENUM, number=2, enum=State, ) - key_name: str = proto.Field( - proto.STRING, - number=1, - ) class ListUsableSubnetworksRequest(proto.Message): diff --git a/google/cloud/container_v1beta1/__init__.py b/google/cloud/container_v1beta1/__init__.py index 05d6baf5..b1804d1b 100644 --- a/google/cloud/container_v1beta1/__init__.py +++ b/google/cloud/container_v1beta1/__init__.py @@ -60,6 +60,7 @@ GcePersistentDiskCsiDriverConfig, GcfsConfig, GcpFilestoreCsiDriverConfig, + GcsFuseCsiDriverConfig, GetClusterRequest, GetJSONWebKeysRequest, GetJSONWebKeysResponse, @@ -160,6 +161,7 @@ SetNodePoolSizeRequest, ShieldedInstanceConfig, ShieldedNodes, + SoleTenantConfig, StackType, StartIPRotationRequest, StatusCondition, @@ -228,6 +230,7 @@ "GcePersistentDiskCsiDriverConfig", "GcfsConfig", "GcpFilestoreCsiDriverConfig", + "GcsFuseCsiDriverConfig", "GetClusterRequest", "GetJSONWebKeysRequest", "GetJSONWebKeysResponse", @@ -327,6 +330,7 @@ "SetNodePoolSizeRequest", "ShieldedInstanceConfig", "ShieldedNodes", + "SoleTenantConfig", "StackType", "StartIPRotationRequest", "StatusCondition", diff --git a/google/cloud/container_v1beta1/types/__init__.py b/google/cloud/container_v1beta1/types/__init__.py index ccd60805..5c999336 100644 --- a/google/cloud/container_v1beta1/types/__init__.py +++ b/google/cloud/container_v1beta1/types/__init__.py @@ -54,6 +54,7 @@ GcePersistentDiskCsiDriverConfig, GcfsConfig, GcpFilestoreCsiDriverConfig, + GcsFuseCsiDriverConfig, GetClusterRequest, GetJSONWebKeysRequest, GetJSONWebKeysResponse, @@ -154,6 +155,7 @@ SetNodePoolSizeRequest, ShieldedInstanceConfig, ShieldedNodes, + SoleTenantConfig, StackType, StartIPRotationRequest, StatusCondition, @@ -218,6 +220,7 @@ "GcePersistentDiskCsiDriverConfig", "GcfsConfig", "GcpFilestoreCsiDriverConfig", + "GcsFuseCsiDriverConfig", "GetClusterRequest", "GetJSONWebKeysRequest", "GetJSONWebKeysResponse", @@ -316,6 +319,7 @@ "SetNodePoolSizeRequest", "ShieldedInstanceConfig", "ShieldedNodes", + "SoleTenantConfig", "StartIPRotationRequest", "StatusCondition", "TimeWindow", diff --git a/google/cloud/container_v1beta1/types/cluster_service.py b/google/cloud/container_v1beta1/types/cluster_service.py index 7aa9b500..76610a83 100644 --- a/google/cloud/container_v1beta1/types/cluster_service.py +++ b/google/cloud/container_v1beta1/types/cluster_service.py @@ -46,6 +46,7 @@ "EphemeralStorageLocalSsdConfig", "GcfsConfig", "ReservationAffinity", + "SoleTenantConfig", "NodeTaint", "NodeTaints", "NodeLabels", @@ -64,6 +65,7 @@ "ConfigConnectorConfig", "GcePersistentDiskCsiDriverConfig", "GcpFilestoreCsiDriverConfig", + "GcsFuseCsiDriverConfig", "PrivateClusterMasterGlobalAccessConfig", "PrivateClusterConfig", "IstioConfig", @@ -657,6 +659,9 @@ class NodeConfig(proto.Message): If unspecified, ephemeral storage is backed by the boot disk. This field is functionally equivalent to the ephemeral_storage_config + sole_tenant_config (google.cloud.container_v1beta1.types.SoleTenantConfig): + Parameters for node pools to be backed by + shared sole tenant node groups. """ machine_type: str = proto.Field( @@ -817,6 +822,11 @@ class NodeConfig(proto.Message): number=41, message="EphemeralStorageLocalSsdConfig", ) + sole_tenant_config: "SoleTenantConfig" = proto.Field( + proto.MESSAGE, + number=42, + message="SoleTenantConfig", + ) class AdvancedMachineFeatures(proto.Message): @@ -1197,6 +1207,67 @@ class Type(proto.Enum): ) +class SoleTenantConfig(proto.Message): + r"""SoleTenantConfig contains the NodeAffinities to specify what + shared sole tenant node groups should back the node pool. + + Attributes: + node_affinities (MutableSequence[google.cloud.container_v1beta1.types.SoleTenantConfig.NodeAffinity]): + NodeAffinities used to match to a shared sole + tenant node group. + """ + + class NodeAffinity(proto.Message): + r"""Specifies the NodeAffinity key, values, and affinity operator + according to `shared sole tenant node group + affinities `__. + + Attributes: + key (str): + Key for NodeAffinity. + operator (google.cloud.container_v1beta1.types.SoleTenantConfig.NodeAffinity.Operator): + Operator for NodeAffinity. + values (MutableSequence[str]): + Values for NodeAffinity. + """ + + class Operator(proto.Enum): + r"""Operator allows user to specify affinity or anti-affinity for + the given key values. + + Values: + OPERATOR_UNSPECIFIED (0): + Invalid or unspecified affinity operator. + IN (1): + Affinity operator. + NOT_IN (2): + Anti-affinity operator. + """ + OPERATOR_UNSPECIFIED = 0 + IN = 1 + NOT_IN = 2 + + key: str = proto.Field( + proto.STRING, + number=1, + ) + operator: "SoleTenantConfig.NodeAffinity.Operator" = proto.Field( + proto.ENUM, + number=2, + enum="SoleTenantConfig.NodeAffinity.Operator", + ) + values: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=3, + ) + + node_affinities: MutableSequence[NodeAffinity] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=NodeAffinity, + ) + + 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, @@ -1453,6 +1524,9 @@ class AddonsConfig(proto.Message): gke_backup_agent_config (google.cloud.container_v1beta1.types.GkeBackupAgentConfig): Configuration for the Backup for GKE agent addon. + gcs_fuse_csi_driver_config (google.cloud.container_v1beta1.types.GcsFuseCsiDriverConfig): + Configuration for the Cloud Storage Fuse CSI + driver. """ http_load_balancing: "HttpLoadBalancing" = proto.Field( @@ -1517,6 +1591,11 @@ class AddonsConfig(proto.Message): number=16, message="GkeBackupAgentConfig", ) + gcs_fuse_csi_driver_config: "GcsFuseCsiDriverConfig" = proto.Field( + proto.MESSAGE, + number=17, + message="GcsFuseCsiDriverConfig", + ) class HttpLoadBalancing(proto.Message): @@ -1679,6 +1758,21 @@ class GcpFilestoreCsiDriverConfig(proto.Message): ) +class GcsFuseCsiDriverConfig(proto.Message): + r"""Configuration for the Cloud Storage Fuse CSI driver. + + Attributes: + enabled (bool): + Whether the Cloud Storage Fuse CSI driver is + enabled for this cluster. + """ + + enabled: bool = proto.Field( + proto.BOOL, + number=1, + ) + + class PrivateClusterMasterGlobalAccessConfig(proto.Message): r"""Configuration for controlling master global access settings. @@ -2563,7 +2657,15 @@ class Cluster(proto.Message): shielded_nodes (google.cloud.container_v1beta1.types.ShieldedNodes): Shielded Nodes configuration. release_channel (google.cloud.container_v1beta1.types.ReleaseChannel): - Release channel configuration. + Release channel configuration. If left + unspecified on cluster creation and a version is + specified, the cluster is enrolled in the most + mature release channel where the version is + available (first checking STABLE, then REGULAR, + and finally RAPID). Otherwise, if no release + channel configuration and no version is + specified, the cluster is enrolled in the + REGULAR channel with its default version. workload_identity_config (google.cloud.container_v1beta1.types.WorkloadIdentityConfig): Configuration for the use of Kubernetes Service Accounts in GCP IAM policies. @@ -3456,6 +3558,9 @@ class ClusterUpdate(proto.Message): desired_node_pool_logging_config (google.cloud.container_v1beta1.types.NodePoolLoggingConfig): The desired node pool logging configuration defaults for the cluster. + desired_fleet (google.cloud.container_v1beta1.types.Fleet): + The desired fleet configuration for the + cluster. desired_stack_type (google.cloud.container_v1beta1.types.StackType): The desired stack type of the cluster. If a stack type is provided and does not match @@ -3698,6 +3803,11 @@ class ClusterUpdate(proto.Message): number=116, message="NodePoolLoggingConfig", ) + desired_fleet: "Fleet" = proto.Field( + proto.MESSAGE, + number=117, + message="Fleet", + ) desired_stack_type: "StackType" = proto.Field( proto.ENUM, number=119, @@ -3755,10 +3865,24 @@ class Operation(proto.Message): textual description of the error. Deprecated. Use field error instead. self_link (str): - Server-defined URL for the resource. + Server-defined URI for the operation. Example: + ``https://container.googleapis.com/v1alpha1/projects/123/locations/us-central1/operations/operation-123``. target_link (str): - Server-defined URL for the target of the - operation. + Server-defined URI for the target of the operation. The + format of this is a URI to the resource being modified (such + as a cluster, node pool, or node). For node pool repairs, + there may be multiple nodes being repaired, but only one + will be the target. + + Examples: + + - + + ``https://container.googleapis.com/v1/projects/123/locations/us-central1/clusters/my-cluster`` + + ``https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np`` + + ``https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np/node/my-node`` location (str): [Output only] The name of the Google Compute Engine `zone `__ @@ -3810,43 +3934,120 @@ class Status(proto.Enum): ABORTING = 4 class Type(proto.Enum): - r"""Operation type. + r"""Operation type categorizes the operation. Values: TYPE_UNSPECIFIED (0): Not set. CREATE_CLUSTER (1): - Cluster create. + The cluster is being created. The cluster should be assumed + to be unusable until the operation finishes. + + In the event of the operation failing, the cluster will + enter the [ERROR state][Cluster.Status.ERROR] and eventually + be deleted. DELETE_CLUSTER (2): - Cluster delete. + The cluster is being deleted. The cluster should be assumed + to be unusable as soon as this operation starts. + + In the event of the operation failing, the cluster will + enter the [ERROR state][Cluster.Status.ERROR] and the + deletion will be automatically retried until completed. UPGRADE_MASTER (3): - A master upgrade. + The [cluster + version][google.container.v1beta1.ClusterUpdate.desired_master_version] + is being updated. Note that this includes "upgrades" to the + same version, which are simply a recreation. This also + includes + `auto-upgrades `__. + For more details, see `documentation on cluster + upgrades `__. UPGRADE_NODES (4): - A node upgrade. + A node pool is being updated. Despite calling this an + "upgrade", this includes most forms of updates to node + pools. This also includes + `auto-upgrades `__. + + This operation sets the + [progress][google.container.v1beta1.Operation.progress] + field and may be + [canceled][google.container.v1beta1.ClusterManager.CancelOperation]. + + The upgrade strategy depends on `node pool + configuration `__. + The nodes are generally still usable during this operation. REPAIR_CLUSTER (5): - Cluster repair. + A problem has been detected with the control plane and is + being repaired. This operation type is initiated by GKE. For + more details, see `documentation on + repairs `__. UPDATE_CLUSTER (6): - Cluster update. + The cluster is being updated. This is a broad category of + operations and includes operations that only change metadata + as well as those that must recreate the entire cluster. If + the control plane must be recreated, this will cause + temporary downtime for zonal clusters. + + Some features require recreating the nodes as well. Those + will be recreated as separate operations and the update may + not be completely functional until the node pools + recreations finish. Node recreations will generally follow + `maintenance + policies `__. + + Some GKE-initiated operations use this type. This includes + certain types of auto-upgrades and incident mitigations. CREATE_NODE_POOL (7): - Node pool create. + A node pool is being created. The node pool should be + assumed to be unusable until this operation finishes. In the + event of an error, the node pool may be partially created. + + If enabled, `node + autoprovisioning `__ + may have automatically initiated such operations. DELETE_NODE_POOL (8): - Node pool delete. + The node pool is being deleted. The node pool + should be assumed to be unusable as soon as this + operation starts. SET_NODE_POOL_MANAGEMENT (9): - Set node pool management. + The node pool's + [manamagent][google.container.v1beta1.NodePool.management] + field is being updated. These operations only update + metadata and may be concurrent with most other operations. AUTO_REPAIR_NODES (10): - Automatic node pool repair. + A problem has been detected with nodes and `they are being + repaired `__. + This operation type is initiated by GKE, typically + automatically. This operation may be concurrent with other + operations and there may be multiple repairs occurring on + the same node pool. AUTO_UPGRADE_NODES (11): - Automatic node upgrade. + Unused. Automatic node upgrade uses + [UPGRADE_NODES][google.container.v1beta1.Operation.Type.UPGRADE_NODES]. SET_LABELS (12): - Set labels. + Unused. Updating labels uses + [UPDATE_CLUSTER][google.container.v1beta1.Operation.Type.UPDATE_CLUSTER]. SET_MASTER_AUTH (13): - Set/generate master auth materials + Unused. Updating master auth uses + [UPDATE_CLUSTER][google.container.v1beta1.Operation.Type.UPDATE_CLUSTER]. SET_NODE_POOL_SIZE (14): - Set node pool size. + The node pool is being resized. With the + exception of resizing to or from size zero, the + node pool is generally usable during this + operation. SET_NETWORK_POLICY (15): - Updates network policy for a cluster. + Unused. Updating network policy uses + [UPDATE_CLUSTER][google.container.v1beta1.Operation.Type.UPDATE_CLUSTER]. SET_MAINTENANCE_POLICY (16): - Set the maintenance policy. + Unused. Updating maintenance policy uses + [UPDATE_CLUSTER][google.container.v1beta1.Operation.Type.UPDATE_CLUSTER]. + RESIZE_CLUSTER (18): + The control plane is being resized. This operation type is + initiated by GKE. These operations are often performed + preemptively to ensure that the control plane has sufficient + resources and is not typically an indication of issues. For + more details, see `documentation on + resizes `__. """ TYPE_UNSPECIFIED = 0 CREATE_CLUSTER = 1 @@ -3865,6 +4066,7 @@ class Type(proto.Enum): SET_NODE_POOL_SIZE = 14 SET_NETWORK_POLICY = 15 SET_MAINTENANCE_POLICY = 16 + RESIZE_CLUSTER = 18 name: str = proto.Field( proto.STRING, @@ -7995,12 +8197,12 @@ class DatabaseEncryption(proto.Message): r"""Configuration of etcd encryption. Attributes: - state (google.cloud.container_v1beta1.types.DatabaseEncryption.State): - Denotes the state of etcd encryption. key_name (str): Name of CloudKMS key to use for the encryption of secrets in etcd. Ex. projects/my-project/locations/global/keyRings/my-ring/cryptoKeys/my-key + state (google.cloud.container_v1beta1.types.DatabaseEncryption.State): + The desired state of etcd encryption. """ class State(proto.Enum): @@ -8020,15 +8222,15 @@ class State(proto.Enum): ENCRYPTED = 1 DECRYPTED = 2 + key_name: str = proto.Field( + proto.STRING, + number=1, + ) state: State = proto.Field( proto.ENUM, number=2, enum=State, ) - key_name: str = proto.Field( - proto.STRING, - number=1, - ) class ResourceUsageExportConfig(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 2d0f841e..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.21.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 6fc93083..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.21.0" + "version": "0.1.0" }, "snippets": [ { From 1e84a186478085dbc7335202d891b80fd8dc1960 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 1 Jun 2023 07:24:05 -0400 Subject: [PATCH 3/3] chore(main): release 2.22.0 (#372) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- .release-please-manifest.json | 2 +- CHANGELOG.md | 16 ++++++++++++++++ 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 +- ...nippet_metadata_google.container.v1beta1.json | 2 +- 7 files changed, 22 insertions(+), 6 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 02bd31d3..8428ab92 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "2.21.0" + ".": "2.22.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 78f2e1ae..ed4f91d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,22 @@ [1]: https://pypi.org/project/google-cloud-container/#history +## [2.22.0](https://github.com/googleapis/python-container/compare/v2.21.0...v2.22.0) (2023-06-01) + + +### Features + +* Add SoleTenantConfig API ([f3126af](https://github.com/googleapis/python-container/commit/f3126afbc21296e5f3e0608276bc7903ae969fe3)) +* Cluster resizes will now have their own operation type (RESIZE_CLUSTER) instead of reusing REPAIR_CLUSTER; they will start using this in the near future ([f3126af](https://github.com/googleapis/python-container/commit/f3126afbc21296e5f3e0608276bc7903ae969fe3)) +* Support fleet registration via cluster update ([f3126af](https://github.com/googleapis/python-container/commit/f3126afbc21296e5f3e0608276bc7903ae969fe3)) + + +### Documentation + +* Clarified release channel defaulting behavior for create cluster requests when release channel is unspecified ([f3126af](https://github.com/googleapis/python-container/commit/f3126afbc21296e5f3e0608276bc7903ae969fe3)) +* Operation.self_link and Operation.target_link given examples ([f3126af](https://github.com/googleapis/python-container/commit/f3126afbc21296e5f3e0608276bc7903ae969fe3)) +* Operation.Type is now documented in detail ([f3126af](https://github.com/googleapis/python-container/commit/f3126afbc21296e5f3e0608276bc7903ae969fe3)) + ## [2.21.0](https://github.com/googleapis/python-container/compare/v2.20.0...v2.21.0) (2023-04-15) diff --git a/google/cloud/container/gapic_version.py b/google/cloud/container/gapic_version.py index e546bae0..03d6d020 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.21.0" # {x-release-please-version} +__version__ = "2.22.0" # {x-release-please-version} diff --git a/google/cloud/container_v1/gapic_version.py b/google/cloud/container_v1/gapic_version.py index e546bae0..03d6d020 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.21.0" # {x-release-please-version} +__version__ = "2.22.0" # {x-release-please-version} diff --git a/google/cloud/container_v1beta1/gapic_version.py b/google/cloud/container_v1beta1/gapic_version.py index e546bae0..03d6d020 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.21.0" # {x-release-please-version} +__version__ = "2.22.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..35acfe2c 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.22.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..d94eac8d 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.22.0" }, "snippets": [ {