Skip to content

Commit 78a2299

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

File tree

6 files changed

+98
-3
lines changed

6 files changed

+98
-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: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3360,6 +3360,93 @@ 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+
@AllowLargeResponse()
3364+
@AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus2euap')
3365+
def test_aks_nodepool_add_with_ossku_azurecontainerlinux(self, resource_group, resource_group_location):
3366+
aks_name = self.create_random_name('cliakstest', 16)
3367+
node_pool_name = self.create_random_name('c', 6)
3368+
node_pool_name_second = self.create_random_name('c', 6)
3369+
self.kwargs.update({
3370+
'resource_group': resource_group,
3371+
'name': aks_name,
3372+
'node_pool_name': node_pool_name,
3373+
'node_pool_name_second': node_pool_name_second,
3374+
'ssh_key_value': self.generate_ssh_keys()
3375+
})
3376+
3377+
create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \
3378+
'--nodepool-name {node_pool_name} -c 1 ' \
3379+
'--ssh-key-value={ssh_key_value}'
3380+
self.cmd(create_cmd, checks=[
3381+
self.check('provisioningState', 'Succeeded'),
3382+
])
3383+
3384+
# nodepool add with AzureContainerLinux os-sku
3385+
self.cmd('aks nodepool add '
3386+
'--resource-group={resource_group} '
3387+
'--cluster-name={name} '
3388+
'--name={node_pool_name_second} '
3389+
'--os-sku AzureContainerLinux '
3390+
'--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/AzureContainerLinuxPreview',
3391+
checks=[
3392+
self.check('provisioningState', 'Succeeded'),
3393+
self.check('osSku', 'AzureContainerLinux'),
3394+
])
3395+
3396+
# delete
3397+
self.cmd(
3398+
'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()])
3399+
3400+
@AllowLargeResponse()
3401+
@AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus2euap')
3402+
def test_aks_nodepool_update_with_ossku_azurecontainerlinux(self, resource_group, resource_group_location):
3403+
aks_name = self.create_random_name('cliakstest', 16)
3404+
node_pool_name = self.create_random_name('c', 6)
3405+
node_pool_name_second = self.create_random_name('c', 6)
3406+
self.kwargs.update({
3407+
'resource_group': resource_group,
3408+
'name': aks_name,
3409+
'node_pool_name': node_pool_name,
3410+
'node_pool_name_second': node_pool_name_second,
3411+
'ssh_key_value': self.generate_ssh_keys()
3412+
})
3413+
3414+
create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \
3415+
'--nodepool-name {node_pool_name} -c 1 ' \
3416+
'--ssh-key-value={ssh_key_value}'
3417+
self.cmd(create_cmd, checks=[
3418+
self.check('provisioningState', 'Succeeded'),
3419+
])
3420+
3421+
# add a second nodepool
3422+
self.cmd('aks nodepool add '
3423+
'--resource-group={resource_group} '
3424+
'--cluster-name={name} '
3425+
'--name={node_pool_name_second} '
3426+
'--os-sku AzureLinux '
3427+
'--enable-secure-boot '
3428+
'--enable-vtpm',
3429+
checks=[
3430+
self.check('provisioningState', 'Succeeded'),
3431+
self.check('osSku', 'AzureLinux'),
3432+
])
3433+
3434+
# nodepool update to AzureContainerLinux os-sku
3435+
self.cmd('aks nodepool update '
3436+
'--resource-group={resource_group} '
3437+
'--cluster-name={name} '
3438+
'--name={node_pool_name_second} '
3439+
'--os-sku AzureContainerLinux '
3440+
'--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/AzureContainerLinuxPreview',
3441+
checks=[
3442+
self.check('provisioningState', 'Succeeded'),
3443+
self.check('osSku', 'AzureContainerLinux'),
3444+
])
3445+
3446+
# delete
3447+
self.cmd(
3448+
'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()])
3449+
33633450
@AllowLargeResponse()
33643451
@AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus2euap')
33653452
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)