Skip to content

Commit a422426

Browse files
Add AzureContainerLinux OSSKU to aks-preview
1 parent e60945d commit a422426

File tree

6 files changed

+104
-3
lines changed

6 files changed

+104
-3
lines changed

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: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3360,6 +3360,99 @@ 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+
'--os-sku AzureContainerLinux '
3393+
'--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/AzureContainerLinuxPreview',
3394+
checks=[
3395+
self.check('provisioningState', 'Succeeded'),
3396+
self.check('osSku', 'AzureContainerLinux'),
3397+
])
3398+
3399+
# delete
3400+
self.cmd(
3401+
'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()])
3402+
3403+
# live only because AzureContainerLinux RP changes have not rolled out yet,
3404+
# so recordings cannot be created and playback would fail.
3405+
@live_only()
3406+
@AllowLargeResponse()
3407+
@AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus2euap')
3408+
def test_aks_nodepool_update_with_ossku_azurecontainerlinux(self, resource_group, resource_group_location):
3409+
aks_name = self.create_random_name('cliakstest', 16)
3410+
node_pool_name = self.create_random_name('c', 6)
3411+
node_pool_name_second = self.create_random_name('c', 6)
3412+
self.kwargs.update({
3413+
'resource_group': resource_group,
3414+
'name': aks_name,
3415+
'node_pool_name': node_pool_name,
3416+
'node_pool_name_second': node_pool_name_second,
3417+
'ssh_key_value': self.generate_ssh_keys()
3418+
})
3419+
3420+
create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \
3421+
'--nodepool-name {node_pool_name} -c 1 ' \
3422+
'--ssh-key-value={ssh_key_value}'
3423+
self.cmd(create_cmd, checks=[
3424+
self.check('provisioningState', 'Succeeded'),
3425+
])
3426+
3427+
# add a second nodepool
3428+
self.cmd('aks nodepool add '
3429+
'--resource-group={resource_group} '
3430+
'--cluster-name={name} '
3431+
'--name={node_pool_name_second} '
3432+
'--os-sku AzureLinux',
3433+
checks=[
3434+
self.check('provisioningState', 'Succeeded'),
3435+
self.check('osSku', 'AzureLinux'),
3436+
])
3437+
3438+
# nodepool update to AzureContainerLinux os-sku
3439+
self.cmd('aks nodepool update '
3440+
'--resource-group={resource_group} '
3441+
'--cluster-name={name} '
3442+
'--name={node_pool_name_second} '
3443+
'--os-sku AzureContainerLinux '
3444+
'--enable-secure-boot '
3445+
'--enable-vtpm '
3446+
'--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/AzureContainerLinuxPreview',
3447+
checks=[
3448+
self.check('provisioningState', 'Succeeded'),
3449+
self.check('osSku', 'AzureContainerLinux'),
3450+
])
3451+
3452+
# delete
3453+
self.cmd(
3454+
'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()])
3455+
33633456
@AllowLargeResponse()
33643457
@AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus2euap')
33653458
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)