diff --git a/src/aks-preview/azext_aks_preview/_consts.py b/src/aks-preview/azext_aks_preview/_consts.py index 03261a1bdd1..bf3eaaef8fd 100644 --- a/src/aks-preview/azext_aks_preview/_consts.py +++ b/src/aks-preview/azext_aks_preview/_consts.py @@ -37,6 +37,7 @@ CONST_OS_SKU_WINDOWS2022 = "Windows2022" CONST_OS_SKU_WINDOWSANNUAL = "WindowsAnnual" CONST_OS_SKU_AZURELINUX = "AzureLinux" +CONST_OS_SKU_AZURELINUX3 = "AzureLinux3" CONST_OS_SKU_UBUNTU2204 = "Ubuntu2204" CONST_OS_SKU_UBUNTU2404 = "Ubuntu2404" diff --git a/src/aks-preview/azext_aks_preview/_help.py b/src/aks-preview/azext_aks_preview/_help.py index a5b85ac96ea..461e23fd47d 100644 --- a/src/aks-preview/azext_aks_preview/_help.py +++ b/src/aks-preview/azext_aks_preview/_help.py @@ -1900,7 +1900,7 @@ short-summary: The OS Type. Linux or Windows. Windows not supported yet for "VirtualMachines" VM set type. - name: --os-sku type: string - short-summary: The os-sku of the agent node pool. Ubuntu, CBLMariner, Ubuntu2204 or Ubuntu2404 when os-type is Linux, default is Ubuntu if not set; Windows2019, Windows2022 or WindowsAnnual when os-type is Windows, the current default is Windows2022 if not set. + short-summary: The os-sku of the agent node pool. Ubuntu, Ubuntu2204, Ubuntu2404, CBLMariner, AzureLinux or AzureLinux3 when os-type is Linux, default is Ubuntu if not set; Windows2019, Windows2022 or WindowsAnnual when os-type is Windows, the current default is Windows2022 if not set. - name: --enable-fips-image type: bool short-summary: Use FIPS-enabled OS on agent nodes. diff --git a/src/aks-preview/azext_aks_preview/_params.py b/src/aks-preview/azext_aks_preview/_params.py index 9303f2d43bb..da099084c64 100644 --- a/src/aks-preview/azext_aks_preview/_params.py +++ b/src/aks-preview/azext_aks_preview/_params.py @@ -91,6 +91,7 @@ CONST_OS_DISK_TYPE_EPHEMERAL, CONST_OS_DISK_TYPE_MANAGED, CONST_OS_SKU_AZURELINUX, + CONST_OS_SKU_AZURELINUX3, CONST_OS_SKU_CBLMARINER, CONST_OS_SKU_MARINER, CONST_OS_SKU_UBUNTU, @@ -268,6 +269,7 @@ ] node_os_skus_create = [ CONST_OS_SKU_AZURELINUX, + CONST_OS_SKU_AZURELINUX3, CONST_OS_SKU_UBUNTU, CONST_OS_SKU_CBLMARINER, CONST_OS_SKU_MARINER, @@ -281,6 +283,7 @@ ] node_os_skus_update = [ CONST_OS_SKU_AZURELINUX, + CONST_OS_SKU_AZURELINUX3, CONST_OS_SKU_UBUNTU, CONST_OS_SKU_UBUNTU2204, CONST_OS_SKU_UBUNTU2404, diff --git a/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py b/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py index e083e6e57ca..fd214dfc073 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py +++ b/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py @@ -2842,6 +2842,42 @@ def test_aks_nodepool_add_with_ossku_ubuntu2204(self, resource_group, resource_g self.cmd( 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus2euap') + def test_aks_nodepool_add_with_ossku_azurelinux3(self, resource_group, resource_group_location): + aks_name = self.create_random_name('cliakstest', 16) + node_pool_name = self.create_random_name('c', 6) + node_pool_name_second = self.create_random_name('c', 6) + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'node_pool_name': node_pool_name, + 'node_pool_name_second': node_pool_name_second, + 'ssh_key_value': self.generate_ssh_keys() + }) + + create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ + '--nodepool-name {node_pool_name} -c 1 ' \ + '--ssh-key-value={ssh_key_value}' + self.cmd(create_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + ]) + + # nodepool get-upgrades + self.cmd('aks nodepool add ' + '--resource-group={resource_group} ' + '--cluster-name={name} ' + '--name={node_pool_name_second} ' + '--os-sku AzureLinux3', + checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('osSku', 'AzureLinux3'), + ]) + + # delete + self.cmd( + 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + @AllowLargeResponse() @AKSCustomResourceGroupPreparer( random_name_length=17, name_prefix="clitest", location="westus2"