diff --git a/google/cloud/container_v1beta1/__init__.py b/google/cloud/container_v1beta1/__init__.py index 2a2f15ff..0ed99a38 100644 --- a/google/cloud/container_v1beta1/__init__.py +++ b/google/cloud/container_v1beta1/__init__.py @@ -20,6 +20,7 @@ from .types.cluster_service import AcceleratorConfig from .types.cluster_service import AddonsConfig from .types.cluster_service import AuthenticatorGroupsConfig +from .types.cluster_service import Autopilot from .types.cluster_service import AutoprovisioningNodePoolDefaults from .types.cluster_service import AutoUpgradeOptions from .types.cluster_service import BinaryAuthorization @@ -41,6 +42,7 @@ from .types.cluster_service import DeleteClusterRequest from .types.cluster_service import DeleteNodePoolRequest from .types.cluster_service import DnsCacheConfig +from .types.cluster_service import DNSConfig from .types.cluster_service import EphemeralStorageConfig from .types.cluster_service import GcePersistentDiskCsiDriverConfig from .types.cluster_service import GetClusterRequest @@ -53,6 +55,8 @@ from .types.cluster_service import GetServerConfigRequest from .types.cluster_service import HorizontalPodAutoscaling from .types.cluster_service import HttpLoadBalancing +from .types.cluster_service import IdentityServiceConfig +from .types.cluster_service import ILBSubsettingConfig from .types.cluster_service import IntraNodeVisibilityConfig from .types.cluster_service import IPAllocationPolicy from .types.cluster_service import IstioConfig @@ -72,21 +76,31 @@ from .types.cluster_service import ListUsableSubnetworksRequest from .types.cluster_service import ListUsableSubnetworksResponse from .types.cluster_service import Location +from .types.cluster_service import LoggingComponentConfig +from .types.cluster_service import LoggingConfig from .types.cluster_service import MaintenancePolicy from .types.cluster_service import MaintenanceWindow from .types.cluster_service import Master from .types.cluster_service import MasterAuth from .types.cluster_service import MasterAuthorizedNetworksConfig from .types.cluster_service import MaxPodsConstraint +from .types.cluster_service import MonitoringComponentConfig +from .types.cluster_service import MonitoringConfig from .types.cluster_service import NetworkConfig from .types.cluster_service import NetworkPolicy from .types.cluster_service import NetworkPolicyConfig +from .types.cluster_service import NetworkTags from .types.cluster_service import NodeConfig +from .types.cluster_service import NodeConfigDefaults from .types.cluster_service import NodeKubeletConfig +from .types.cluster_service import NodeLabels from .types.cluster_service import NodeManagement +from .types.cluster_service import NodeNetworkConfig from .types.cluster_service import NodePool from .types.cluster_service import NodePoolAutoscaling +from .types.cluster_service import NodePoolDefaults from .types.cluster_service import NodeTaint +from .types.cluster_service import NodeTaints from .types.cluster_service import NotificationConfig from .types.cluster_service import Operation from .types.cluster_service import OperationProgress @@ -101,6 +115,7 @@ from .types.cluster_service import RollbackNodePoolUpgradeRequest from .types.cluster_service import SandboxConfig from .types.cluster_service import ServerConfig +from .types.cluster_service import ServiceExternalIPsConfig from .types.cluster_service import SetAddonsConfigRequest from .types.cluster_service import SetLabelsRequest from .types.cluster_service import SetLegacyAbacRequest @@ -122,13 +137,18 @@ from .types.cluster_service import UpdateClusterRequest from .types.cluster_service import UpdateMasterRequest from .types.cluster_service import UpdateNodePoolRequest +from .types.cluster_service import UpgradeAvailableEvent from .types.cluster_service import UpgradeEvent from .types.cluster_service import UsableSubnetwork from .types.cluster_service import UsableSubnetworkSecondaryRange from .types.cluster_service import VerticalPodAutoscaling +from .types.cluster_service import VirtualNIC +from .types.cluster_service import WindowsVersions +from .types.cluster_service import WorkloadCertificates from .types.cluster_service import WorkloadIdentityConfig from .types.cluster_service import WorkloadMetadataConfig from .types.cluster_service import DatapathProvider +from .types.cluster_service import PrivateIPv6GoogleAccess from .types.cluster_service import UpgradeResourceType __all__ = ( @@ -137,6 +157,7 @@ "AddonsConfig", "AuthenticatorGroupsConfig", "AutoUpgradeOptions", + "Autopilot", "AutoprovisioningNodePoolDefaults", "BinaryAuthorization", "CancelOperationRequest", @@ -152,6 +173,7 @@ "ConfigConnectorConfig", "CreateClusterRequest", "CreateNodePoolRequest", + "DNSConfig", "DailyMaintenanceWindow", "DatabaseEncryption", "DatapathProvider", @@ -171,7 +193,9 @@ "GetServerConfigRequest", "HorizontalPodAutoscaling", "HttpLoadBalancing", + "ILBSubsettingConfig", "IPAllocationPolicy", + "IdentityServiceConfig", "IntraNodeVisibilityConfig", "IstioConfig", "Jwk", @@ -190,27 +214,38 @@ "ListUsableSubnetworksRequest", "ListUsableSubnetworksResponse", "Location", + "LoggingComponentConfig", + "LoggingConfig", "MaintenancePolicy", "MaintenanceWindow", "Master", "MasterAuth", "MasterAuthorizedNetworksConfig", "MaxPodsConstraint", + "MonitoringComponentConfig", + "MonitoringConfig", "NetworkConfig", "NetworkPolicy", "NetworkPolicyConfig", + "NetworkTags", "NodeConfig", + "NodeConfigDefaults", "NodeKubeletConfig", + "NodeLabels", "NodeManagement", + "NodeNetworkConfig", "NodePool", "NodePoolAutoscaling", + "NodePoolDefaults", "NodeTaint", + "NodeTaints", "NotificationConfig", "Operation", "OperationProgress", "PodSecurityPolicyConfig", "PrivateClusterConfig", "PrivateClusterMasterGlobalAccessConfig", + "PrivateIPv6GoogleAccess", "RecurringTimeWindow", "ReleaseChannel", "ReservationAffinity", @@ -219,6 +254,7 @@ "RollbackNodePoolUpgradeRequest", "SandboxConfig", "ServerConfig", + "ServiceExternalIPsConfig", "SetAddonsConfigRequest", "SetLabelsRequest", "SetLegacyAbacRequest", @@ -240,11 +276,15 @@ "UpdateClusterRequest", "UpdateMasterRequest", "UpdateNodePoolRequest", + "UpgradeAvailableEvent", "UpgradeEvent", "UpgradeResourceType", "UsableSubnetwork", "UsableSubnetworkSecondaryRange", "VerticalPodAutoscaling", + "VirtualNIC", + "WindowsVersions", + "WorkloadCertificates", "WorkloadIdentityConfig", "WorkloadMetadataConfig", ) diff --git a/google/cloud/container_v1beta1/services/cluster_manager/async_client.py b/google/cloud/container_v1beta1/services/cluster_manager/async_client.py index ee546eed..4bc1adb0 100644 --- a/google/cloud/container_v1beta1/services/cluster_manager/async_client.py +++ b/google/cloud/container_v1beta1/services/cluster_manager/async_client.py @@ -2110,6 +2110,39 @@ async def get_node_pool( may be used to reference them during pod scheduling. They may also be resized up or down, to accommodate the workload. + These upgrade settings control the level + of parallelism and the level of + disruption caused by an upgrade. + + maxUnavailable controls the number of + nodes that can be simultaneously + unavailable. + + maxSurge controls the number of + additional nodes that can be added to + the node pool temporarily for the time + of the upgrade to increase the number of + available nodes. + + (maxUnavailable + maxSurge) determines + the level of parallelism (how many nodes + are being upgraded at the same time). + Note: upgrades inevitably introduce some + disruption since workloads need to be + moved from old nodes to new, upgraded + ones. Even if maxUnavailable=0, this + holds true. (Disruption stays within the + limits of PodDisruptionBudget, if it is + configured.) + Consider a hypothetical node pool with 5 + nodes having maxSurge=2, + maxUnavailable=1. This means the upgrade + process upgrades 3 nodes simultaneously. + It creates 2 additional (upgraded) + nodes, then it brings down 3 old (not + yet upgraded) nodes at the same time. + This ensures that there are always at + least 4 nodes available. """ # Create or coerce a protobuf request object. @@ -3091,12 +3124,15 @@ async def set_node_pool_size( timeout: float = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: - r"""Sets the size for a specific node pool. + r"""SetNodePoolSizeRequest sets the size of a node pool. The new + size will be used for all replicas, including future replicas + created by modifying + [NodePool.locations][google.container.v1beta1.NodePool.locations]. Args: request (:class:`google.cloud.container_v1beta1.types.SetNodePoolSizeRequest`): The request object. SetNodePoolSizeRequest sets the size - a node pool. + of a node pool. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. diff --git a/google/cloud/container_v1beta1/services/cluster_manager/client.py b/google/cloud/container_v1beta1/services/cluster_manager/client.py index 6a8b3934..af11ef1e 100644 --- a/google/cloud/container_v1beta1/services/cluster_manager/client.py +++ b/google/cloud/container_v1beta1/services/cluster_manager/client.py @@ -2230,6 +2230,39 @@ def get_node_pool( may be used to reference them during pod scheduling. They may also be resized up or down, to accommodate the workload. + These upgrade settings control the level + of parallelism and the level of + disruption caused by an upgrade. + + maxUnavailable controls the number of + nodes that can be simultaneously + unavailable. + + maxSurge controls the number of + additional nodes that can be added to + the node pool temporarily for the time + of the upgrade to increase the number of + available nodes. + + (maxUnavailable + maxSurge) determines + the level of parallelism (how many nodes + are being upgraded at the same time). + Note: upgrades inevitably introduce some + disruption since workloads need to be + moved from old nodes to new, upgraded + ones. Even if maxUnavailable=0, this + holds true. (Disruption stays within the + limits of PodDisruptionBudget, if it is + configured.) + Consider a hypothetical node pool with 5 + nodes having maxSurge=2, + maxUnavailable=1. This means the upgrade + process upgrades 3 nodes simultaneously. + It creates 2 additional (upgraded) + nodes, then it brings down 3 old (not + yet upgraded) nodes at the same time. + This ensures that there are always at + least 4 nodes available. """ # Create or coerce a protobuf request object. @@ -3192,12 +3225,15 @@ def set_node_pool_size( timeout: float = None, metadata: Sequence[Tuple[str, str]] = (), ) -> cluster_service.Operation: - r"""Sets the size for a specific node pool. + r"""SetNodePoolSizeRequest sets the size of a node pool. The new + size will be used for all replicas, including future replicas + created by modifying + [NodePool.locations][google.container.v1beta1.NodePool.locations]. Args: request (google.cloud.container_v1beta1.types.SetNodePoolSizeRequest): The request object. SetNodePoolSizeRequest sets the size - a node pool. + of a node pool. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. diff --git a/google/cloud/container_v1beta1/services/cluster_manager/transports/grpc.py b/google/cloud/container_v1beta1/services/cluster_manager/transports/grpc.py index 4cbdbb9c..28a573c2 100644 --- a/google/cloud/container_v1beta1/services/cluster_manager/transports/grpc.py +++ b/google/cloud/container_v1beta1/services/cluster_manager/transports/grpc.py @@ -1019,7 +1019,10 @@ def set_node_pool_size( ) -> Callable[[cluster_service.SetNodePoolSizeRequest], cluster_service.Operation]: r"""Return a callable for the set node pool size method over gRPC. - Sets the size for a specific node pool. + SetNodePoolSizeRequest sets the size of a node pool. The new + size will be used for all replicas, including future replicas + created by modifying + [NodePool.locations][google.container.v1beta1.NodePool.locations]. Returns: Callable[[~.SetNodePoolSizeRequest], diff --git a/google/cloud/container_v1beta1/services/cluster_manager/transports/grpc_asyncio.py b/google/cloud/container_v1beta1/services/cluster_manager/transports/grpc_asyncio.py index 66915da4..7ddee6d8 100644 --- a/google/cloud/container_v1beta1/services/cluster_manager/transports/grpc_asyncio.py +++ b/google/cloud/container_v1beta1/services/cluster_manager/transports/grpc_asyncio.py @@ -1066,7 +1066,10 @@ def set_node_pool_size( ]: r"""Return a callable for the set node pool size method over gRPC. - Sets the size for a specific node pool. + SetNodePoolSizeRequest sets the size of a node pool. The new + size will be used for all replicas, including future replicas + created by modifying + [NodePool.locations][google.container.v1beta1.NodePool.locations]. Returns: Callable[[~.SetNodePoolSizeRequest], diff --git a/google/cloud/container_v1beta1/types/__init__.py b/google/cloud/container_v1beta1/types/__init__.py index 8583d925..8bce5901 100644 --- a/google/cloud/container_v1beta1/types/__init__.py +++ b/google/cloud/container_v1beta1/types/__init__.py @@ -17,6 +17,7 @@ AcceleratorConfig, AddonsConfig, AuthenticatorGroupsConfig, + Autopilot, AutoprovisioningNodePoolDefaults, AutoUpgradeOptions, BinaryAuthorization, @@ -38,6 +39,7 @@ DeleteClusterRequest, DeleteNodePoolRequest, DnsCacheConfig, + DNSConfig, EphemeralStorageConfig, GcePersistentDiskCsiDriverConfig, GetClusterRequest, @@ -50,6 +52,8 @@ GetServerConfigRequest, HorizontalPodAutoscaling, HttpLoadBalancing, + IdentityServiceConfig, + ILBSubsettingConfig, IntraNodeVisibilityConfig, IPAllocationPolicy, IstioConfig, @@ -69,21 +73,31 @@ ListUsableSubnetworksRequest, ListUsableSubnetworksResponse, Location, + LoggingComponentConfig, + LoggingConfig, MaintenancePolicy, MaintenanceWindow, Master, MasterAuth, MasterAuthorizedNetworksConfig, MaxPodsConstraint, + MonitoringComponentConfig, + MonitoringConfig, NetworkConfig, NetworkPolicy, NetworkPolicyConfig, + NetworkTags, NodeConfig, + NodeConfigDefaults, NodeKubeletConfig, + NodeLabels, NodeManagement, + NodeNetworkConfig, NodePool, NodePoolAutoscaling, + NodePoolDefaults, NodeTaint, + NodeTaints, NotificationConfig, Operation, OperationProgress, @@ -98,6 +112,7 @@ RollbackNodePoolUpgradeRequest, SandboxConfig, ServerConfig, + ServiceExternalIPsConfig, SetAddonsConfigRequest, SetLabelsRequest, SetLegacyAbacRequest, @@ -119,13 +134,18 @@ UpdateClusterRequest, UpdateMasterRequest, UpdateNodePoolRequest, + UpgradeAvailableEvent, UpgradeEvent, UsableSubnetwork, UsableSubnetworkSecondaryRange, VerticalPodAutoscaling, + VirtualNIC, + WindowsVersions, + WorkloadCertificates, WorkloadIdentityConfig, WorkloadMetadataConfig, DatapathProvider, + PrivateIPv6GoogleAccess, UpgradeResourceType, ) @@ -133,6 +153,7 @@ "AcceleratorConfig", "AddonsConfig", "AuthenticatorGroupsConfig", + "Autopilot", "AutoprovisioningNodePoolDefaults", "AutoUpgradeOptions", "BinaryAuthorization", @@ -154,6 +175,7 @@ "DeleteClusterRequest", "DeleteNodePoolRequest", "DnsCacheConfig", + "DNSConfig", "EphemeralStorageConfig", "GcePersistentDiskCsiDriverConfig", "GetClusterRequest", @@ -166,6 +188,8 @@ "GetServerConfigRequest", "HorizontalPodAutoscaling", "HttpLoadBalancing", + "IdentityServiceConfig", + "ILBSubsettingConfig", "IntraNodeVisibilityConfig", "IPAllocationPolicy", "IstioConfig", @@ -185,21 +209,31 @@ "ListUsableSubnetworksRequest", "ListUsableSubnetworksResponse", "Location", + "LoggingComponentConfig", + "LoggingConfig", "MaintenancePolicy", "MaintenanceWindow", "Master", "MasterAuth", "MasterAuthorizedNetworksConfig", "MaxPodsConstraint", + "MonitoringComponentConfig", + "MonitoringConfig", "NetworkConfig", "NetworkPolicy", "NetworkPolicyConfig", + "NetworkTags", "NodeConfig", + "NodeConfigDefaults", "NodeKubeletConfig", + "NodeLabels", "NodeManagement", + "NodeNetworkConfig", "NodePool", "NodePoolAutoscaling", + "NodePoolDefaults", "NodeTaint", + "NodeTaints", "NotificationConfig", "Operation", "OperationProgress", @@ -214,6 +248,7 @@ "RollbackNodePoolUpgradeRequest", "SandboxConfig", "ServerConfig", + "ServiceExternalIPsConfig", "SetAddonsConfigRequest", "SetLabelsRequest", "SetLegacyAbacRequest", @@ -235,12 +270,17 @@ "UpdateClusterRequest", "UpdateMasterRequest", "UpdateNodePoolRequest", + "UpgradeAvailableEvent", "UpgradeEvent", "UsableSubnetwork", "UsableSubnetworkSecondaryRange", "VerticalPodAutoscaling", + "VirtualNIC", + "WindowsVersions", + "WorkloadCertificates", "WorkloadIdentityConfig", "WorkloadMetadataConfig", "DatapathProvider", + "PrivateIPv6GoogleAccess", "UpgradeResourceType", ) diff --git a/google/cloud/container_v1beta1/types/cluster_service.py b/google/cloud/container_v1beta1/types/cluster_service.py index 58969874..d3b9f790 100644 --- a/google/cloud/container_v1beta1/types/cluster_service.py +++ b/google/cloud/container_v1beta1/types/cluster_service.py @@ -19,21 +19,27 @@ from google.protobuf import wrappers_pb2 # type: ignore from google.rpc import code_pb2 # type: ignore from google.rpc import status_pb2 # type: ignore +from google.type import date_pb2 # type: ignore __protobuf__ = proto.module( package="google.container.v1beta1", manifest={ + "PrivateIPv6GoogleAccess", "DatapathProvider", "UpgradeResourceType", "LinuxNodeConfig", "NodeKubeletConfig", "NodeConfig", + "NodeNetworkConfig", "ShieldedInstanceConfig", "SandboxConfig", "EphemeralStorageConfig", "ReservationAffinity", "NodeTaint", + "NodeTaints", + "NodeLabels", + "NetworkTags", "MasterAuth", "ClientCertificateConfig", "AddonsConfig", @@ -58,6 +64,8 @@ "AuthenticatorGroupsConfig", "ClusterTelemetry", "Cluster", + "NodePoolDefaults", + "NodeConfigDefaults", "ClusterUpdate", "Operation", "OperationProgress", @@ -81,6 +89,7 @@ "ListOperationsResponse", "GetServerConfigRequest", "ServerConfig", + "WindowsVersions", "CreateNodePoolRequest", "DeleteNodePoolRequest", "ListNodePoolsRequest", @@ -114,6 +123,7 @@ "Location", "StatusCondition", "NetworkConfig", + "ServiceExternalIPsConfig", "ListUsableSubnetworksRequest", "ListUsableSubnetworksResponse", "UsableSubnetworkSecondaryRange", @@ -121,11 +131,15 @@ "VerticalPodAutoscaling", "DefaultSnatStatus", "IntraNodeVisibilityConfig", + "ILBSubsettingConfig", + "DNSConfig", "MaxPodsConstraint", "WorkloadIdentityConfig", + "WorkloadCertificates", "DatabaseEncryption", "ResourceUsageExportConfig", "ShieldedNodes", + "VirtualNIC", "GetOpenIDConfigRequest", "GetOpenIDConfigResponse", "GetJSONWebKeysRequest", @@ -134,13 +148,30 @@ "ReleaseChannel", "TpuConfig", "Master", + "Autopilot", "NotificationConfig", "ConfidentialNodes", "UpgradeEvent", + "UpgradeAvailableEvent", + "IdentityServiceConfig", + "LoggingConfig", + "LoggingComponentConfig", + "MonitoringConfig", + "MonitoringComponentConfig", }, ) +class PrivateIPv6GoogleAccess(proto.Enum): + r"""PrivateIPv6GoogleAccess controls whether and how the pods can + communicate with Google Services through gRPC over IPv6. + """ + PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED = 0 + PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED = 1 + PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE = 2 + PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL = 3 + + class DatapathProvider(proto.Enum): r"""The datapath provider selects the implementation of the Kubernetes networking // model for service resolution and @@ -291,10 +322,6 @@ class NodeConfig(proto.Message): - "install-ssh-psm1" - "user-profile-psm1" - The following keys are reserved for Windows nodes: - - - "serial-port-logging-enable" - Values are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on them is that each value's size must be @@ -400,6 +427,8 @@ class NodeConfig(proto.Message): Parameters for the ephemeral storage filesystem. If unspecified, ephemeral storage is backed by the boot disk. + gvnic (google.cloud.container_v1beta1.types.VirtualNIC): + Enable or disable gvnic on the node pool. """ machine_type = proto.Field(proto.STRING, number=1,) @@ -437,6 +466,62 @@ class NodeConfig(proto.Message): ephemeral_storage_config = proto.Field( proto.MESSAGE, number=24, message="EphemeralStorageConfig", ) + gvnic = proto.Field(proto.MESSAGE, number=29, message="VirtualNIC",) + + +class NodeNetworkConfig(proto.Message): + r"""Parameters for node pool-level network config. + Attributes: + create_pod_range (bool): + Input only. Whether to create a new range for pod IPs in + this node pool. Defaults are provided for ``pod_range`` and + ``pod_ipv4_cidr_block`` if they are not specified. + + If neither ``create_pod_range`` or ``pod_range`` are + specified, the cluster-level default + (``ip_allocation_policy.cluster_ipv4_cidr_block``) is used. + + Only applicable if ``ip_allocation_policy.use_ip_aliases`` + is true. + + This field cannot be changed after the node pool has been + created. + pod_range (str): + The ID of the secondary range for pod IPs. If + ``create_pod_range`` is true, this ID is used for the new + range. If ``create_pod_range`` is false, uses an existing + secondary range with this ID. + + Only applicable if ``ip_allocation_policy.use_ip_aliases`` + is true. + + This field cannot be changed after the node pool has been + created. + pod_ipv4_cidr_block (str): + The IP address range for pod IPs in this node pool. + + Only applicable if ``create_pod_range`` is true. + + Set to blank to have a range chosen with the default size. + + Set to /netmask (e.g. ``/14``) to have a range chosen with a + specific netmask. + + Set to a + `CIDR `__ + notation (e.g. ``10.96.0.0/14``) to pick a specific range to + use. + + Only applicable if ``ip_allocation_policy.use_ip_aliases`` + is true. + + This field cannot be changed after the node pool has been + created. + """ + + create_pod_range = proto.Field(proto.BOOL, number=4,) + pod_range = proto.Field(proto.STRING, number=5,) + pod_ipv4_cidr_block = proto.Field(proto.STRING, number=6,) class ShieldedInstanceConfig(proto.Message): @@ -564,6 +649,43 @@ class Effect(proto.Enum): effect = proto.Field(proto.ENUM, number=3, enum=Effect,) +class NodeTaints(proto.Message): + r"""Collection of Kubernetes `node + taints `__. + + Attributes: + taints (Sequence[google.cloud.container_v1beta1.types.NodeTaint]): + List of node taints. + """ + + taints = proto.RepeatedField(proto.MESSAGE, number=1, message="NodeTaint",) + + +class NodeLabels(proto.Message): + r"""Collection of node-level `Kubernetes + labels `__. + + Attributes: + labels (Sequence[google.cloud.container_v1beta1.types.NodeLabels.LabelsEntry]): + Map of node label keys and node label values. + """ + + labels = proto.MapField(proto.STRING, proto.STRING, number=1,) + + +class NetworkTags(proto.Message): + r"""Collection of Compute Engine network tags that can be applied to a + node's underlying VM instance. (See ``tags`` field in + ```NodeConfig`` `__). + + Attributes: + tags (Sequence[str]): + List of network tags. + """ + + tags = proto.RepeatedField(proto.STRING, number=1,) + + class MasterAuth(proto.Message): r"""The authentication information for accessing the master endpoint. Authentication can be done using HTTP basic auth or @@ -798,9 +920,7 @@ class ConfigConnectorConfig(proto.Message): class GcePersistentDiskCsiDriverConfig(proto.Message): - r"""Configuration for the Compute Engine PD CSI driver. This - option can only be enabled at cluster creation time. - + r"""Configuration for the Compute Engine PD CSI driver. Attributes: enabled (bool): Whether the Compute Engine PD CSI driver is @@ -1378,6 +1498,9 @@ class Cluster(proto.Message): workload_identity_config (google.cloud.container_v1beta1.types.WorkloadIdentityConfig): Configuration for the use of Kubernetes Service Accounts in GCP IAM policies. + workload_certificates (google.cloud.container_v1beta1.types.WorkloadCertificates): + Configuration for issuance of mTLS keys and + certificates to Kubernetes pods. cluster_telemetry (google.cloud.container_v1beta1.types.ClusterTelemetry): Telemetry integration for the cluster. tpu_config (google.cloud.container_v1beta1.types.TpuConfig): @@ -1386,6 +1509,8 @@ class Cluster(proto.Message): Notification configuration of the cluster. confidential_nodes (google.cloud.container_v1beta1.types.ConfidentialNodes): Configuration of Confidential Nodes + identity_service_config (google.cloud.container_v1beta1.types.IdentityServiceConfig): + Configuration for Identity Service component. self_link (str): [Output only] Server-defined URL for the resource. zone (str): @@ -1481,6 +1606,18 @@ class Cluster(proto.Message): state. master (google.cloud.container_v1beta1.types.Master): Configuration for master components. + autopilot (google.cloud.container_v1beta1.types.Autopilot): + Autopilot configuration for the cluster. + id (str): + Output only. Unique id for the cluster. + node_pool_defaults (google.cloud.container_v1beta1.types.NodePoolDefaults): + Default NodePool settings for the entire + cluster. These settings are overridden if + specified on the specific NodePool object. + logging_config (google.cloud.container_v1beta1.types.LoggingConfig): + Logging configuration for the cluster. + monitoring_config (google.cloud.container_v1beta1.types.MonitoringConfig): + Monitoring configuration for the cluster. """ class Status(proto.Enum): @@ -1550,6 +1687,9 @@ class Status(proto.Enum): workload_identity_config = proto.Field( proto.MESSAGE, number=43, message="WorkloadIdentityConfig", ) + workload_certificates = proto.Field( + proto.MESSAGE, number=52, message="WorkloadCertificates", + ) cluster_telemetry = proto.Field( proto.MESSAGE, number=46, message="ClusterTelemetry", ) @@ -1560,6 +1700,9 @@ class Status(proto.Enum): confidential_nodes = proto.Field( proto.MESSAGE, number=50, message="ConfidentialNodes", ) + identity_service_config = proto.Field( + proto.MESSAGE, number=54, message="IdentityServiceConfig", + ) self_link = proto.Field(proto.STRING, number=100,) zone = proto.Field(proto.STRING, number=101,) endpoint = proto.Field(proto.STRING, number=102,) @@ -1584,6 +1727,32 @@ class Status(proto.Enum): proto.MESSAGE, number=118, message="StatusCondition", ) master = proto.Field(proto.MESSAGE, number=124, message="Master",) + autopilot = proto.Field(proto.MESSAGE, number=128, message="Autopilot",) + id = proto.Field(proto.STRING, number=129,) + node_pool_defaults = proto.Field( + proto.MESSAGE, number=131, optional=True, message="NodePoolDefaults", + ) + logging_config = proto.Field(proto.MESSAGE, number=132, message="LoggingConfig",) + monitoring_config = proto.Field( + proto.MESSAGE, number=133, message="MonitoringConfig", + ) + + +class NodePoolDefaults(proto.Message): + r"""Subset of Nodepool message that has defaults. + Attributes: + node_config_defaults (google.cloud.container_v1beta1.types.NodeConfigDefaults): + Subset of NodeConfig message that has + defaults. + """ + + node_config_defaults = proto.Field( + proto.MESSAGE, number=1, message="NodeConfigDefaults", + ) + + +class NodeConfigDefaults(proto.Message): + r"""Subset of NodeConfig message that has defaults. """ class ClusterUpdate(proto.Message): @@ -1693,9 +1862,15 @@ class ClusterUpdate(proto.Message): The desired release channel configuration. desired_tpu_config (google.cloud.container_v1beta1.types.TpuConfig): The desired Cloud TPU configuration. + desired_l4ilb_subsetting_config (google.cloud.container_v1beta1.types.ILBSubsettingConfig): + The desired L4 Internal Load Balancer + Subsetting configuration. desired_datapath_provider (google.cloud.container_v1beta1.types.DatapathProvider): The desired datapath provider for the cluster. + desired_private_ipv6_google_access (google.cloud.container_v1beta1.types.PrivateIPv6GoogleAccess): + The desired state of IPv6 connectivity to + Google Services. desired_notification_config (google.cloud.container_v1beta1.types.NotificationConfig): The desired notification configuration. desired_master_version (str): @@ -1716,13 +1891,29 @@ class ClusterUpdate(proto.Message): Configuration of etcd encryption. desired_workload_identity_config (google.cloud.container_v1beta1.types.WorkloadIdentityConfig): Configuration for Workload Identity. + desired_workload_certificates (google.cloud.container_v1beta1.types.WorkloadCertificates): + Configuration for issuance of mTLS keys and + certificates to Kubernetes pods. desired_shielded_nodes (google.cloud.container_v1beta1.types.ShieldedNodes): Configuration for Shielded Nodes. desired_master (google.cloud.container_v1beta1.types.Master): Configuration for master components. + desired_dns_config (google.cloud.container_v1beta1.types.DNSConfig): + DNSConfig contains clusterDNS config for this + cluster. + desired_service_external_ips_config (google.cloud.container_v1beta1.types.ServiceExternalIPsConfig): + ServiceExternalIPsConfig specifies the config + for the use of Services with ExternalIPs field. desired_authenticator_groups_config (google.cloud.container_v1beta1.types.AuthenticatorGroupsConfig): AuthenticatorGroupsConfig specifies the config for the cluster security groups settings. + desired_logging_config (google.cloud.container_v1beta1.types.LoggingConfig): + The desired logging configuration. + desired_monitoring_config (google.cloud.container_v1beta1.types.MonitoringConfig): + The desired monitoring configuration. + desired_identity_service_config (google.cloud.container_v1beta1.types.IdentityServiceConfig): + The desired Identity Service component + configuration. """ desired_node_version = proto.Field(proto.STRING, number=4,) @@ -1771,9 +1962,15 @@ class ClusterUpdate(proto.Message): proto.MESSAGE, number=31, message="ReleaseChannel", ) desired_tpu_config = proto.Field(proto.MESSAGE, number=38, message="TpuConfig",) + desired_l4ilb_subsetting_config = proto.Field( + proto.MESSAGE, number=39, message="ILBSubsettingConfig", + ) desired_datapath_provider = proto.Field( proto.ENUM, number=50, enum="DatapathProvider", ) + desired_private_ipv6_google_access = proto.Field( + proto.ENUM, number=51, enum="PrivateIPv6GoogleAccess", + ) desired_notification_config = proto.Field( proto.MESSAGE, number=55, message="NotificationConfig", ) @@ -1784,13 +1981,29 @@ class ClusterUpdate(proto.Message): desired_workload_identity_config = proto.Field( proto.MESSAGE, number=47, message="WorkloadIdentityConfig", ) + desired_workload_certificates = proto.Field( + proto.MESSAGE, number=61, message="WorkloadCertificates", + ) desired_shielded_nodes = proto.Field( proto.MESSAGE, number=48, message="ShieldedNodes", ) desired_master = proto.Field(proto.MESSAGE, number=52, message="Master",) + desired_dns_config = proto.Field(proto.MESSAGE, number=53, message="DNSConfig",) + desired_service_external_ips_config = proto.Field( + proto.MESSAGE, number=60, message="ServiceExternalIPsConfig", + ) desired_authenticator_groups_config = proto.Field( proto.MESSAGE, number=63, message="AuthenticatorGroupsConfig", ) + desired_logging_config = proto.Field( + proto.MESSAGE, number=64, message="LoggingConfig", + ) + desired_monitoring_config = proto.Field( + proto.MESSAGE, number=65, message="MonitoringConfig", + ) + desired_identity_service_config = proto.Field( + proto.MESSAGE, number=66, message="IdentityServiceConfig", + ) class Operation(proto.Message): @@ -2090,11 +2303,28 @@ class UpdateNodePoolRequest(proto.Message): upgrade_settings (google.cloud.container_v1beta1.types.NodePool.UpgradeSettings): Upgrade settings control disruption and speed of the upgrade. + tags (google.cloud.container_v1beta1.types.NetworkTags): + The desired network tags to be applied to all nodes in the + node pool. If this field is not present, the tags will not + be changed. Otherwise, the existing network tags will be + *replaced* with the provided tags. + taints (google.cloud.container_v1beta1.types.NodeTaints): + The desired node taints to be applied to all nodes in the + node pool. If this field is not present, the taints will not + be changed. Otherwise, the existing node taints will be + *replaced* with the provided taints. + labels (google.cloud.container_v1beta1.types.NodeLabels): + The desired node labels to be applied to all nodes in the + node pool. If this field is not present, the labels will not + be changed. Otherwise, the existing node labels will be + *replaced* with the provided labels. linux_node_config (google.cloud.container_v1beta1.types.LinuxNodeConfig): Parameters that can be configured on Linux nodes. kubelet_config (google.cloud.container_v1beta1.types.NodeKubeletConfig): Node kubelet configs. + gvnic (google.cloud.container_v1beta1.types.VirtualNIC): + Enable or disable gvnic on the node pool. """ project_id = proto.Field(proto.STRING, number=1,) @@ -2111,10 +2341,14 @@ class UpdateNodePoolRequest(proto.Message): upgrade_settings = proto.Field( proto.MESSAGE, number=15, message="NodePool.UpgradeSettings", ) + tags = proto.Field(proto.MESSAGE, number=16, message="NetworkTags",) + taints = proto.Field(proto.MESSAGE, number=17, message="NodeTaints",) + labels = proto.Field(proto.MESSAGE, number=18, message="NodeLabels",) linux_node_config = proto.Field( proto.MESSAGE, number=19, message="LinuxNodeConfig", ) kubelet_config = proto.Field(proto.MESSAGE, number=20, message="NodeKubeletConfig",) + gvnic = proto.Field(proto.MESSAGE, number=29, message="VirtualNIC",) class SetNodePoolAutoscalingRequest(proto.Message): @@ -2631,6 +2865,9 @@ class ServerConfig(proto.Message): order. channels (Sequence[google.cloud.container_v1beta1.types.ServerConfig.ReleaseChannelConfig]): List of release channel configurations. + windows_version_maps (Sequence[google.cloud.container_v1beta1.types.ServerConfig.WindowsVersionMapsEntry]): + Maps of Kubernetes version and supported + Windows server versions. """ class ReleaseChannelConfig(proto.Message): @@ -2680,6 +2917,36 @@ class AvailableVersion(proto.Message): channels = proto.RepeatedField( proto.MESSAGE, number=9, message=ReleaseChannelConfig, ) + windows_version_maps = proto.MapField( + proto.STRING, proto.MESSAGE, number=10, message="WindowsVersions", + ) + + +class WindowsVersions(proto.Message): + r"""Windows server versions. + Attributes: + windows_versions (Sequence[google.cloud.container_v1beta1.types.WindowsVersions.WindowsVersion]): + List of Windows server versions. + """ + + class WindowsVersion(proto.Message): + r"""Windows server version. + Attributes: + image_type (str): + Windows server image type + os_version (str): + Windows server build number + support_end_date (google.type.date_pb2.Date): + Mainstream support end date + """ + + image_type = proto.Field(proto.STRING, number=1,) + os_version = proto.Field(proto.STRING, number=2,) + support_end_date = proto.Field(proto.MESSAGE, number=3, message=date_pb2.Date,) + + windows_versions = proto.RepeatedField( + proto.MESSAGE, number=1, message=WindowsVersion, + ) class CreateNodePoolRequest(proto.Message): @@ -2823,6 +3090,30 @@ class NodePool(proto.Message): to them, which may be used to reference them during pod scheduling. They may also be resized up or down, to accommodate the workload. + These upgrade settings control the level of parallelism and the + level of disruption caused by an upgrade. + + maxUnavailable controls the number of nodes that can be + simultaneously unavailable. + + maxSurge controls the number of additional nodes that can be + added to the node pool temporarily for the time of the upgrade + to increase the number of available nodes. + + (maxUnavailable + maxSurge) determines the level of parallelism + (how many nodes are being upgraded at the same time). + + Note: upgrades inevitably introduce some disruption since + workloads need to be moved from old nodes to new, upgraded ones. + Even if maxUnavailable=0, this holds true. (Disruption stays + within the limits of PodDisruptionBudget, if it is configured.) + + Consider a hypothetical node pool with 5 nodes having + maxSurge=2, maxUnavailable=1. This means the upgrade process + upgrades 3 nodes simultaneously. It creates 2 additional + (upgraded) nodes, then it brings down 3 old (not yet upgraded) + nodes at the same time. This ensures that there are always at + least 4 nodes available. Attributes: name (str): @@ -2846,6 +3137,10 @@ class NodePool(proto.Message): Warning: changing node pool locations will result in nodes being added and/or removed. + network_config (google.cloud.container_v1beta1.types.NodeNetworkConfig): + Networking configuration for this NodePool. + If specified, it overrides the cluster-level + defaults. self_link (str): [Output only] Server-defined URL for the resource. version (str): @@ -2893,31 +3188,7 @@ class Status(proto.Enum): ERROR = 6 class UpgradeSettings(proto.Message): - r"""These upgrade settings control the level of parallelism and - the level of disruption caused by an upgrade. - - maxUnavailable controls the number of nodes that can be - simultaneously unavailable. - - maxSurge controls the number of additional nodes that can be - added to the node pool temporarily for the time of the upgrade - to increase the number of available nodes. - - (maxUnavailable + maxSurge) determines the level of parallelism - (how many nodes are being upgraded at the same time). - - Note: upgrades inevitably introduce some disruption since - workloads need to be moved from old nodes to new, upgraded ones. - Even if maxUnavailable=0, this holds true. (Disruption stays - within the limits of PodDisruptionBudget, if it is configured.) - - Consider a hypothetical node pool with 5 nodes having - maxSurge=2, maxUnavailable=1. This means the upgrade process - upgrades 3 nodes simultaneously. It creates 2 additional - (upgraded) nodes, then it brings down 3 old (not yet upgraded) - nodes at the same time. This ensures that there are always at - least 4 nodes available. - + r""" Attributes: max_surge (int): The maximum number of nodes that can be @@ -2937,6 +3208,7 @@ class UpgradeSettings(proto.Message): config = proto.Field(proto.MESSAGE, number=2, message="NodeConfig",) initial_node_count = proto.Field(proto.INT32, number=3,) locations = proto.RepeatedField(proto.STRING, number=13,) + network_config = proto.Field(proto.MESSAGE, number=14, message="NodeNetworkConfig",) self_link = proto.Field(proto.STRING, number=100,) version = proto.Field(proto.STRING, number=101,) instance_group_urls = proto.RepeatedField(proto.STRING, number=102,) @@ -3171,9 +3443,7 @@ class SetNodePoolManagementRequest(proto.Message): class SetNodePoolSizeRequest(proto.Message): - r"""SetNodePoolSizeRequest sets the size a node - pool. - + r"""SetNodePoolSizeRequest sets the size of a node pool. Attributes: project_id (str): Required. Deprecated. The Google Developers Console `project @@ -3366,8 +3636,7 @@ class AutoprovisioningNodePoolDefaults(proto.Message): KMS Keys please see: https://cloud.google.com/compute/docs/disks/customer-managed-encryption image_type (str): - The image type to use for node created by - NodeAutoprovisioning. + The image type to use for NAP created node. """ oauth_scopes = proto.RepeatedField(proto.STRING, number=1,) @@ -3420,7 +3689,7 @@ class NodePoolAutoscaling(proto.Message): max_node_count. max_node_count (int): Maximum number of nodes in the NodePool. Must be >= - min_node_count. There has to enough quota to scale up the + min_node_count. There has to be enough quota to scale up the cluster. autoprovisioned (bool): Can this node pool be deleted automatically. @@ -3592,10 +3861,15 @@ class AcceleratorConfig(proto.Message): The accelerator type resource name. List of supported accelerators `here `__ + gpu_partition_size (str): + Size of partitions to create on the GPU. Valid values are + described in the NVIDIA `mig user + guide `__. """ accelerator_count = proto.Field(proto.INT64, number=1,) accelerator_type = proto.Field(proto.STRING, number=2,) + gpu_partition_size = proto.Field(proto.STRING, number=3,) class WorkloadMetadataConfig(proto.Message): @@ -3783,12 +4057,14 @@ class StatusCondition(proto.Message): class Code(proto.Enum): r"""Code for each condition""" + _pb_options = {"deprecated": True} UNKNOWN = 0 GCE_STOCKOUT = 1 GKE_SERVICE_ACCOUNT_DELETED = 2 GCE_QUOTA_EXCEEDED = 3 SET_BY_OPERATOR = 4 CLOUD_KMS_KEY_ERROR = 7 + CA_EXPIRING = 9 code = proto.Field(proto.ENUM, number=1, enum=Code,) message = proto.Field(proto.STRING, number=2,) @@ -3820,10 +4096,25 @@ class NetworkConfig(proto.Message): is disabled. When disabled is set to false, default IP masquerade rules will be applied to the nodes to prevent sNAT on cluster internal traffic. + enable_l4ilb_subsetting (bool): + Whether L4ILB Subsetting is enabled for this + cluster. datapath_provider (google.cloud.container_v1beta1.types.DatapathProvider): The desired datapath provider for this cluster. By default, uses the IPTables-based kube-proxy implementation. + private_ipv6_google_access (google.cloud.container_v1beta1.types.PrivateIPv6GoogleAccess): + The desired state of IPv6 connectivity to + Google Services. By default, no private IPv6 + access to or from Google Services (all access + will be via IPv4) + dns_config (google.cloud.container_v1beta1.types.DNSConfig): + DNSConfig contains clusterDNS config for this + cluster. + service_external_ips_config (google.cloud.container_v1beta1.types.ServiceExternalIPsConfig): + ServiceExternalIPsConfig specifies if + services with externalIPs field are blocked or + not. """ network = proto.Field(proto.STRING, number=1,) @@ -3832,7 +4123,26 @@ class NetworkConfig(proto.Message): default_snat_status = proto.Field( proto.MESSAGE, number=7, message="DefaultSnatStatus", ) + enable_l4ilb_subsetting = proto.Field(proto.BOOL, number=10,) datapath_provider = proto.Field(proto.ENUM, number=11, enum="DatapathProvider",) + private_ipv6_google_access = proto.Field( + proto.ENUM, number=12, enum="PrivateIPv6GoogleAccess", + ) + dns_config = proto.Field(proto.MESSAGE, number=13, message="DNSConfig",) + service_external_ips_config = proto.Field( + proto.MESSAGE, number=15, message="ServiceExternalIPsConfig", + ) + + +class ServiceExternalIPsConfig(proto.Message): + r"""Config to block services with externalIPs field. + Attributes: + enabled (bool): + Whether Services with ExternalIPs field are + allowed or not. + """ + + enabled = proto.Field(proto.BOOL, number=1,) class ListUsableSubnetworksRequest(proto.Message): @@ -3995,6 +4305,53 @@ class IntraNodeVisibilityConfig(proto.Message): enabled = proto.Field(proto.BOOL, number=1,) +class ILBSubsettingConfig(proto.Message): + r"""ILBSubsettingConfig contains the desired config of L4 + Internal LoadBalancer subsetting on this cluster. + + Attributes: + enabled (bool): + Enables l4 ILB subsetting for this cluster + """ + + enabled = proto.Field(proto.BOOL, number=1,) + + +class DNSConfig(proto.Message): + r"""DNSConfig contains the desired set of options for configuring + clusterDNS. + + Attributes: + cluster_dns (google.cloud.container_v1beta1.types.DNSConfig.Provider): + cluster_dns indicates which in-cluster DNS provider should + be used. + cluster_dns_scope (google.cloud.container_v1beta1.types.DNSConfig.DNSScope): + cluster_dns_scope indicates the scope of access to cluster + DNS records. + cluster_dns_domain (str): + cluster_dns_domain is the suffix used for all cluster + service records. + """ + + class Provider(proto.Enum): + r"""Provider lists the various in-cluster DNS providers.""" + PROVIDER_UNSPECIFIED = 0 + PLATFORM_DEFAULT = 1 + CLOUD_DNS = 2 + + class DNSScope(proto.Enum): + r"""DNSScope lists the various scopes of access to cluster DNS + records. + """ + DNS_SCOPE_UNSPECIFIED = 0 + CLUSTER_SCOPE = 1 + VPC_SCOPE = 2 + + cluster_dns = proto.Field(proto.ENUM, number=1, enum=Provider,) + cluster_dns_scope = proto.Field(proto.ENUM, number=2, enum=DNSScope,) + cluster_dns_domain = proto.Field(proto.STRING, number=3,) + + class MaxPodsConstraint(proto.Message): r"""Constraints applied to pods. Attributes: @@ -4027,6 +4384,30 @@ class WorkloadIdentityConfig(proto.Message): identity_provider = proto.Field(proto.STRING, number=3,) +class WorkloadCertificates(proto.Message): + r"""Configuration for issuance of mTLS keys and certificates to + Kubernetes pods. + + Attributes: + enable_certificates (google.protobuf.wrappers_pb2.BoolValue): + enable_certificates controls issuance of workload mTLS + certificates. + + If set, the GKE Workload Identity Certificates controller + and node agent will be deployed in the cluster, which can + then be configured by creating a WorkloadCertificateConfig + Custom Resource. + + Requires Workload Identity + ([workload_pool][google.container.v1beta1.WorkloadIdentityConfig.workload_pool] + must be non-empty). + """ + + enable_certificates = proto.Field( + proto.MESSAGE, number=1, message=wrappers_pb2.BoolValue, + ) + + class DatabaseEncryption(proto.Message): r"""Configuration of etcd encryption. Attributes: @@ -4108,6 +4489,17 @@ class ShieldedNodes(proto.Message): enabled = proto.Field(proto.BOOL, number=1,) +class VirtualNIC(proto.Message): + r"""Configuration of gVNIC feature. + Attributes: + enabled (bool): + Whether gVNIC features are enabled in the + node pool. + """ + + enabled = proto.Field(proto.BOOL, number=1,) + + class GetOpenIDConfigRequest(proto.Message): r"""GetOpenIDConfigRequest gets the OIDC discovery document for the cluster. See the OpenID Connect Discovery 1.0 specification @@ -4263,6 +4655,18 @@ class Master(proto.Message): r"""Master is the configuration for components on master. """ +class Autopilot(proto.Message): + r"""Autopilot is the configuration for Autopilot settings on the + cluster. + + Attributes: + enabled (bool): + Enable Autopilot + """ + + enabled = proto.Field(proto.BOOL, number=1,) + + class NotificationConfig(proto.Message): r"""NotificationConfig is the configuration of notifications. Attributes: @@ -4306,23 +4710,19 @@ class UpgradeEvent(proto.Message): Attributes: resource_type (google.cloud.container_v1beta1.types.UpgradeResourceType): - Required. The resource type that is - upgrading. + The resource type that is upgrading. operation (str): - Required. The operation associated with this - upgrade. + The operation associated with this upgrade. operation_start_time (google.protobuf.timestamp_pb2.Timestamp): - Required. The time when the operation was - started. + The time when the operation was started. current_version (str): - Required. The current version before the - upgrade. + The current version before the upgrade. target_version (str): - Required. The target version for the upgrade. + The target version for the upgrade. resource (str): - Optional. Optional relative path to the - resource. For example in node pool upgrades, the - relative path of the node pool. + Optional relative path to the resource. For + example in node pool upgrades, the relative path + of the node pool. """ resource_type = proto.Field(proto.ENUM, number=1, enum="UpgradeResourceType",) @@ -4335,4 +4735,106 @@ class UpgradeEvent(proto.Message): resource = proto.Field(proto.STRING, number=6,) +class UpgradeAvailableEvent(proto.Message): + r"""UpgradeAvailableEvent is a notification sent to customers + when a new available version is released. + + Attributes: + version (str): + The release version available for upgrade. + resource_type (google.cloud.container_v1beta1.types.UpgradeResourceType): + The resource type of the release version. + release_channel (google.cloud.container_v1beta1.types.ReleaseChannel): + The release channel of the version. If empty, + it means a non-channel release. + resource (str): + Optional relative path to the resource. For + example, the relative path of the node pool. + windows_versions (google.cloud.container_v1beta1.types.WindowsVersions): + Windows node versions info. + """ + + version = proto.Field(proto.STRING, number=1,) + resource_type = proto.Field(proto.ENUM, number=2, enum="UpgradeResourceType",) + release_channel = proto.Field(proto.MESSAGE, number=3, message="ReleaseChannel",) + resource = proto.Field(proto.STRING, number=4,) + windows_versions = proto.Field(proto.MESSAGE, number=5, message="WindowsVersions",) + + +class IdentityServiceConfig(proto.Message): + r"""IdentityServiceConfig is configuration for Identity Service + which allows customers to use external identity providers with + the K8S API + + Attributes: + enabled (bool): + Whether to enable the Identity Service + component + """ + + enabled = proto.Field(proto.BOOL, number=1,) + + +class LoggingConfig(proto.Message): + r"""LoggingConfig is cluster logging configuration. + Attributes: + component_config (google.cloud.container_v1beta1.types.LoggingComponentConfig): + Logging components configuration + """ + + component_config = proto.Field( + proto.MESSAGE, number=1, message="LoggingComponentConfig", + ) + + +class LoggingComponentConfig(proto.Message): + r"""LoggingComponentConfig is cluster logging component + configuration. + + Attributes: + enable_components (Sequence[google.cloud.container_v1beta1.types.LoggingComponentConfig.Component]): + Select components to collect logs. An empty + set would disable all logging. + """ + + class Component(proto.Enum): + r"""GKE components exposing logs""" + COMPONENT_UNSPECIFIED = 0 + SYSTEM_COMPONENTS = 1 + WORKLOADS = 2 + + enable_components = proto.RepeatedField(proto.ENUM, number=1, enum=Component,) + + +class MonitoringConfig(proto.Message): + r"""MonitoringConfig is cluster monitoring configuration. + Attributes: + component_config (google.cloud.container_v1beta1.types.MonitoringComponentConfig): + Monitoring components configuration + """ + + component_config = proto.Field( + proto.MESSAGE, number=1, message="MonitoringComponentConfig", + ) + + +class MonitoringComponentConfig(proto.Message): + r"""MonitoringComponentConfig is cluster monitoring component + configuration. + + Attributes: + enable_components (Sequence[google.cloud.container_v1beta1.types.MonitoringComponentConfig.Component]): + Select components to collect metrics. An + empty set would disable all monitoring. + """ + + class Component(proto.Enum): + r"""GKE components exposing metrics""" + COMPONENT_UNSPECIFIED = 0 + SYSTEM_COMPONENTS = 1 + WORKLOADS = 2 + + enable_components = proto.RepeatedField(proto.ENUM, number=1, enum=Component,) + + __all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/scripts/fixup_container_v1beta1_keywords.py b/scripts/fixup_container_v1beta1_keywords.py index fcd6cd36..9ba1d854 100644 --- a/scripts/fixup_container_v1beta1_keywords.py +++ b/scripts/fixup_container_v1beta1_keywords.py @@ -71,7 +71,7 @@ class containerCallTransformer(cst.CSTTransformer): 'start_ip_rotation': ('project_id', 'zone', 'cluster_id', 'name', 'rotate_credentials', ), 'update_cluster': ('project_id', 'zone', 'cluster_id', 'update', 'name', ), 'update_master': ('project_id', 'zone', 'cluster_id', 'master_version', 'name', ), - 'update_node_pool': ('project_id', 'zone', 'cluster_id', 'node_pool_id', 'node_version', 'image_type', 'locations', 'workload_metadata_config', 'name', 'upgrade_settings', 'linux_node_config', 'kubelet_config', ), + 'update_node_pool': ('project_id', 'zone', 'cluster_id', 'node_pool_id', 'node_version', 'image_type', 'locations', 'workload_metadata_config', 'name', 'upgrade_settings', 'tags', 'taints', 'labels', 'linux_node_config', 'kubelet_config', 'gvnic', ), } def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode: diff --git a/setup.py b/setup.py index f26b3498..bb0bd534 100644 --- a/setup.py +++ b/setup.py @@ -34,7 +34,7 @@ # https://github.com/googleapis/google-cloud-python/issues/10566 "google-api-core[grpc] >= 1.26.0, <3.0.0dev", "grpc-google-iam-v1 >= 0.12.3, < 0.13dev", - "proto-plus >= 1.4.0", + "proto-plus >= 1.15.0", "packaging >= 14.3", "libcst >= 0.2.5", ] diff --git a/testing/constraints-3.6.txt b/testing/constraints-3.6.txt index 58c6eba2..11e12641 100644 --- a/testing/constraints-3.6.txt +++ b/testing/constraints-3.6.txt @@ -7,6 +7,6 @@ # Then this file should have foo==1.14.0 google-api-core==1.26.0 grpc-google-iam-v1==0.12.3 -proto-plus==1.4.0 +proto-plus==1.15.0 libcst==0.2.5 packaging==14.3 diff --git a/tests/unit/gapic/container_v1beta1/test_cluster_manager.py b/tests/unit/gapic/container_v1beta1/test_cluster_manager.py index 40533eae..929fac3b 100644 --- a/tests/unit/gapic/container_v1beta1/test_cluster_manager.py +++ b/tests/unit/gapic/container_v1beta1/test_cluster_manager.py @@ -759,6 +759,7 @@ def test_get_cluster( location="location_value", enable_tpu=True, tpu_ipv4_cidr_block="tpu_ipv4_cidr_block_value", + id="id_value", ) response = client.get_cluster(request) @@ -799,6 +800,7 @@ def test_get_cluster( assert response.location == "location_value" assert response.enable_tpu is True assert response.tpu_ipv4_cidr_block == "tpu_ipv4_cidr_block_value" + assert response.id == "id_value" def test_get_cluster_from_dict(): @@ -867,6 +869,7 @@ async def test_get_cluster_async( location="location_value", enable_tpu=True, tpu_ipv4_cidr_block="tpu_ipv4_cidr_block_value", + id="id_value", ) ) response = await client.get_cluster(request) @@ -908,6 +911,7 @@ async def test_get_cluster_async( assert response.location == "location_value" assert response.enable_tpu is True assert response.tpu_ipv4_cidr_block == "tpu_ipv4_cidr_block_value" + assert response.id == "id_value" @pytest.mark.asyncio