From d6da30922e76d8c56b8ec3c78b0cb8ffbb5bd82a Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 13 Jun 2023 10:41:20 -0400 Subject: [PATCH 1/2] feat: add API for GPU driver installation config (#377) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add API for GPU driver installation config --- feat: add SecurityPostureConfig API field to allow customers to enable GKE Security Posture capabilities for their clusters --- feat: add workloadPolicyConfig API field to allow customer enable NET_ADMIN capability for their autopilot clusters PiperOrigin-RevId: 538770734 Source-Link: https://github.com/googleapis/googleapis/commit/b7e93121d514f1ab1f2b446de0969125a18914c8 Source-Link: https://github.com/googleapis/googleapis-gen/commit/0988e7e1feed3b087096b2167dc262320ead297a Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDk4OGU3ZTFmZWVkM2IwODcwOTZiMjE2N2RjMjYyMzIwZWFkMjk3YSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: add API for GPU driver installation config --- feat: add SecurityPostureConfig API field to allow customers to enable GKE Security Posture capabilities for their clusters --- feat: add workloadPolicyConfig API field to allow customer enable NET_ADMIN capability for their autopilot clusters PiperOrigin-RevId: 539136563 Source-Link: https://github.com/googleapis/googleapis/commit/ca49cb95bdb183eb7d6009414dd2cfccdb727d61 Source-Link: https://github.com/googleapis/googleapis-gen/commit/b7903fd0e95031cce1ed78dbb82f44d7c3ba5ba1 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjc5MDNmZDBlOTUwMzFjY2UxZWQ3OGRiYjgyZjQ0ZDdjM2JhNWJhMSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- google/cloud/container/__init__.py | 6 + google/cloud/container_v1/__init__.py | 6 + google/cloud/container_v1/types/__init__.py | 6 + .../container_v1/types/cluster_service.py | 178 ++++++++++++++++++ google/cloud/container_v1beta1/__init__.py | 6 + .../cloud/container_v1beta1/types/__init__.py | 6 + .../types/cluster_service.py | 178 ++++++++++++++++++ .../snippet_metadata_google.container.v1.json | 2 +- ...pet_metadata_google.container.v1beta1.json | 2 +- 9 files changed, 388 insertions(+), 2 deletions(-) diff --git a/google/cloud/container/__init__.py b/google/cloud/container/__init__.py index e7390061..9e62eac2 100644 --- a/google/cloud/container/__init__.py +++ b/google/cloud/container/__init__.py @@ -76,6 +76,7 @@ GetOperationRequest, GetServerConfigRequest, GkeBackupAgentConfig, + GPUDriverInstallationConfig, GPUSharingConfig, HorizontalPodAutoscaling, HttpLoadBalancing, @@ -145,6 +146,7 @@ RollbackNodePoolUpgradeRequest, SandboxConfig, SecurityBulletinEvent, + SecurityPostureConfig, ServerConfig, ServiceExternalIPsConfig, SetAddonsConfigRequest, @@ -179,6 +181,7 @@ WindowsNodeConfig, WorkloadIdentityConfig, WorkloadMetadataConfig, + WorkloadPolicyConfig, ) __all__ = ( @@ -234,6 +237,7 @@ "GetOperationRequest", "GetServerConfigRequest", "GkeBackupAgentConfig", + "GPUDriverInstallationConfig", "GPUSharingConfig", "HorizontalPodAutoscaling", "HttpLoadBalancing", @@ -300,6 +304,7 @@ "RollbackNodePoolUpgradeRequest", "SandboxConfig", "SecurityBulletinEvent", + "SecurityPostureConfig", "ServerConfig", "ServiceExternalIPsConfig", "SetAddonsConfigRequest", @@ -332,6 +337,7 @@ "WindowsNodeConfig", "WorkloadIdentityConfig", "WorkloadMetadataConfig", + "WorkloadPolicyConfig", "DatapathProvider", "IPv6AccessType", "NodePoolUpdateStrategy", diff --git a/google/cloud/container_v1/__init__.py b/google/cloud/container_v1/__init__.py index af3051b9..bc5a6a9f 100644 --- a/google/cloud/container_v1/__init__.py +++ b/google/cloud/container_v1/__init__.py @@ -71,6 +71,7 @@ GetOperationRequest, GetServerConfigRequest, GkeBackupAgentConfig, + GPUDriverInstallationConfig, GPUSharingConfig, HorizontalPodAutoscaling, HttpLoadBalancing, @@ -140,6 +141,7 @@ RollbackNodePoolUpgradeRequest, SandboxConfig, SecurityBulletinEvent, + SecurityPostureConfig, ServerConfig, ServiceExternalIPsConfig, SetAddonsConfigRequest, @@ -174,6 +176,7 @@ WindowsNodeConfig, WorkloadIdentityConfig, WorkloadMetadataConfig, + WorkloadPolicyConfig, ) __all__ = ( @@ -217,6 +220,7 @@ "EphemeralStorageLocalSsdConfig", "FastSocket", "Fleet", + "GPUDriverInstallationConfig", "GPUSharingConfig", "GatewayAPIConfig", "GcePersistentDiskCsiDriverConfig", @@ -299,6 +303,7 @@ "RollbackNodePoolUpgradeRequest", "SandboxConfig", "SecurityBulletinEvent", + "SecurityPostureConfig", "ServerConfig", "ServiceExternalIPsConfig", "SetAddonsConfigRequest", @@ -333,4 +338,5 @@ "WindowsNodeConfig", "WorkloadIdentityConfig", "WorkloadMetadataConfig", + "WorkloadPolicyConfig", ) diff --git a/google/cloud/container_v1/types/__init__.py b/google/cloud/container_v1/types/__init__.py index 1b0016b1..4efd9361 100644 --- a/google/cloud/container_v1/types/__init__.py +++ b/google/cloud/container_v1/types/__init__.py @@ -65,6 +65,7 @@ GetOperationRequest, GetServerConfigRequest, GkeBackupAgentConfig, + GPUDriverInstallationConfig, GPUSharingConfig, HorizontalPodAutoscaling, HttpLoadBalancing, @@ -134,6 +135,7 @@ RollbackNodePoolUpgradeRequest, SandboxConfig, SecurityBulletinEvent, + SecurityPostureConfig, ServerConfig, ServiceExternalIPsConfig, SetAddonsConfigRequest, @@ -168,6 +170,7 @@ WindowsNodeConfig, WorkloadIdentityConfig, WorkloadMetadataConfig, + WorkloadPolicyConfig, ) __all__ = ( @@ -221,6 +224,7 @@ "GetOperationRequest", "GetServerConfigRequest", "GkeBackupAgentConfig", + "GPUDriverInstallationConfig", "GPUSharingConfig", "HorizontalPodAutoscaling", "HttpLoadBalancing", @@ -287,6 +291,7 @@ "RollbackNodePoolUpgradeRequest", "SandboxConfig", "SecurityBulletinEvent", + "SecurityPostureConfig", "ServerConfig", "ServiceExternalIPsConfig", "SetAddonsConfigRequest", @@ -319,6 +324,7 @@ "WindowsNodeConfig", "WorkloadIdentityConfig", "WorkloadMetadataConfig", + "WorkloadPolicyConfig", "DatapathProvider", "IPv6AccessType", "NodePoolUpdateStrategy", diff --git a/google/cloud/container_v1/types/cluster_service.py b/google/cloud/container_v1/types/cluster_service.py index dbfc2b32..2b49287d 100644 --- a/google/cloud/container_v1/types/cluster_service.py +++ b/google/cloud/container_v1/types/cluster_service.py @@ -73,6 +73,7 @@ "IPAllocationPolicy", "Cluster", "K8sBetaAPIConfig", + "SecurityPostureConfig", "NodePoolAutoConfig", "NodePoolDefaults", "NodeConfigDefaults", @@ -130,6 +131,7 @@ "CompleteIPRotationRequest", "AcceleratorConfig", "GPUSharingConfig", + "GPUDriverInstallationConfig", "WorkloadMetadataConfig", "SetNetworkPolicyRequest", "SetMaintenancePolicyRequest", @@ -171,6 +173,7 @@ "UpgradeAvailableEvent", "SecurityBulletinEvent", "Autopilot", + "WorkloadPolicyConfig", "LoggingConfig", "LoggingComponentConfig", "MonitoringConfig", @@ -2505,6 +2508,9 @@ class Cluster(proto.Message): up-to-date value before proceeding. fleet (google.cloud.container_v1.types.Fleet): Fleet information for the cluster. + security_posture_config (google.cloud.container_v1.types.SecurityPostureConfig): + Enable/Disable Security Posture API features + for the cluster. enable_k8s_beta_apis (google.cloud.container_v1.types.K8sBetaAPIConfig): Beta APIs Config """ @@ -2838,6 +2844,11 @@ class Status(proto.Enum): number=140, message="Fleet", ) + security_posture_config: "SecurityPostureConfig" = proto.Field( + proto.MESSAGE, + number=145, + message="SecurityPostureConfig", + ) enable_k8s_beta_apis: "K8sBetaAPIConfig" = proto.Field( proto.MESSAGE, number=143, @@ -2859,6 +2870,76 @@ class K8sBetaAPIConfig(proto.Message): ) +class SecurityPostureConfig(proto.Message): + r"""SecurityPostureConfig defines the flags needed to + enable/disable features for the Security Posture API. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + mode (google.cloud.container_v1.types.SecurityPostureConfig.Mode): + Sets which mode to use for Security Posture + features. + + This field is a member of `oneof`_ ``_mode``. + vulnerability_mode (google.cloud.container_v1.types.SecurityPostureConfig.VulnerabilityMode): + Sets which mode to use for vulnerability + scanning. + + This field is a member of `oneof`_ ``_vulnerability_mode``. + """ + + class Mode(proto.Enum): + r"""Mode defines enablement mode for GKE Security posture + features. + + Values: + MODE_UNSPECIFIED (0): + Default value not specified. + DISABLED (1): + Disables Security Posture features on the + cluster. + BASIC (2): + Applies Security Posture features on the + cluster. + """ + MODE_UNSPECIFIED = 0 + DISABLED = 1 + BASIC = 2 + + class VulnerabilityMode(proto.Enum): + r"""VulnerabilityMode defines enablement mode for vulnerability + scanning. + + Values: + VULNERABILITY_MODE_UNSPECIFIED (0): + Default value not specified. + VULNERABILITY_DISABLED (1): + Disables vulnerability scanning on the + cluster. + VULNERABILITY_BASIC (2): + Applies basic vulnerability scanning on the + cluster. + """ + VULNERABILITY_MODE_UNSPECIFIED = 0 + VULNERABILITY_DISABLED = 1 + VULNERABILITY_BASIC = 2 + + mode: Mode = proto.Field( + proto.ENUM, + number=1, + optional=True, + enum=Mode, + ) + vulnerability_mode: VulnerabilityMode = proto.Field( + proto.ENUM, + number=2, + optional=True, + enum=VulnerabilityMode, + ) + + class NodePoolAutoConfig(proto.Message): r"""Node pool configs that apply to all auto-provisioned node pools in autopilot clusters and node auto-provisioning enabled @@ -3117,11 +3198,17 @@ class ClusterUpdate(proto.Message): enable_k8s_beta_apis (google.cloud.container_v1.types.K8sBetaAPIConfig): Kubernetes open source beta apis enabled on the cluster. Only beta apis + desired_security_posture_config (google.cloud.container_v1.types.SecurityPostureConfig): + Enable/Disable Security Posture API features + for the cluster. desired_enable_fqdn_network_policy (bool): Enable/Disable FQDN Network Policy for the cluster. This field is a member of `oneof`_ ``_desired_enable_fqdn_network_policy``. + desired_autopilot_workload_policy_config (google.cloud.container_v1.types.WorkloadPolicyConfig): + The desired workload policy configuration for + the autopilot cluster. desired_k8s_beta_apis (google.cloud.container_v1.types.K8sBetaAPIConfig): Desired Beta APIs to be enabled for cluster. """ @@ -3340,11 +3427,21 @@ class ClusterUpdate(proto.Message): number=122, message="K8sBetaAPIConfig", ) + desired_security_posture_config: "SecurityPostureConfig" = proto.Field( + proto.MESSAGE, + number=124, + message="SecurityPostureConfig", + ) desired_enable_fqdn_network_policy: bool = proto.Field( proto.BOOL, number=126, optional=True, ) + desired_autopilot_workload_policy_config: "WorkloadPolicyConfig" = proto.Field( + proto.MESSAGE, + number=128, + message="WorkloadPolicyConfig", + ) desired_k8s_beta_apis: "K8sBetaAPIConfig" = proto.Field( proto.MESSAGE, number=131, @@ -6661,6 +6758,11 @@ class AcceleratorConfig(proto.Message): The configuration for GPU sharing options. This field is a member of `oneof`_ ``_gpu_sharing_config``. + gpu_driver_installation_config (google.cloud.container_v1.types.GPUDriverInstallationConfig): + The configuration for auto installation of + GPU driver. + + This field is a member of `oneof`_ ``_gpu_driver_installation_config``. """ accelerator_count: int = proto.Field( @@ -6681,6 +6783,12 @@ class AcceleratorConfig(proto.Message): optional=True, message="GPUSharingConfig", ) + gpu_driver_installation_config: "GPUDriverInstallationConfig" = proto.Field( + proto.MESSAGE, + number=6, + optional=True, + message="GPUDriverInstallationConfig", + ) class GPUSharingConfig(proto.Message): @@ -6725,6 +6833,48 @@ class GPUSharingStrategy(proto.Enum): ) +class GPUDriverInstallationConfig(proto.Message): + r"""GPUDriverInstallationConfig specifies the version of GPU + driver to be auto installed. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + gpu_driver_version (google.cloud.container_v1.types.GPUDriverInstallationConfig.GPUDriverVersion): + Mode for how the GPU driver is installed. + + This field is a member of `oneof`_ ``_gpu_driver_version``. + """ + + class GPUDriverVersion(proto.Enum): + r"""The GPU driver version to install. + + Values: + GPU_DRIVER_VERSION_UNSPECIFIED (0): + Default value is to not install any GPU + driver. + INSTALLATION_DISABLED (1): + Disable GPU driver auto installation and + needs manual installation + DEFAULT (2): + "Default" GPU driver in COS and Ubuntu. + LATEST (3): + "Latest" GPU driver in COS. + """ + GPU_DRIVER_VERSION_UNSPECIFIED = 0 + INSTALLATION_DISABLED = 1 + DEFAULT = 2 + LATEST = 3 + + gpu_driver_version: GPUDriverVersion = proto.Field( + proto.ENUM, + number=1, + optional=True, + enum=GPUDriverVersion, + ) + + class WorkloadMetadataConfig(proto.Message): r"""WorkloadMetadataConfig defines the metadata configuration to expose to workloads on the node pool. @@ -8252,12 +8402,40 @@ class Autopilot(proto.Message): Attributes: enabled (bool): Enable Autopilot + workload_policy_config (google.cloud.container_v1.types.WorkloadPolicyConfig): + Workload policy configuration for Autopilot. """ enabled: bool = proto.Field( proto.BOOL, number=1, ) + workload_policy_config: "WorkloadPolicyConfig" = proto.Field( + proto.MESSAGE, + number=2, + message="WorkloadPolicyConfig", + ) + + +class WorkloadPolicyConfig(proto.Message): + r"""WorkloadPolicyConfig is the configuration of workload policy + for autopilot clusters. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + allow_net_admin (bool): + If true, workloads can use NET_ADMIN capability. + + This field is a member of `oneof`_ ``_allow_net_admin``. + """ + + allow_net_admin: bool = proto.Field( + proto.BOOL, + number=1, + optional=True, + ) class LoggingConfig(proto.Message): diff --git a/google/cloud/container_v1beta1/__init__.py b/google/cloud/container_v1beta1/__init__.py index 72bc8cbf..cbafeec8 100644 --- a/google/cloud/container_v1beta1/__init__.py +++ b/google/cloud/container_v1beta1/__init__.py @@ -74,6 +74,7 @@ GetOperationRequest, GetServerConfigRequest, GkeBackupAgentConfig, + GPUDriverInstallationConfig, GPUSharingConfig, HorizontalPodAutoscaling, HttpLoadBalancing, @@ -150,6 +151,7 @@ RollbackNodePoolUpgradeRequest, SandboxConfig, SecurityBulletinEvent, + SecurityPostureConfig, ServerConfig, ServiceExternalIPsConfig, SetAddonsConfigRequest, @@ -189,6 +191,7 @@ WorkloadConfig, WorkloadIdentityConfig, WorkloadMetadataConfig, + WorkloadPolicyConfig, ) __all__ = ( @@ -234,6 +237,7 @@ "EphemeralStorageLocalSsdConfig", "FastSocket", "Fleet", + "GPUDriverInstallationConfig", "GPUSharingConfig", "GatewayAPIConfig", "GcePersistentDiskCsiDriverConfig", @@ -324,6 +328,7 @@ "RollbackNodePoolUpgradeRequest", "SandboxConfig", "SecurityBulletinEvent", + "SecurityPostureConfig", "ServerConfig", "ServiceExternalIPsConfig", "SetAddonsConfigRequest", @@ -363,4 +368,5 @@ "WorkloadConfig", "WorkloadIdentityConfig", "WorkloadMetadataConfig", + "WorkloadPolicyConfig", ) diff --git a/google/cloud/container_v1beta1/types/__init__.py b/google/cloud/container_v1beta1/types/__init__.py index 71a85c79..6b45a128 100644 --- a/google/cloud/container_v1beta1/types/__init__.py +++ b/google/cloud/container_v1beta1/types/__init__.py @@ -68,6 +68,7 @@ GetOperationRequest, GetServerConfigRequest, GkeBackupAgentConfig, + GPUDriverInstallationConfig, GPUSharingConfig, HorizontalPodAutoscaling, HttpLoadBalancing, @@ -144,6 +145,7 @@ RollbackNodePoolUpgradeRequest, SandboxConfig, SecurityBulletinEvent, + SecurityPostureConfig, ServerConfig, ServiceExternalIPsConfig, SetAddonsConfigRequest, @@ -183,6 +185,7 @@ WorkloadConfig, WorkloadIdentityConfig, WorkloadMetadataConfig, + WorkloadPolicyConfig, ) __all__ = ( @@ -239,6 +242,7 @@ "GetOperationRequest", "GetServerConfigRequest", "GkeBackupAgentConfig", + "GPUDriverInstallationConfig", "GPUSharingConfig", "HorizontalPodAutoscaling", "HttpLoadBalancing", @@ -313,6 +317,7 @@ "RollbackNodePoolUpgradeRequest", "SandboxConfig", "SecurityBulletinEvent", + "SecurityPostureConfig", "ServerConfig", "ServiceExternalIPsConfig", "SetAddonsConfigRequest", @@ -350,6 +355,7 @@ "WorkloadConfig", "WorkloadIdentityConfig", "WorkloadMetadataConfig", + "WorkloadPolicyConfig", "DatapathProvider", "NodePoolUpdateStrategy", "PrivateIPv6GoogleAccess", diff --git a/google/cloud/container_v1beta1/types/cluster_service.py b/google/cloud/container_v1beta1/types/cluster_service.py index 8c2cb0c4..eacc7c64 100644 --- a/google/cloud/container_v1beta1/types/cluster_service.py +++ b/google/cloud/container_v1beta1/types/cluster_service.py @@ -83,6 +83,7 @@ "K8sBetaAPIConfig", "WorkloadConfig", "ProtectConfig", + "SecurityPostureConfig", "NodePoolDefaults", "NodeConfigDefaults", "NodePoolAutoConfig", @@ -141,6 +142,7 @@ "CompleteIPRotationRequest", "AcceleratorConfig", "GPUSharingConfig", + "GPUDriverInstallationConfig", "ManagedPrometheusConfig", "WorkloadMetadataConfig", "SetNetworkPolicyRequest", @@ -184,6 +186,7 @@ "TpuConfig", "Master", "Autopilot", + "WorkloadPolicyConfig", "NotificationConfig", "ConfidentialNodes", "UpgradeEvent", @@ -2827,6 +2830,9 @@ class Cluster(proto.Message): up-to-date value before proceeding. fleet (google.cloud.container_v1beta1.types.Fleet): Fleet information for the cluster. + security_posture_config (google.cloud.container_v1beta1.types.SecurityPostureConfig): + Enable/Disable Security Posture API features + for the cluster. """ class Status(proto.Enum): @@ -3206,6 +3212,11 @@ class Status(proto.Enum): number=140, message="Fleet", ) + security_posture_config: "SecurityPostureConfig" = proto.Field( + proto.MESSAGE, + number=145, + message="SecurityPostureConfig", + ) class K8sBetaAPIConfig(proto.Message): @@ -3326,6 +3337,76 @@ class WorkloadVulnerabilityMode(proto.Enum): ) +class SecurityPostureConfig(proto.Message): + r"""SecurityPostureConfig defines the flags needed to + enable/disable features for the Security Posture API. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + mode (google.cloud.container_v1beta1.types.SecurityPostureConfig.Mode): + Sets which mode to use for Security Posture + features. + + This field is a member of `oneof`_ ``_mode``. + vulnerability_mode (google.cloud.container_v1beta1.types.SecurityPostureConfig.VulnerabilityMode): + Sets which mode to use for vulnerability + scanning. + + This field is a member of `oneof`_ ``_vulnerability_mode``. + """ + + class Mode(proto.Enum): + r"""Mode defines enablement mode for GKE Security posture + features. + + Values: + MODE_UNSPECIFIED (0): + Default value not specified. + DISABLED (1): + Disables Security Posture features on the + cluster. + BASIC (2): + Applies Security Posture features on the + cluster. + """ + MODE_UNSPECIFIED = 0 + DISABLED = 1 + BASIC = 2 + + class VulnerabilityMode(proto.Enum): + r"""VulnerabilityMode defines enablement mode for vulnerability + scanning. + + Values: + VULNERABILITY_MODE_UNSPECIFIED (0): + Default value not specified. + VULNERABILITY_DISABLED (1): + Disables vulnerability scanning on the + cluster. + VULNERABILITY_BASIC (2): + Applies basic vulnerability scanning on the + cluster. + """ + VULNERABILITY_MODE_UNSPECIFIED = 0 + VULNERABILITY_DISABLED = 1 + VULNERABILITY_BASIC = 2 + + mode: Mode = proto.Field( + proto.ENUM, + number=1, + optional=True, + enum=Mode, + ) + vulnerability_mode: VulnerabilityMode = proto.Field( + proto.ENUM, + number=2, + optional=True, + enum=VulnerabilityMode, + ) + + class NodePoolDefaults(proto.Message): r"""Subset of Nodepool message that has defaults. @@ -3607,11 +3688,17 @@ class ClusterUpdate(proto.Message): enable_k8s_beta_apis (google.cloud.container_v1beta1.types.K8sBetaAPIConfig): Kubernetes open source beta apis enabled on the cluster. Only beta apis + desired_security_posture_config (google.cloud.container_v1beta1.types.SecurityPostureConfig): + Enable/Disable Security Posture API features + for the cluster. desired_enable_fqdn_network_policy (bool): Enable/Disable FQDN Network Policy for the cluster. This field is a member of `oneof`_ ``_desired_enable_fqdn_network_policy``. + desired_autopilot_workload_policy_config (google.cloud.container_v1beta1.types.WorkloadPolicyConfig): + The desired workload policy configuration for + the autopilot cluster. desired_k8s_beta_apis (google.cloud.container_v1beta1.types.K8sBetaAPIConfig): Beta APIs enabled for cluster. """ @@ -3866,11 +3953,21 @@ class ClusterUpdate(proto.Message): number=122, message="K8sBetaAPIConfig", ) + desired_security_posture_config: "SecurityPostureConfig" = proto.Field( + proto.MESSAGE, + number=124, + message="SecurityPostureConfig", + ) desired_enable_fqdn_network_policy: bool = proto.Field( proto.BOOL, number=126, optional=True, ) + desired_autopilot_workload_policy_config: "WorkloadPolicyConfig" = proto.Field( + proto.MESSAGE, + number=128, + message="WorkloadPolicyConfig", + ) desired_k8s_beta_apis: "K8sBetaAPIConfig" = proto.Field( proto.MESSAGE, number=131, @@ -7273,6 +7370,11 @@ class AcceleratorConfig(proto.Message): The configuration for GPU sharing options. This field is a member of `oneof`_ ``_gpu_sharing_config``. + gpu_driver_installation_config (google.cloud.container_v1beta1.types.GPUDriverInstallationConfig): + The configuration for auto installation of + GPU driver. + + This field is a member of `oneof`_ ``_gpu_driver_installation_config``. """ accelerator_count: int = proto.Field( @@ -7297,6 +7399,12 @@ class AcceleratorConfig(proto.Message): optional=True, message="GPUSharingConfig", ) + gpu_driver_installation_config: "GPUDriverInstallationConfig" = proto.Field( + proto.MESSAGE, + number=6, + optional=True, + message="GPUDriverInstallationConfig", + ) class GPUSharingConfig(proto.Message): @@ -7341,6 +7449,48 @@ class GPUSharingStrategy(proto.Enum): ) +class GPUDriverInstallationConfig(proto.Message): + r"""GPUDriverInstallationConfig specifies the version of GPU + driver to be auto installed. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + gpu_driver_version (google.cloud.container_v1beta1.types.GPUDriverInstallationConfig.GPUDriverVersion): + Mode for how the GPU driver is installed. + + This field is a member of `oneof`_ ``_gpu_driver_version``. + """ + + class GPUDriverVersion(proto.Enum): + r"""The GPU driver version to install. + + Values: + GPU_DRIVER_VERSION_UNSPECIFIED (0): + Default value is to not install any GPU + driver. + INSTALLATION_DISABLED (1): + Disable GPU driver auto installation and + needs manual installation + DEFAULT (2): + "Default" GPU driver in COS and Ubuntu. + LATEST (3): + "Latest" GPU driver in COS. + """ + GPU_DRIVER_VERSION_UNSPECIFIED = 0 + INSTALLATION_DISABLED = 1 + DEFAULT = 2 + LATEST = 3 + + gpu_driver_version: GPUDriverVersion = proto.Field( + proto.ENUM, + number=1, + optional=True, + enum=GPUDriverVersion, + ) + + class ManagedPrometheusConfig(proto.Message): r"""ManagedPrometheusConfig defines the configuration for Google Cloud Managed Service for Prometheus. @@ -8826,12 +8976,40 @@ class Autopilot(proto.Message): Attributes: enabled (bool): Enable Autopilot + workload_policy_config (google.cloud.container_v1beta1.types.WorkloadPolicyConfig): + Workload policy configuration for Autopilot. """ enabled: bool = proto.Field( proto.BOOL, number=1, ) + workload_policy_config: "WorkloadPolicyConfig" = proto.Field( + proto.MESSAGE, + number=2, + message="WorkloadPolicyConfig", + ) + + +class WorkloadPolicyConfig(proto.Message): + r"""WorkloadPolicyConfig is the configuration of workload policy + for autopilot clusters. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + allow_net_admin (bool): + If true, workloads can use NET_ADMIN capability. + + This field is a member of `oneof`_ ``_allow_net_admin``. + """ + + allow_net_admin: bool = proto.Field( + proto.BOOL, + number=1, + optional=True, + ) class NotificationConfig(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 7f5cc056..477de1ee 100644 --- a/samples/generated_samples/snippet_metadata_google.container.v1.json +++ b/samples/generated_samples/snippet_metadata_google.container.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-container", - "version": "2.23.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 72d9ce16..afdb562b 100644 --- a/samples/generated_samples/snippet_metadata_google.container.v1beta1.json +++ b/samples/generated_samples/snippet_metadata_google.container.v1beta1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-container", - "version": "2.23.0" + "version": "0.1.0" }, "snippets": [ { From 565cd87e0d63cce092df2711c64d88636f54bd9e Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 13 Jun 2023 10:52:56 -0400 Subject: [PATCH 2/2] chore(main): release 2.24.0 (#378) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- .release-please-manifest.json | 2 +- CHANGELOG.md | 9 +++++++++ google/cloud/container/gapic_version.py | 2 +- google/cloud/container_v1/gapic_version.py | 2 +- google/cloud/container_v1beta1/gapic_version.py | 2 +- .../snippet_metadata_google.container.v1.json | 2 +- .../snippet_metadata_google.container.v1beta1.json | 2 +- 7 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 20929136..50b9d4d8 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "2.23.0" + ".": "2.24.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index db820757..215aa885 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,15 @@ [1]: https://pypi.org/project/google-cloud-container/#history +## [2.24.0](https://github.com/googleapis/python-container/compare/v2.23.0...v2.24.0) (2023-06-13) + + +### Features + +* Add API for GPU driver installation config ([d6da309](https://github.com/googleapis/python-container/commit/d6da30922e76d8c56b8ec3c78b0cb8ffbb5bd82a)) +* Add SecurityPostureConfig API field to allow customers to enable GKE Security Posture capabilities for their clusters ([d6da309](https://github.com/googleapis/python-container/commit/d6da30922e76d8c56b8ec3c78b0cb8ffbb5bd82a)) +* Add workloadPolicyConfig API field to allow customer enable NET_ADMIN capability for their autopilot clusters ([d6da309](https://github.com/googleapis/python-container/commit/d6da30922e76d8c56b8ec3c78b0cb8ffbb5bd82a)) + ## [2.23.0](https://github.com/googleapis/python-container/compare/v2.22.0...v2.23.0) (2023-06-06) diff --git a/google/cloud/container/gapic_version.py b/google/cloud/container/gapic_version.py index f01e1d3a..07de09d5 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.23.0" # {x-release-please-version} +__version__ = "2.24.0" # {x-release-please-version} diff --git a/google/cloud/container_v1/gapic_version.py b/google/cloud/container_v1/gapic_version.py index f01e1d3a..07de09d5 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.23.0" # {x-release-please-version} +__version__ = "2.24.0" # {x-release-please-version} diff --git a/google/cloud/container_v1beta1/gapic_version.py b/google/cloud/container_v1beta1/gapic_version.py index f01e1d3a..07de09d5 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.23.0" # {x-release-please-version} +__version__ = "2.24.0" # {x-release-please-version} diff --git a/samples/generated_samples/snippet_metadata_google.container.v1.json b/samples/generated_samples/snippet_metadata_google.container.v1.json index 477de1ee..c4da21a4 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.24.0" }, "snippets": [ { diff --git a/samples/generated_samples/snippet_metadata_google.container.v1beta1.json b/samples/generated_samples/snippet_metadata_google.container.v1beta1.json index afdb562b..b536c7a7 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.24.0" }, "snippets": [ {