Skip to content

Commit 9fe5585

Browse files
Add AzureContainerLinux OSSKU to aks-preview (#9756)
1 parent 4cca92a commit 9fe5585

6 files changed

Lines changed: 106 additions & 3 deletions

File tree

src/aks-preview/HISTORY.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ To release a new version, please select a new version number (usually plus 1 to
1212
Pending
1313
+++++++
1414

15+
19.0.0b30
16+
+++++++
17+
* Add option `AzureContainerLinux` to `--os-sku` for `az aks create`, `az aks nodepool add`, and `az aks nodepool update`.
18+
1519
19.0.0b29
1620
+++++++
1721
* Add MIG (Multi-Instance GPU) strategy option to node pool property in `az aks nodepool add` and `az aks nodepool update`.

src/aks-preview/azext_aks_preview/_consts.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
CONST_OS_SKU_UBUNTU2404 = "Ubuntu2404"
4646
CONST_OS_SKU_AZURELINUXOSGUARD = "AzureLinuxOSGuard"
4747
CONST_OS_SKU_AZURELINUX3OSGUARD = "AzureLinux3OSGuard"
48+
CONST_OS_SKU_AZURECONTAINERLINUX = "AzureContainerLinux"
4849

4950
# vm set type
5051
CONST_VIRTUAL_MACHINE_SCALE_SETS = "VirtualMachineScaleSets"

src/aks-preview/azext_aks_preview/_help.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@
279279
short-summary: The ID of a PPG.
280280
- name: --os-sku
281281
type: string
282-
short-summary: The os-sku of the agent node pool. Ubuntu, Ubuntu2204, Ubuntu2404, CBLMariner, AzureLinux, AzureLinux3, AzureLinuxOSGuard, AzureLinux3OSGuard, or Flatcar when os-type is Linux, default is Ubuntu if not set; Windows2019, Windows2022, Windows2025, or WindowsAnnual when os-type is Windows, the current default is Windows2022 if not set.
282+
short-summary: The os-sku of the agent node pool. Ubuntu, Ubuntu2204, Ubuntu2404, CBLMariner, AzureLinux, AzureLinux3, AzureLinuxOSGuard, AzureLinux3OSGuard, AzureContainerLinux, or Flatcar when os-type is Linux, default is Ubuntu if not set; Windows2019, Windows2022, Windows2025, or WindowsAnnual when os-type is Windows, the current default is Windows2022 if not set.
283283
- name: --enable-fips-image
284284
type: bool
285285
short-summary: Use FIPS-enabled OS on agent nodes.
@@ -2112,7 +2112,7 @@
21122112
short-summary: The OS Type. Linux or Windows. Windows not supported yet for "VirtualMachines" VM set type.
21132113
- name: --os-sku
21142114
type: string
2115-
short-summary: The os-sku of the agent node pool. Ubuntu, Ubuntu2204, Ubuntu2404, CBLMariner, AzureLinux, AzureLinux3, AzureLinuxOSGuard, AzureLinux3OSGuard, or Flatcar when os-type is Linux, default is Ubuntu if not set; Windows2019, Windows2022, Windows2025, or WindowsAnnual when os-type is Windows, the current default is Windows2022 if not set.
2115+
short-summary: The os-sku of the agent node pool. Ubuntu, Ubuntu2204, Ubuntu2404, CBLMariner, AzureLinux, AzureLinux3, AzureLinuxOSGuard, AzureLinux3OSGuard, AzureContainerLinux, or Flatcar when os-type is Linux, default is Ubuntu if not set; Windows2019, Windows2022, Windows2025, or WindowsAnnual when os-type is Windows, the current default is Windows2022 if not set.
21162116
- name: --enable-fips-image
21172117
type: bool
21182118
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
@@ -102,6 +102,7 @@
102102
CONST_OS_SKU_MARINER,
103103
CONST_OS_SKU_AZURELINUXOSGUARD,
104104
CONST_OS_SKU_AZURELINUX3OSGUARD,
105+
CONST_OS_SKU_AZURECONTAINERLINUX,
105106
CONST_OS_SKU_UBUNTU,
106107
CONST_OS_SKU_UBUNTU2204,
107108
CONST_OS_SKU_UBUNTU2404,
@@ -302,6 +303,7 @@
302303
CONST_OS_SKU_UBUNTU2404,
303304
CONST_OS_SKU_AZURELINUXOSGUARD,
304305
CONST_OS_SKU_AZURELINUX3OSGUARD,
306+
CONST_OS_SKU_AZURECONTAINERLINUX,
305307
]
306308
node_os_skus_add = node_os_skus_create + [
307309
CONST_OS_SKU_WINDOWS2019,
@@ -318,6 +320,7 @@
318320
CONST_OS_SKU_UBUNTU2404,
319321
CONST_OS_SKU_AZURELINUXOSGUARD,
320322
CONST_OS_SKU_AZURELINUX3OSGUARD,
323+
CONST_OS_SKU_AZURECONTAINERLINUX,
321324
]
322325
scale_down_modes = [CONST_SCALE_DOWN_MODE_DELETE, CONST_SCALE_DOWN_MODE_DEALLOCATE]
323326
workload_runtimes = [

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

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3360,6 +3360,101 @@ def test_aks_nodepool_add_with_ossku_azurelinux3(self, resource_group, resource_
33603360
self.cmd(
33613361
'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()])
33623362

3363+
# live only because AzureContainerLinux RP changes have not rolled out yet,
3364+
# so recordings cannot be created and playback would fail.
3365+
@live_only()
3366+
@AllowLargeResponse()
3367+
@AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus2euap')
3368+
def test_aks_nodepool_add_with_ossku_azurecontainerlinux(self, resource_group, resource_group_location):
3369+
aks_name = self.create_random_name('cliakstest', 16)
3370+
node_pool_name = self.create_random_name('c', 6)
3371+
node_pool_name_second = self.create_random_name('c', 6)
3372+
self.kwargs.update({
3373+
'resource_group': resource_group,
3374+
'name': aks_name,
3375+
'node_pool_name': node_pool_name,
3376+
'node_pool_name_second': node_pool_name_second,
3377+
'ssh_key_value': self.generate_ssh_keys()
3378+
})
3379+
3380+
create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \
3381+
'--nodepool-name {node_pool_name} -c 1 ' \
3382+
'--ssh-key-value={ssh_key_value}'
3383+
self.cmd(create_cmd, checks=[
3384+
self.check('provisioningState', 'Succeeded'),
3385+
])
3386+
3387+
# nodepool add with AzureContainerLinux os-sku
3388+
self.cmd('aks nodepool add '
3389+
'--resource-group={resource_group} '
3390+
'--cluster-name={name} '
3391+
'--name={node_pool_name_second} '
3392+
'--node-vm-size Standard_D2s_v5 '
3393+
'--os-sku AzureContainerLinux '
3394+
'--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/AzureContainerLinuxPreview',
3395+
checks=[
3396+
self.check('provisioningState', 'Succeeded'),
3397+
self.check('osSku', 'AzureContainerLinux'),
3398+
])
3399+
3400+
# delete
3401+
self.cmd(
3402+
'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()])
3403+
3404+
# live only because AzureContainerLinux RP changes have not rolled out yet,
3405+
# so recordings cannot be created and playback would fail.
3406+
@live_only()
3407+
@AllowLargeResponse()
3408+
@AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus2euap')
3409+
def test_aks_nodepool_update_with_ossku_azurecontainerlinux(self, resource_group, resource_group_location):
3410+
aks_name = self.create_random_name('cliakstest', 16)
3411+
node_pool_name = self.create_random_name('c', 6)
3412+
node_pool_name_second = self.create_random_name('c', 6)
3413+
self.kwargs.update({
3414+
'resource_group': resource_group,
3415+
'name': aks_name,
3416+
'node_pool_name': node_pool_name,
3417+
'node_pool_name_second': node_pool_name_second,
3418+
'ssh_key_value': self.generate_ssh_keys()
3419+
})
3420+
3421+
create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \
3422+
'--nodepool-name {node_pool_name} -c 1 ' \
3423+
'--ssh-key-value={ssh_key_value}'
3424+
self.cmd(create_cmd, checks=[
3425+
self.check('provisioningState', 'Succeeded'),
3426+
])
3427+
3428+
# add a second nodepool
3429+
self.cmd('aks nodepool add '
3430+
'--resource-group={resource_group} '
3431+
'--cluster-name={name} '
3432+
'--name={node_pool_name_second} '
3433+
'--node-vm-size Standard_D2s_v5 '
3434+
'--os-sku AzureLinux',
3435+
checks=[
3436+
self.check('provisioningState', 'Succeeded'),
3437+
self.check('osSku', 'AzureLinux'),
3438+
])
3439+
3440+
# nodepool update to AzureContainerLinux os-sku
3441+
self.cmd('aks nodepool update '
3442+
'--resource-group={resource_group} '
3443+
'--cluster-name={name} '
3444+
'--name={node_pool_name_second} '
3445+
'--os-sku AzureContainerLinux '
3446+
'--enable-secure-boot '
3447+
'--enable-vtpm '
3448+
'--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/AzureContainerLinuxPreview',
3449+
checks=[
3450+
self.check('provisioningState', 'Succeeded'),
3451+
self.check('osSku', 'AzureContainerLinux'),
3452+
])
3453+
3454+
# delete
3455+
self.cmd(
3456+
'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()])
3457+
33633458
@AllowLargeResponse()
33643459
@AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus2euap')
33653460
def test_aks_nodepool_add_with_ossku_flatcar(self, resource_group, resource_group_location):

src/aks-preview/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
from setuptools import find_packages, setup
1111

12-
VERSION = "19.0.0b29"
12+
VERSION = "19.0.0b30"
1313

1414
CLASSIFIERS = [
1515
"Development Status :: 4 - Beta",

0 commit comments

Comments
 (0)