Skip to content

Commit 47f2ad1

Browse files
committed
add Ubuntu2404 ossku
1 parent 104cb2e commit 47f2ad1

File tree

4 files changed

+42
-4
lines changed

4 files changed

+42
-4
lines changed

src/azure-cli/azure/cli/command_modules/acs/_consts.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
CONST_OS_SKU_AZURELINUX = "AzureLinux"
4040
CONST_OS_SKU_AZURELINUX3 = "AzureLinux3"
4141
CONST_OS_SKU_UBUNTU2204 = "Ubuntu2204"
42+
CONST_OS_SKU_UBUNTU2404 = "Ubuntu2404"
4243

4344
# vm set type
4445
CONST_VIRTUAL_MACHINE_SCALE_SETS = "VirtualMachineScaleSets"

src/azure-cli/azure/cli/command_modules/acs/_help.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1853,7 +1853,7 @@
18531853
short-summary: The OS Type. Linux or Windows.
18541854
- name: --os-sku
18551855
type: string
1856-
short-summary: The OS SKU of the agent node pool. Ubuntu, Ubuntu2204, AzureLinux or AzureLinux3 for Linux. Windows2019 or Windows2022 for Windows.
1856+
short-summary: The OS SKU of the agent node pool. Ubuntu, Ubuntu2204, Ubuntu2404, AzureLinux or AzureLinux3 for Linux. Windows2019 or Windows2022 for Windows.
18571857
- name: --enable-cluster-autoscaler -e
18581858
type: bool
18591859
short-summary: Enable cluster autoscaler.

src/azure-cli/azure/cli/command_modules/acs/_params.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
CONST_NAMESPACE_DELETE_POLICY_DELETE,
4343
CONST_OS_SKU_AZURELINUX, CONST_OS_SKU_AZURELINUX3,
4444
CONST_OS_SKU_CBLMARINER, CONST_OS_SKU_MARINER,
45-
CONST_OS_SKU_UBUNTU, CONST_OS_SKU_UBUNTU2204,
45+
CONST_OS_SKU_UBUNTU, CONST_OS_SKU_UBUNTU2204, CONST_OS_SKU_UBUNTU2404,
4646
CONST_OS_SKU_WINDOWS2019, CONST_OS_SKU_WINDOWS2022,
4747
CONST_OUTBOUND_TYPE_LOAD_BALANCER, CONST_OUTBOUND_TYPE_MANAGED_NAT_GATEWAY,
4848
CONST_OUTBOUND_TYPE_USER_ASSIGNED_NAT_GATEWAY,
@@ -183,9 +183,9 @@
183183
node_eviction_policies = [CONST_SPOT_EVICTION_POLICY_DELETE, CONST_SPOT_EVICTION_POLICY_DEALLOCATE]
184184
node_os_disk_types = [CONST_OS_DISK_TYPE_MANAGED, CONST_OS_DISK_TYPE_EPHEMERAL]
185185
node_mode_types = [CONST_NODEPOOL_MODE_SYSTEM, CONST_NODEPOOL_MODE_USER, CONST_NODEPOOL_MODE_GATEWAY]
186-
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]
186+
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]
187187
node_os_skus = node_os_skus_create + [CONST_OS_SKU_WINDOWS2019, CONST_OS_SKU_WINDOWS2022]
188-
node_os_skus_update = [CONST_OS_SKU_AZURELINUX, CONST_OS_SKU_AZURELINUX3, CONST_OS_SKU_UBUNTU, CONST_OS_SKU_UBUNTU2204]
188+
node_os_skus_update = [CONST_OS_SKU_AZURELINUX, CONST_OS_SKU_AZURELINUX3, CONST_OS_SKU_UBUNTU, CONST_OS_SKU_UBUNTU2204, CONST_OS_SKU_UBUNTU2404]
189189
scale_down_modes = [CONST_SCALE_DOWN_MODE_DELETE, CONST_SCALE_DOWN_MODE_DEALLOCATE]
190190
pod_ip_allocation_modes = [CONST_NETWORK_POD_IP_ALLOCATION_MODE_DYNAMIC_INDIVIDUAL, CONST_NETWORK_POD_IP_ALLOCATION_MODE_STATIC_BLOCK]
191191

src/azure-cli/azure/cli/command_modules/acs/tests/latest/test_aks_commands.py

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3696,6 +3696,43 @@ def test_aks_nodepool_add_with_ossku_ubuntu2204(self, resource_group, resource_g
36963696
self.cmd(
36973697
'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()])
36983698

3699+
@AllowLargeResponse()
3700+
@AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus2euap')
3701+
def test_aks_nodepool_add_with_ossku_ubuntu2404(self, resource_group, resource_group_location):
3702+
resource_group_location = 'eastus2euap'
3703+
aks_name = self.create_random_name('cliakstest', 16)
3704+
node_pool_name = self.create_random_name('c', 6)
3705+
node_pool_name_second = self.create_random_name('c', 6)
3706+
self.kwargs.update({
3707+
'resource_group': resource_group,
3708+
'name': aks_name,
3709+
'node_pool_name': node_pool_name,
3710+
'node_pool_name_second': node_pool_name_second,
3711+
'ssh_key_value': self.generate_ssh_keys()
3712+
})
3713+
3714+
create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \
3715+
'--nodepool-name {node_pool_name} -c 1 ' \
3716+
'--ssh-key-value={ssh_key_value}'
3717+
self.cmd(create_cmd, checks=[
3718+
self.check('provisioningState', 'Succeeded'),
3719+
])
3720+
3721+
# nodepool get-upgrades
3722+
self.cmd('aks nodepool add '
3723+
'--resource-group={resource_group} '
3724+
'--cluster-name={name} '
3725+
'--name={node_pool_name_second} '
3726+
'--os-sku Ubuntu2404',
3727+
checks=[
3728+
self.check('provisioningState', 'Succeeded'),
3729+
self.check('osSku', 'Ubuntu2404'),
3730+
])
3731+
3732+
# delete
3733+
self.cmd(
3734+
'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()])
3735+
36993736
@AllowLargeResponse()
37003737
@AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus2euap')
37013738
def test_aks_nodepool_add_with_ossku_azurelinux3(self, resource_group, resource_group_location):

0 commit comments

Comments
 (0)