Skip to content

Commit 5663d28

Browse files
author
anujmaheshwari1
committed
chore: add AzureLinux3 OSSKU enum value
1 parent ef0c533 commit 5663d28

File tree

4 files changed

+41
-1
lines changed

4 files changed

+41
-1
lines changed

src/aks-preview/azext_aks_preview/_consts.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
CONST_OS_SKU_WINDOWS2022 = "Windows2022"
3838
CONST_OS_SKU_WINDOWSANNUAL = "WindowsAnnual"
3939
CONST_OS_SKU_AZURELINUX = "AzureLinux"
40+
CONST_OS_SKU_AZURELINUX3 = "AzureLinux3"
4041
CONST_OS_SKU_UBUNTU2204 = "Ubuntu2204"
4142
CONST_OS_SKU_UBUNTU2404 = "Ubuntu2404"
4243

src/aks-preview/azext_aks_preview/_help.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1900,7 +1900,7 @@
19001900
short-summary: The OS Type. Linux or Windows. Windows not supported yet for "VirtualMachines" VM set type.
19011901
- name: --os-sku
19021902
type: string
1903-
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.
1903+
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.
19041904
- name: --enable-fips-image
19051905
type: bool
19061906
short-summary: Use FIPS-enabled OS on agent nodes.

src/aks-preview/azext_aks_preview/_params.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@
9191
CONST_OS_DISK_TYPE_EPHEMERAL,
9292
CONST_OS_DISK_TYPE_MANAGED,
9393
CONST_OS_SKU_AZURELINUX,
94+
CONST_OS_SKU_AZURELINUX3,
9495
CONST_OS_SKU_CBLMARINER,
9596
CONST_OS_SKU_MARINER,
9697
CONST_OS_SKU_UBUNTU,
@@ -268,6 +269,7 @@
268269
]
269270
node_os_skus_create = [
270271
CONST_OS_SKU_AZURELINUX,
272+
CONST_OS_SKU_AZURELINUX3,
271273
CONST_OS_SKU_UBUNTU,
272274
CONST_OS_SKU_CBLMARINER,
273275
CONST_OS_SKU_MARINER,
@@ -281,6 +283,7 @@
281283
]
282284
node_os_skus_update = [
283285
CONST_OS_SKU_AZURELINUX,
286+
CONST_OS_SKU_AZURELINUX3,
284287
CONST_OS_SKU_UBUNTU,
285288
CONST_OS_SKU_UBUNTU2204,
286289
CONST_OS_SKU_UBUNTU2404,

src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2842,6 +2842,42 @@ def test_aks_nodepool_add_with_ossku_ubuntu2204(self, resource_group, resource_g
28422842
self.cmd(
28432843
'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()])
28442844

2845+
@AllowLargeResponse()
2846+
@AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus2euap')
2847+
def test_aks_nodepool_add_with_ossku_azurelinux3(self, resource_group, resource_group_location):
2848+
aks_name = self.create_random_name('cliakstest', 16)
2849+
node_pool_name = self.create_random_name('c', 6)
2850+
node_pool_name_second = self.create_random_name('c', 6)
2851+
self.kwargs.update({
2852+
'resource_group': resource_group,
2853+
'name': aks_name,
2854+
'node_pool_name': node_pool_name,
2855+
'node_pool_name_second': node_pool_name_second,
2856+
'ssh_key_value': self.generate_ssh_keys()
2857+
})
2858+
2859+
create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \
2860+
'--nodepool-name {node_pool_name} -c 1 ' \
2861+
'--ssh-key-value={ssh_key_value}'
2862+
self.cmd(create_cmd, checks=[
2863+
self.check('provisioningState', 'Succeeded'),
2864+
])
2865+
2866+
# nodepool get-upgrades
2867+
self.cmd('aks nodepool add '
2868+
'--resource-group={resource_group} '
2869+
'--cluster-name={name} '
2870+
'--name={node_pool_name_second} '
2871+
'--os-sku AzureLinux3',
2872+
checks=[
2873+
self.check('provisioningState', 'Succeeded'),
2874+
self.check('osSku', 'AzureLinux3'),
2875+
])
2876+
2877+
# delete
2878+
self.cmd(
2879+
'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()])
2880+
28452881
@AllowLargeResponse()
28462882
@AKSCustomResourceGroupPreparer(
28472883
random_name_length=17, name_prefix="clitest", location="westus2"

0 commit comments

Comments
 (0)