Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/aks-preview/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ To release a new version, please select a new version number (usually plus 1 to

Pending
+++++++
* Add option `Flatcar` to `--os-sku` for `az aks nodepool add` and `az aks nodepool update`.

18.0.0b41
+++++++
Expand Down Expand Up @@ -2012,4 +2013,4 @@ Pending
+++++

* new feature `enable-cluster-autoscaler`
* default agentType is VMSS
* default agentType is VMSS
1 change: 1 addition & 0 deletions src/aks-preview/azext_aks_preview/_consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
CONST_OS_SKU_WINDOWSANNUAL = "WindowsAnnual"
CONST_OS_SKU_AZURELINUX = "AzureLinux"
CONST_OS_SKU_AZURELINUX3 = "AzureLinux3"
CONST_OS_SKU_FLATCAR = "Flatcar"
CONST_OS_SKU_UBUNTU2204 = "Ubuntu2204"
CONST_OS_SKU_UBUNTU2404 = "Ubuntu2404"
CONST_OS_SKU_AZURELINUXOSGUARD = "AzureLinuxOSGuard"
Expand Down
4 changes: 2 additions & 2 deletions src/aks-preview/azext_aks_preview/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@
short-summary: The ID of a PPG.
- name: --os-sku
type: string
short-summary: The os-sku of the agent node pool. Ubuntu or CBLMariner.
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.
- name: --enable-fips-image
type: bool
short-summary: Use FIPS-enabled OS on agent nodes.
Expand Down Expand Up @@ -1928,7 +1928,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, Ubuntu2204, Ubuntu2404, CBLMariner, AzureLinux AzureLinux3, AzureLinuxOSGuard, or AzureLinux3OSGuard 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.
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.
- name: --enable-fips-image
type: bool
short-summary: Use FIPS-enabled OS on agent nodes.
Expand Down
3 changes: 3 additions & 0 deletions src/aks-preview/azext_aks_preview/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
CONST_OS_DISK_TYPE_MANAGED,
CONST_OS_SKU_AZURELINUX,
CONST_OS_SKU_AZURELINUX3,
CONST_OS_SKU_FLATCAR,
CONST_OS_SKU_CBLMARINER,
CONST_OS_SKU_MARINER,
CONST_OS_SKU_AZURELINUXOSGUARD,
Expand Down Expand Up @@ -280,6 +281,7 @@
node_os_skus_create = [
CONST_OS_SKU_AZURELINUX,
CONST_OS_SKU_AZURELINUX3,
CONST_OS_SKU_FLATCAR,
CONST_OS_SKU_UBUNTU,
CONST_OS_SKU_CBLMARINER,
CONST_OS_SKU_MARINER,
Expand All @@ -297,6 +299,7 @@
node_os_skus_update = [
CONST_OS_SKU_AZURELINUX,
CONST_OS_SKU_AZURELINUX3,
CONST_OS_SKU_FLATCAR,
CONST_OS_SKU_UBUNTU,
CONST_OS_SKU_UBUNTU2204,
CONST_OS_SKU_UBUNTU2404,
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -3030,6 +3030,43 @@ def test_aks_nodepool_add_with_ossku_azurelinux3(self, resource_group, resource_
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_flatcar(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} ' \
'--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/AKSFlatcarPreview ' \
'--os-sku Flatcar'
self.cmd(create_cmd, checks=[
self.check('provisioningState', 'Succeeded'),
])

self.cmd('aks nodepool add '
'--resource-group={resource_group} '
'--cluster-name={name} '
'--name={node_pool_name_second} '
'--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/AKSFlatcarPreview '
'--os-sku Flatcar',
checks=[
self.check('provisioningState', 'Succeeded'),
self.check('osSku', 'Flatcar'),
])

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_azurelinuxosguard(self, resource_group, resource_group_location):
Expand Down
Loading