Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/aks-preview/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ To release a new version, please select a new version number (usually plus 1 to
Pending
+++++++

18.0.0b2
+++++++
* Vendor new SDK and bump API version to 2025-03-02-preview.

18.0.0b1
+++++++
* [BREAKING CHANGE] Remove `--enable-pod-security-policy` and `--disable-pod-security-policy` as it's deprecated.
Expand Down
7 changes: 5 additions & 2 deletions src/aks-preview/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,9 @@ Released version and adopted API version
* - 14.0.0b1 ~ 14.0.0b3
- 2025-01-02-preview
-
* - 14.0.0b4 ~ latest
* - 14.0.0b4 ~ 18.0.0b1
- 2025-02-02-preview
-
-
* - 18.0.0b2 ~ latest
- 2025-03-02-preview
-
2 changes: 1 addition & 1 deletion src/aks-preview/azext_aks_preview/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def register_aks_preview_resource_type():
register_resource_type(
"latest",
CUSTOM_MGMT_AKS_PREVIEW,
SDKProfile("2025-02-02-preview", {"container_services": "2017-07-01"}),
SDKProfile("2025-03-02-preview", {"container_services": "2017-07-01"}),
)


Expand Down
4 changes: 4 additions & 0 deletions src/aks-preview/azext_aks_preview/_consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@
CONST_GPU_INSTANCE_PROFILE_MIG4_G = "MIG4g"
CONST_GPU_INSTANCE_PROFILE_MIG7_G = "MIG7g"

# gpu driver install
CONST_GPU_DRIVER_INSTALL = "Install"
CONST_GPU_DRIVER_NONE = "None"

# consts for ManagedCluster
# load balancer sku
CONST_LOAD_BALANCER_SKU_BASIC = "basic"
Expand Down
3 changes: 3 additions & 0 deletions src/aks-preview/azext_aks_preview/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -1833,6 +1833,9 @@
- name: --skip-gpu-driver-install
type: bool
short-summary: To skip GPU driver auto installation by AKS on a nodepool using GPU vm size if customers want to manage GPU driver installation by their own. If not specified, the default is false.
- name: --gpu-driver
type: string
short-summary: Whether to install driver for GPU node pool. Possible values are "Install" or "None". Default is "Install".
- name: --driver-type
type: string
short-summary: Specify the type of GPU driver to install when creating Windows agent pools. Valid values are "GRID" and "CUDA". If not provided, AKS selects the driver based on system compatibility. This option cannot be changed once the AgentPool has been created. The default is system selected.
Expand Down
21 changes: 20 additions & 1 deletion src/aks-preview/azext_aks_preview/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
CONST_DAILY_MAINTENANCE_SCHEDULE,
CONST_DISK_DRIVER_V1,
CONST_DISK_DRIVER_V2,
CONST_GPU_DRIVER_INSTALL,
CONST_GPU_DRIVER_NONE,
CONST_GPU_INSTANCE_PROFILE_MIG1_G,
CONST_GPU_INSTANCE_PROFILE_MIG2_G,
CONST_GPU_INSTANCE_PROFILE_MIG3_G,
Expand Down Expand Up @@ -267,6 +269,10 @@
CONST_GPU_INSTANCE_PROFILE_MIG4_G,
CONST_GPU_INSTANCE_PROFILE_MIG7_G,
]
gpu_driver_install_modes = [
CONST_GPU_DRIVER_INSTALL,
CONST_GPU_DRIVER_NONE
]
pod_ip_allocation_modes = [
CONST_NETWORK_POD_IP_ALLOCATION_MODE_DYNAMIC_INDIVIDUAL,
CONST_NETWORK_POD_IP_ALLOCATION_MODE_STATIC_BLOCK,
Expand Down Expand Up @@ -1557,7 +1563,20 @@ def load_arguments(self, _):
validator=validate_node_public_ip_tags,
help="space-separated tags: key[=value] [key[=value] ...].",
)
c.argument('skip_gpu_driver_install', action='store_true', is_preview=True)
c.argument(
"skip_gpu_driver_install",
action="store_true",
is_preview=True,
deprecate_info=c.deprecate(
target="--skip-gpu-driver-install",
redirect="--gpu-driver",
hide=True
)
)
c.argument(
"gpu_driver",
arg_type=get_enum_type(gpu_driver_install_modes)
)
c.argument(
"driver_type",
arg_type=get_enum_type(gpu_driver_types),
Expand Down
54 changes: 49 additions & 5 deletions src/aks-preview/azext_aks_preview/agentpool_decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
CONST_DEFAULT_VMS_VM_SIZE,
CONST_DEFAULT_WINDOWS_VMS_VM_SIZE,
CONST_SSH_ACCESS_LOCALUSER,
CONST_GPU_DRIVER_NONE,
)
from azext_aks_preview._helpers import (
get_nodepool_snapshot_by_snapshot_id,
Expand Down Expand Up @@ -603,12 +604,42 @@ def get_skip_gpu_driver_install(self) -> bool:
if (
self.agentpool and
self.agentpool.gpu_profile is not None and
self.agentpool.gpu_profile.install_gpu_driver is not None
self.agentpool.gpu_profile.driver is not None and
self.agentpool.gpu_profile.driver.lower() == CONST_GPU_DRIVER_NONE.lower()
):
skip_gpu_driver_install = not self.agentpool.gpu_profile.install_gpu_driver
skip_gpu_driver_install = True

return skip_gpu_driver_install

def _get_gpu_driver(self) -> Union[str, None]:
"""Obtain the value of gpu_driver.

:return: string
"""
# read the original value passed by the command
gpu_driver = self.raw_param.get("gpu_driver")

# In create mode, try to read the property value corresponding to the parameter from the `agentpool` object
if self.decorator_mode == DecoratorMode.CREATE:
if (
self.agentpool and
hasattr(self.agentpool, "gpu_profile") and # backward compatibility
self.agentpool.gpu_profile and
self.agentpool.gpu_profile.driver is not None
):
gpu_driver = self.agentpool.gpu_profile.driver

# this parameter does not need dynamic completion
# this parameter does not need validation
return gpu_driver

def get_gpu_driver(self) -> Union[str, None]:
"""Obtain the value of gpu_driver.

:return: string or None
"""
return self._get_gpu_driver()

def get_driver_type(self) -> Union[str, None]:
"""Obtain the value of driver_type.
:return: str or None
Expand Down Expand Up @@ -919,8 +950,19 @@ def set_up_skip_gpu_driver_install(self, agentpool: AgentPool) -> AgentPool:

if self.context.get_skip_gpu_driver_install():
if agentpool.gpu_profile is None:
agentpool.gpu_profile = self.models.AgentPoolGPUProfile() # pylint: disable=no-member
agentpool.gpu_profile.install_gpu_driver = False
agentpool.gpu_profile = self.models.GPUProfile() # pylint: disable=no-member
agentpool.gpu_profile.driver = CONST_GPU_DRIVER_NONE
return agentpool

def set_up_gpu_profile(self, agentpool: AgentPool) -> AgentPool:
"""Set up gpu profile for the AgentPool object."""
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 set_up_driver_type(self, agentpool: AgentPool) -> AgentPool:
Expand All @@ -930,7 +972,7 @@ def set_up_driver_type(self, agentpool: AgentPool) -> AgentPool:
driver_type = self.context.get_driver_type()
if driver_type is not None:
if agentpool.gpu_profile is None:
agentpool.gpu_profile = self.models.AgentPoolGPUProfile() # pylint: disable=no-member
agentpool.gpu_profile = self.models.GPUProfile() # pylint: disable=no-member
agentpool.gpu_profile.driver_type = driver_type
return agentpool

Expand Down Expand Up @@ -1037,6 +1079,8 @@ def construct_agentpool_profile_preview(self) -> AgentPool:
agentpool = self.set_up_artifact_streaming(agentpool)
# set up skip_gpu_driver_install
agentpool = self.set_up_skip_gpu_driver_install(agentpool)
# set up gpu profile
agentpool = self.set_up_gpu_profile(agentpool)
# set up driver_type
agentpool = self.set_up_driver_type(agentpool)
# set up agentpool ssh access
Expand Down
1 change: 1 addition & 0 deletions src/aks-preview/azext_aks_preview/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -1218,6 +1218,7 @@ def aks_agentpool_add(
node_public_ip_tags=None,
enable_artifact_streaming=False,
skip_gpu_driver_install=False,
gpu_driver=None,
driver_type=None,
ssh_access=CONST_SSH_ACCESS_LOCALUSER,
# trusted launch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ interactions:
- AZURECLI/2.53.0 azsdk-python-azure-mgmt-containerservice/28.0.0b Python/3.8.10
(Linux-5.15.0-1051-azure-x86_64-with-glibc2.29)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2025-02-02-preview
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2025-03-02-preview
response:
body:
string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.ContainerService/managedClusters/cliakstest000002''
Expand Down Expand Up @@ -119,7 +119,7 @@ interactions:
- AZURECLI/2.53.0 azsdk-python-azure-mgmt-containerservice/28.0.0b Python/3.8.10
(Linux-5.15.0-1051-azure-x86_64-with-glibc2.29)
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2025-02-02-preview
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2025-03-02-preview
response:
body:
string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n
Expand Down Expand Up @@ -211,7 +211,7 @@ interactions:
- AZURECLI/2.53.0 azsdk-python-azure-mgmt-containerservice/28.0.0b Python/3.8.10
(Linux-5.15.0-1051-azure-x86_64-with-glibc2.29)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2025-02-02-preview
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2025-03-02-preview
response:
body:
string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n
Expand Down Expand Up @@ -301,7 +301,7 @@ interactions:
- AZURECLI/2.53.0 azsdk-python-azure-mgmt-containerservice/28.0.0b Python/3.8.10
(Linux-5.15.0-1051-azure-x86_64-with-glibc2.29)
method: POST
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedclusters/cliakstest000002/abort?api-version=2025-02-02-preview
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedclusters/cliakstest000002/abort?api-version=2025-03-02-preview
response:
body:
string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n
Expand Down Expand Up @@ -529,7 +529,7 @@ interactions:
- AZURECLI/2.53.0 azsdk-python-azure-mgmt-containerservice/28.0.0b Python/3.8.10
(Linux-5.15.0-1051-azure-x86_64-with-glibc2.29)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2025-02-02-preview
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2025-03-02-preview
response:
body:
string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ interactions:
- AZURECLI/2.53.0 azsdk-python-azure-mgmt-containerservice/28.0.0b Python/3.8.10
(Linux-5.15.0-1051-azure-x86_64-with-glibc2.29)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2025-02-02-preview
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2025-03-02-preview
response:
body:
string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.ContainerService/managedClusters/cliakstest000002''
Expand Down Expand Up @@ -120,7 +120,7 @@ interactions:
- AZURECLI/2.53.0 azsdk-python-azure-mgmt-containerservice/28.0.0b Python/3.8.10
(Linux-5.15.0-1051-azure-x86_64-with-glibc2.29)
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2025-02-02-preview
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2025-03-02-preview
response:
body:
string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n
Expand Down Expand Up @@ -905,7 +905,7 @@ interactions:
- AZURECLI/2.53.0 azsdk-python-azure-mgmt-containerservice/28.0.0b Python/3.8.10
(Linux-5.15.0-1051-azure-x86_64-with-glibc2.29)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2025-02-02-preview
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2025-03-02-preview
response:
body:
string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n
Expand Down Expand Up @@ -1004,7 +1004,7 @@ interactions:
- AZURECLI/2.53.0 azsdk-python-azure-mgmt-containerservice/28.0.0b Python/3.8.10
(Linux-5.15.0-1051-azure-x86_64-with-glibc2.29)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2025-02-02-preview
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2025-03-02-preview
response:
body:
string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n
Expand Down Expand Up @@ -1130,7 +1130,7 @@ interactions:
- AZURECLI/2.53.0 azsdk-python-azure-mgmt-containerservice/28.0.0b Python/3.8.10
(Linux-5.15.0-1051-azure-x86_64-with-glibc2.29)
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2025-02-02-preview
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2025-03-02-preview
response:
body:
string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n
Expand Down Expand Up @@ -2363,7 +2363,7 @@ interactions:
- AZURECLI/2.53.0 azsdk-python-azure-mgmt-containerservice/28.0.0b Python/3.8.10
(Linux-5.15.0-1051-azure-x86_64-with-glibc2.29)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2025-02-02-preview
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2025-03-02-preview
response:
body:
string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n
Expand Down
Loading
Loading