Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions src/azure-cli/azure/cli/command_modules/acs/_consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
CONST_OS_SKU_AZURELINUX = "AzureLinux"
CONST_OS_SKU_AZURELINUX3 = "AzureLinux3"
CONST_OS_SKU_UBUNTU2204 = "Ubuntu2204"
CONST_OS_SKU_UBUNTU2404 = "Ubuntu2404"

# vm set type
CONST_VIRTUAL_MACHINE_SCALE_SETS = "VirtualMachineScaleSets"
Expand Down
2 changes: 1 addition & 1 deletion src/azure-cli/azure/cli/command_modules/acs/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -1853,7 +1853,7 @@
short-summary: The OS Type. Linux or Windows.
- name: --os-sku
type: string
short-summary: The OS SKU of the agent node pool. Ubuntu, Ubuntu2204, AzureLinux or AzureLinux3 for Linux. Windows2019 or Windows2022 for Windows.
short-summary: The OS SKU of the agent node pool. Ubuntu, Ubuntu2204, Ubuntu2404, AzureLinux or AzureLinux3 for Linux. Windows2019 or Windows2022 for Windows.
- name: --enable-cluster-autoscaler -e
type: bool
short-summary: Enable cluster autoscaler.
Expand Down
6 changes: 3 additions & 3 deletions src/azure-cli/azure/cli/command_modules/acs/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
CONST_NAMESPACE_DELETE_POLICY_DELETE,
CONST_OS_SKU_AZURELINUX, CONST_OS_SKU_AZURELINUX3,
CONST_OS_SKU_CBLMARINER, CONST_OS_SKU_MARINER,
CONST_OS_SKU_UBUNTU, CONST_OS_SKU_UBUNTU2204,
CONST_OS_SKU_UBUNTU, CONST_OS_SKU_UBUNTU2204, CONST_OS_SKU_UBUNTU2404,
CONST_OS_SKU_WINDOWS2019, CONST_OS_SKU_WINDOWS2022,
CONST_OUTBOUND_TYPE_LOAD_BALANCER, CONST_OUTBOUND_TYPE_MANAGED_NAT_GATEWAY,
CONST_OUTBOUND_TYPE_USER_ASSIGNED_NAT_GATEWAY,
Expand Down Expand Up @@ -183,9 +183,9 @@
node_eviction_policies = [CONST_SPOT_EVICTION_POLICY_DELETE, CONST_SPOT_EVICTION_POLICY_DEALLOCATE]
node_os_disk_types = [CONST_OS_DISK_TYPE_MANAGED, CONST_OS_DISK_TYPE_EPHEMERAL]
node_mode_types = [CONST_NODEPOOL_MODE_SYSTEM, CONST_NODEPOOL_MODE_USER, CONST_NODEPOOL_MODE_GATEWAY]
node_os_skus_create = [CONST_OS_SKU_AZURELINUX, CONST_OS_SKU_AZURELINUX3, CONST_OS_SKU_UBUNTU, CONST_OS_SKU_CBLMARINER, CONST_OS_SKU_MARINER, CONST_OS_SKU_UBUNTU2204]
node_os_skus_create = [CONST_OS_SKU_AZURELINUX, CONST_OS_SKU_AZURELINUX3, CONST_OS_SKU_UBUNTU, CONST_OS_SKU_CBLMARINER, CONST_OS_SKU_MARINER, CONST_OS_SKU_UBUNTU2204, CONST_OS_SKU_UBUNTU2404]
node_os_skus = node_os_skus_create + [CONST_OS_SKU_WINDOWS2019, CONST_OS_SKU_WINDOWS2022]
node_os_skus_update = [CONST_OS_SKU_AZURELINUX, CONST_OS_SKU_AZURELINUX3, CONST_OS_SKU_UBUNTU, CONST_OS_SKU_UBUNTU2204]
node_os_skus_update = [CONST_OS_SKU_AZURELINUX, CONST_OS_SKU_AZURELINUX3, CONST_OS_SKU_UBUNTU, CONST_OS_SKU_UBUNTU2204, CONST_OS_SKU_UBUNTU2404]
scale_down_modes = [CONST_SCALE_DOWN_MODE_DELETE, CONST_SCALE_DOWN_MODE_DEALLOCATE]
pod_ip_allocation_modes = [CONST_NETWORK_POD_IP_ALLOCATION_MODE_DYNAMIC_INDIVIDUAL, CONST_NETWORK_POD_IP_ALLOCATION_MODE_STATIC_BLOCK]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3696,6 +3696,43 @@ def test_aks_nodepool_add_with_ossku_ubuntu2204(self, resource_group, resource_g
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_ubuntu2404(self, resource_group, resource_group_location):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Live test passed!

resource_group_location = 'eastus2euap'
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}'
self.cmd(create_cmd, checks=[
self.check('provisioningState', 'Succeeded'),
])

# nodepool get-upgrades
Copy link

Copilot AI Dec 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment # nodepool get-upgrades is misleading. The code below is actually calling aks nodepool add, not aks nodepool get-upgrades. This comment should be updated to accurately reflect the operation being tested, such as # nodepool add with Ubuntu2404.

Suggested change
# nodepool get-upgrades
# nodepool add with Ubuntu2404

Copilot uses AI. Check for mistakes.
self.cmd('aks nodepool add '
'--resource-group={resource_group} '
'--cluster-name={name} '
'--name={node_pool_name_second} '
'--os-sku Ubuntu2404',
checks=[
self.check('provisioningState', 'Succeeded'),
self.check('osSku', 'Ubuntu2404'),
])

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