From 773fbad57bc9c5e13bb5a1e4f8edfd5e4414da27 Mon Sep 17 00:00:00 2001 From: Lily Pan Date: Thu, 11 Dec 2025 16:20:53 -0800 Subject: [PATCH 01/13] add gpu_driver option to nodepool update --- src/aks-preview/azext_aks_preview/_params.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/aks-preview/azext_aks_preview/_params.py b/src/aks-preview/azext_aks_preview/_params.py index 9ec06ac7934..74d06f533c0 100644 --- a/src/aks-preview/azext_aks_preview/_params.py +++ b/src/aks-preview/azext_aks_preview/_params.py @@ -2129,6 +2129,10 @@ def load_arguments(self, _): options_list=["--node-vm-size", "-s"], completer=get_vm_size_completion_list, ) + c.argument( + "gpu_driver", + arg_type=get_enum_type(gpu_driver_install_modes) + ) with self.argument_context("aks nodepool upgrade") as c: # upgrade strategy From 4d8b4fc1dc8e7f8a12ffc4e0434c34e0deabdcd9 Mon Sep 17 00:00:00 2001 From: Lily Pan Date: Thu, 11 Dec 2025 16:42:33 -0800 Subject: [PATCH 02/13] update HISTORY.rst --- src/aks-preview/HISTORY.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/aks-preview/HISTORY.rst b/src/aks-preview/HISTORY.rst index 765cc13f063..baf0df95b0c 100644 --- a/src/aks-preview/HISTORY.rst +++ b/src/aks-preview/HISTORY.rst @@ -12,6 +12,10 @@ To release a new version, please select a new version number (usually plus 1 to Pending +++++++ +19.0.0b19 ++++++++ +* Add option `--gpu-driver` to `az aks nodepool update` to select skipping GPU driver installation. + 19.0.0b18 +++++++ * Vendor new SDK and bump API version to 2025-10-02-preview. From e6797e85a617ed4da6c1ec75f6dec54d876e4a9f Mon Sep 17 00:00:00 2001 From: Lily Pan Date: Fri, 12 Dec 2025 14:37:00 -0800 Subject: [PATCH 03/13] add gpu_driver to agent update decorator --- src/aks-preview/azext_aks_preview/custom.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/aks-preview/azext_aks_preview/custom.py b/src/aks-preview/azext_aks_preview/custom.py index 370877a15f0..d372b152ab1 100644 --- a/src/aks-preview/azext_aks_preview/custom.py +++ b/src/aks-preview/azext_aks_preview/custom.py @@ -1977,6 +1977,7 @@ def aks_agentpool_update( # local DNS localdns_config=None, node_vm_size=None, + gpu_driver=None, ): # DO NOT MOVE: get all the original parameters and save them as a dictionary raw_parameters = locals() From a98f57c304f80ea068b410c6102283535cc2b802 Mon Sep 17 00:00:00 2001 From: Lily Pan Date: Mon, 15 Dec 2025 11:45:53 -0800 Subject: [PATCH 04/13] update help.py --- src/aks-preview/azext_aks_preview/_help.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/aks-preview/azext_aks_preview/_help.py b/src/aks-preview/azext_aks_preview/_help.py index 2165723448c..96952fc8447 100644 --- a/src/aks-preview/azext_aks_preview/_help.py +++ b/src/aks-preview/azext_aks_preview/_help.py @@ -2427,6 +2427,9 @@ - name: --final-soak-duration type: int short-summary: Wait time (in minutes) after all old nodes are drained before removing them. Default is 60 minutes. Only for blue-green upgrades. + - name: --gpu-driver + type: string + short-summary: Whether to install driver for GPU node pool. Possible values are "Install" or "None". examples: - name: Reconcile the nodepool back to its current state. text: az aks nodepool update -g MyResourceGroup -n nodepool1 --cluster-name MyManagedCluster From 5c424069431c2abbd2b6be7682cd98a631039796 Mon Sep 17 00:00:00 2001 From: Lily Pan Date: Mon, 15 Dec 2025 18:30:43 -0800 Subject: [PATCH 05/13] update agentpool update decorator and add tests --- .../azext_aks_preview/agentpool_decorator.py | 13 +++++++++ .../tests/latest/test_agentpool_decorator.py | 28 +++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/src/aks-preview/azext_aks_preview/agentpool_decorator.py b/src/aks-preview/azext_aks_preview/agentpool_decorator.py index 8d6923da2ff..99d298b4ea0 100644 --- a/src/aks-preview/azext_aks_preview/agentpool_decorator.py +++ b/src/aks-preview/azext_aks_preview/agentpool_decorator.py @@ -1644,6 +1644,16 @@ def update_network_profile(self, agentpool: AgentPool) -> AgentPool: agentpool.network_profile.allowed_host_ports = allowed_host_ports return agentpool + def update_gpu_profile(self, agentpool: AgentPool) -> AgentPool: + self._ensure_agentpool(agentpool) + + gpu_driver = self.context.get_gpu_driver() + if gpu_driver is not None: + if agentpool.gpu_profile is None: + agentpool.gpu_profile = self.models.GPUProfile() + agentpool.gpu_profile.driver = gpu_driver + return agentpool + def update_artifact_streaming(self, agentpool: AgentPool) -> AgentPool: """Update artifact streaming property for the AgentPool object. :return: the AgentPool object @@ -1807,6 +1817,9 @@ def update_agentpool_profile_preview(self, agentpools: List[AgentPool] = None) - # update blue-green upgrade settings agentpool = self.update_blue_green_upgrade_settings(agentpool) + # update gpu profile + agentpool = self.update_gpu_profile(agentpool) + return agentpool def update_auto_scaler_properties(self, agentpool: AgentPool) -> AgentPool: diff --git a/src/aks-preview/azext_aks_preview/tests/latest/test_agentpool_decorator.py b/src/aks-preview/azext_aks_preview/tests/latest/test_agentpool_decorator.py index 8e69c594981..f3ef68aa7dd 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/test_agentpool_decorator.py +++ b/src/aks-preview/azext_aks_preview/tests/latest/test_agentpool_decorator.py @@ -2660,6 +2660,31 @@ def common_update_localdns_profile(self): finally: os.unlink(config_file_path) + def common_update_gpu_profile(self): + dec_1 = AKSPreviewAgentPoolUpdateDecorator( + self.cmd, + self.client, + {"gpu_driver": "None"}, + self.resource_type, + self.agentpool_decorator_mode, + ) + # fail on passing the wrong agentpool object + with self.assertRaises(CLIInternalError): + dec_1.set_up_gpu_profile(None) + agentpool_1 = self.create_initialized_agentpool_instance( + gpu_profile=self.models.GPUProfile( + driver="Install", + ) + ) + dec_1.context.attach_agentpool(agentpool_1) + dec_agentpool_1 = dec_1.update_gpu_profile(agentpool_1) + ground_truth_agentpool_1 = self.create_initialized_agentpool_instance( + gpu_profile=self.models.GPUProfile( + driver="None", + ) + ) + self.assertEqual(dec_agentpool_1, ground_truth_agentpool_1) + def common_test_process_dns_overrides_helper(self): from azext_aks_preview._helpers import process_dns_overrides @@ -2744,6 +2769,9 @@ def test_update_blue_green_upgrade_settings(self): def test_update_localdns_profile(self): self.common_update_localdns_profile() + def test_update_gpu_profile(self): + self.common_update_gpu_profile() + def test_process_dns_overrides_helper(self): self.common_test_process_dns_overrides_helper() From 180618f6c85bf79855472105fc22b2cb844c9cc8 Mon Sep 17 00:00:00 2001 From: Lily Pan Date: Mon, 15 Dec 2025 19:07:13 -0800 Subject: [PATCH 06/13] fix test --- .../azext_aks_preview/tests/latest/test_agentpool_decorator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/aks-preview/azext_aks_preview/tests/latest/test_agentpool_decorator.py b/src/aks-preview/azext_aks_preview/tests/latest/test_agentpool_decorator.py index f3ef68aa7dd..81ea9fe74cf 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/test_agentpool_decorator.py +++ b/src/aks-preview/azext_aks_preview/tests/latest/test_agentpool_decorator.py @@ -2670,7 +2670,7 @@ def common_update_gpu_profile(self): ) # fail on passing the wrong agentpool object with self.assertRaises(CLIInternalError): - dec_1.set_up_gpu_profile(None) + dec_1.update_gpu_profile(None) agentpool_1 = self.create_initialized_agentpool_instance( gpu_profile=self.models.GPUProfile( driver="Install", From 7973fe23dbefc325dfe4276634b60223377de626 Mon Sep 17 00:00:00 2001 From: Lily Pan Date: Wed, 17 Dec 2025 15:09:37 -0800 Subject: [PATCH 07/13] fix update_gpu_profile --- src/aks-preview/azext_aks_preview/agentpool_decorator.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/aks-preview/azext_aks_preview/agentpool_decorator.py b/src/aks-preview/azext_aks_preview/agentpool_decorator.py index 99d298b4ea0..66136b65be5 100644 --- a/src/aks-preview/azext_aks_preview/agentpool_decorator.py +++ b/src/aks-preview/azext_aks_preview/agentpool_decorator.py @@ -1648,9 +1648,10 @@ def update_gpu_profile(self, agentpool: AgentPool) -> AgentPool: self._ensure_agentpool(agentpool) gpu_driver = self.context.get_gpu_driver() + driver_type = self.context.get_driver_type() + if not agentpool.gpu_profile and (gpu_driver or driver_type): + agentpool.gpu_profile = self.models.GPUProfile() if gpu_driver is not None: - if agentpool.gpu_profile is None: - agentpool.gpu_profile = self.models.GPUProfile() agentpool.gpu_profile.driver = gpu_driver return agentpool From 3c3b9e7e9fa4b195a97e23adb847a318a7736e5f Mon Sep 17 00:00:00 2001 From: Lily Pan Date: Wed, 17 Dec 2025 16:56:10 -0800 Subject: [PATCH 08/13] update test_update_agentpool_profile_preview.py --- .../latest/test_update_agentpool_profile_preview.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/aks-preview/azext_aks_preview/tests/latest/test_update_agentpool_profile_preview.py b/src/aks-preview/azext_aks_preview/tests/latest/test_update_agentpool_profile_preview.py index 3efb5b3be74..1f9ddd35e72 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/test_update_agentpool_profile_preview.py +++ b/src/aks-preview/azext_aks_preview/tests/latest/test_update_agentpool_profile_preview.py @@ -132,6 +132,7 @@ def test_update_agentpool_profile_preview_default_behavior(self): decorator.update_auto_scaler_properties_vms = Mock(return_value=agentpool) decorator.update_upgrade_strategy = Mock(return_value=agentpool) decorator.update_blue_green_upgrade_settings = Mock(return_value=agentpool) + decorator.update_gpu_profile = Mock(return_value=agentpool) # Act result = decorator.update_agentpool_profile_preview() @@ -154,6 +155,7 @@ def test_update_agentpool_profile_preview_default_behavior(self): decorator.update_auto_scaler_properties_vms.assert_called_once_with(agentpool) decorator.update_upgrade_strategy.assert_called_once_with(agentpool) decorator.update_blue_green_upgrade_settings.assert_called_once_with(agentpool) + decorator.update_gpu_profile.assert_called_once_with(agentpool) def test_update_agentpool_profile_preview_with_agentpools_parameter(self): """Test update_agentpool_profile_preview with agentpools parameter.""" @@ -194,6 +196,7 @@ def test_update_agentpool_profile_preview_with_agentpools_parameter(self): decorator.update_auto_scaler_properties_vms = Mock(return_value=agentpool) decorator.update_upgrade_strategy = Mock(return_value=agentpool) decorator.update_blue_green_upgrade_settings = Mock(return_value=agentpool) + decorator.update_gpu_profile = Mock(return_value=agentpool) # Act result = decorator.update_agentpool_profile_preview(agentpools) @@ -244,6 +247,7 @@ def test_update_agentpool_profile_preview_managed_system_mode(self): decorator.update_auto_scaler_properties_vms = Mock() decorator.update_upgrade_strategy = Mock() decorator.update_blue_green_upgrade_settings = Mock() + decorator.update_gpu_profile = Mock() # Act result = decorator.update_agentpool_profile_preview() @@ -272,6 +276,7 @@ def test_update_agentpool_profile_preview_managed_system_mode(self): decorator.update_auto_scaler_properties_vms.assert_not_called() decorator.update_upgrade_strategy.assert_not_called() decorator.update_blue_green_upgrade_settings.assert_not_called() + decorator.update_gpu_profile.assert_not_called() def test_update_agentpool_profile_preview_managed_system_mode_with_agentpools(self): """Test update_agentpool_profile_preview with ManagedSystem mode and agentpools parameter.""" @@ -349,6 +354,7 @@ def test_update_agentpool_profile_preview_system_mode_regular_flow(self): decorator.update_auto_scaler_properties_vms = Mock(return_value=agentpool) decorator.update_upgrade_strategy = Mock(return_value=agentpool) decorator.update_blue_green_upgrade_settings = Mock(return_value=agentpool) + decorator.update_gpu_profile = Mock(return_value=agentpool) # Act result = decorator.update_agentpool_profile_preview() @@ -369,6 +375,7 @@ def test_update_agentpool_profile_preview_system_mode_regular_flow(self): decorator.update_auto_scaler_properties_vms.assert_called_once_with(agentpool) decorator.update_upgrade_strategy.assert_called_once_with(agentpool) decorator.update_blue_green_upgrade_settings.assert_called_once_with(agentpool) + decorator.update_gpu_profile.assert_called_once_with(agentpool) def test_update_agentpool_profile_preview_execution_order(self): """Test that update methods are called in the correct order.""" @@ -414,6 +421,7 @@ def mock_method(pool): decorator.update_auto_scaler_properties_vms = create_mock_update_method("update_auto_scaler_properties_vms") decorator.update_upgrade_strategy = create_mock_update_method("update_upgrade_strategy") decorator.update_blue_green_upgrade_settings = create_mock_update_method("update_blue_green_upgrade_settings") + decorator.update_gpu_profile = create_mock_update_method("update_gpu_profile") # Act decorator.update_agentpool_profile_preview() @@ -431,6 +439,7 @@ def mock_method(pool): "update_auto_scaler_properties_vms", "update_upgrade_strategy", "update_blue_green_upgrade_settings" + "update_gpu_profile", ] self.assertEqual(call_order, expected_order) @@ -478,6 +487,7 @@ def track_and_return(pool): decorator.update_auto_scaler_properties_vms = create_tracking_mock("update_auto_scaler_properties_vms") decorator.update_upgrade_strategy = create_tracking_mock("update_upgrade_strategy") decorator.update_blue_green_upgrade_settings = create_tracking_mock("update_blue_green_upgrade_settings") + decorator.update_gpu_profile = create_tracking_mock("update_gpu_profile") # Act result = decorator.update_agentpool_profile_preview() From 150c7837f1da0c4ca426c7902380ebaf475e1be2 Mon Sep 17 00:00:00 2001 From: Lily Pan Date: Thu, 18 Dec 2025 10:25:58 -0800 Subject: [PATCH 09/13] add missing test_update_agentpool_profile_preview.py --- .../azext_aks_preview/tests/latest/test_agentpool_decorator.py | 3 +++ .../tests/latest/test_update_agentpool_profile_preview.py | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/aks-preview/azext_aks_preview/tests/latest/test_agentpool_decorator.py b/src/aks-preview/azext_aks_preview/tests/latest/test_agentpool_decorator.py index 81ea9fe74cf..cea4cac2758 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/test_agentpool_decorator.py +++ b/src/aks-preview/azext_aks_preview/tests/latest/test_agentpool_decorator.py @@ -2865,6 +2865,9 @@ def test_update_localdns_profile(self): def test_process_dns_overrides_helper(self): self.common_test_process_dns_overrides_helper() + def test_update_gpu_profile(self): + self.common_update_gpu_profile() + def test_update_agentpool_profile_preview(self): import inspect diff --git a/src/aks-preview/azext_aks_preview/tests/latest/test_update_agentpool_profile_preview.py b/src/aks-preview/azext_aks_preview/tests/latest/test_update_agentpool_profile_preview.py index 1f9ddd35e72..82cff56bb06 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/test_update_agentpool_profile_preview.py +++ b/src/aks-preview/azext_aks_preview/tests/latest/test_update_agentpool_profile_preview.py @@ -550,7 +550,7 @@ def test_update_agentpool_profile_preview_mixed_modes_scenario(self): 'update_network_profile', 'update_artifact_streaming', 'update_secure_boot', 'update_vtpm', 'update_os_sku', 'update_fips_image', 'update_ssh_access', 'update_localdns_profile', 'update_auto_scaler_properties_vms', - 'update_upgrade_strategy', 'update_blue_green_upgrade_settings' + 'update_upgrade_strategy', 'update_blue_green_upgrade_settings', 'update_gpu_profile' ] for method_name in update_methods: @@ -622,6 +622,7 @@ def test_update_agentpool_profile_preview_managed_cluster_mode(self): decorator.update_auto_scaler_properties_vms = Mock(return_value=agentpool) decorator.update_upgrade_strategy = Mock(return_value=agentpool) decorator.update_blue_green_upgrade_settings = Mock(return_value=agentpool) + decorator.update_gpu_profile = Mock(return_value=agentpool) # Act result = decorator.update_agentpool_profile_preview(agentpools) From 9b9b8a7badb11b69fc00febe00cff2e2115aa186 Mon Sep 17 00:00:00 2001 From: Lily Pan Date: Thu, 18 Dec 2025 14:24:32 -0800 Subject: [PATCH 10/13] fix syntax err --- .../tests/latest/test_update_agentpool_profile_preview.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/aks-preview/azext_aks_preview/tests/latest/test_update_agentpool_profile_preview.py b/src/aks-preview/azext_aks_preview/tests/latest/test_update_agentpool_profile_preview.py index 82cff56bb06..7df5619d3ac 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/test_update_agentpool_profile_preview.py +++ b/src/aks-preview/azext_aks_preview/tests/latest/test_update_agentpool_profile_preview.py @@ -438,7 +438,7 @@ def mock_method(pool): "update_localdns_profile", "update_auto_scaler_properties_vms", "update_upgrade_strategy", - "update_blue_green_upgrade_settings" + "update_blue_green_upgrade_settings", "update_gpu_profile", ] self.assertEqual(call_order, expected_order) From 1960c142819daa6415fdf7493a20cb6dcf47f052 Mon Sep 17 00:00:00 2001 From: Lily Pan Date: Thu, 18 Dec 2025 15:22:07 -0800 Subject: [PATCH 11/13] update version in setup.py --- src/aks-preview/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/aks-preview/setup.py b/src/aks-preview/setup.py index 67b4629cef2..eab3d3f26c7 100644 --- a/src/aks-preview/setup.py +++ b/src/aks-preview/setup.py @@ -9,7 +9,7 @@ from setuptools import find_packages, setup -VERSION = "19.0.0b17" +VERSION = "19.0.0b19" CLASSIFIERS = [ "Development Status :: 4 - Beta", From 124d4f56488b8034fc3d4d050bbd2099b4c8146b Mon Sep 17 00:00:00 2001 From: FumingZhang <81607949+FumingZhang@users.noreply.github.com> Date: Fri, 19 Dec 2025 10:34:43 +1100 Subject: [PATCH 12/13] Update src/aks-preview/HISTORY.rst --- src/aks-preview/HISTORY.rst | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/aks-preview/HISTORY.rst b/src/aks-preview/HISTORY.rst index baf0df95b0c..d235f099d53 100644 --- a/src/aks-preview/HISTORY.rst +++ b/src/aks-preview/HISTORY.rst @@ -12,13 +12,10 @@ To release a new version, please select a new version number (usually plus 1 to Pending +++++++ -19.0.0b19 -+++++++ -* Add option `--gpu-driver` to `az aks nodepool update` to select skipping GPU driver installation. - 19.0.0b18 +++++++ * Vendor new SDK and bump API version to 2025-10-02-preview. +* Add option `--gpu-driver` to `az aks nodepool update` to select skipping GPU driver installation. 19.0.0b17 +++++++ From 0a26a488aa2889ab6e3d361342fb86fbd0d845ab Mon Sep 17 00:00:00 2001 From: FumingZhang <81607949+FumingZhang@users.noreply.github.com> Date: Fri, 19 Dec 2025 10:34:59 +1100 Subject: [PATCH 13/13] Update src/aks-preview/setup.py --- src/aks-preview/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/aks-preview/setup.py b/src/aks-preview/setup.py index eab3d3f26c7..f2bf39f1032 100644 --- a/src/aks-preview/setup.py +++ b/src/aks-preview/setup.py @@ -9,7 +9,7 @@ from setuptools import find_packages, setup -VERSION = "19.0.0b19" +VERSION = "19.0.0b18" CLASSIFIERS = [ "Development Status :: 4 - Beta",