Skip to content

Commit d9ad9ab

Browse files
committed
[AKS] Add option Flatcar to --os-sku for aks create, nodepool add, nodepool update
Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
1 parent f4f6815 commit d9ad9ab

File tree

6 files changed

+49
-4
lines changed

6 files changed

+49
-4
lines changed

src/aks-preview/HISTORY.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ To release a new version, please select a new version number (usually plus 1 to
1111

1212
Pending
1313
+++++++
14+
15+
18.0.0b40
16+
+++++++
1417
* Add option `Windows2025` to `--os-sku` for `az aks nodepool add`.
18+
* Add option `Flatcar` to `--os-sku` for `az aks nodepool add` and `az aks nodepool update`.
1519

1620
18.0.0b39
1721
+++++++
@@ -1998,4 +2002,4 @@ Pending
19982002
+++++
19992003

20002004
* new feature `enable-cluster-autoscaler`
2001-
* default agentType is VMSS
2005+
* default agentType is VMSS

src/aks-preview/azext_aks_preview/_consts.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
CONST_OS_SKU_WINDOWSANNUAL = "WindowsAnnual"
4141
CONST_OS_SKU_AZURELINUX = "AzureLinux"
4242
CONST_OS_SKU_AZURELINUX3 = "AzureLinux3"
43+
CONST_OS_SKU_FLATCAR = "Flatcar"
4344
CONST_OS_SKU_UBUNTU2204 = "Ubuntu2204"
4445
CONST_OS_SKU_UBUNTU2404 = "Ubuntu2404"
4546
CONST_OS_SKU_AZURELINUXOSGUARD = "AzureLinuxOSGuard"

src/aks-preview/azext_aks_preview/_help.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@
271271
short-summary: The ID of a PPG.
272272
- name: --os-sku
273273
type: string
274-
short-summary: The os-sku of the agent node pool. Ubuntu or CBLMariner.
274+
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.
275275
- name: --enable-fips-image
276276
type: bool
277277
short-summary: Use FIPS-enabled OS on agent nodes.
@@ -1928,7 +1928,7 @@
19281928
short-summary: The OS Type. Linux or Windows. Windows not supported yet for "VirtualMachines" VM set type.
19291929
- name: --os-sku
19301930
type: string
1931-
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.
1931+
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.
19321932
- name: --enable-fips-image
19331933
type: bool
19341934
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
@@ -93,6 +93,7 @@
9393
CONST_OS_DISK_TYPE_MANAGED,
9494
CONST_OS_SKU_AZURELINUX,
9595
CONST_OS_SKU_AZURELINUX3,
96+
CONST_OS_SKU_FLATCAR,
9697
CONST_OS_SKU_CBLMARINER,
9798
CONST_OS_SKU_MARINER,
9899
CONST_OS_SKU_AZURELINUXOSGUARD,
@@ -280,6 +281,7 @@
280281
node_os_skus_create = [
281282
CONST_OS_SKU_AZURELINUX,
282283
CONST_OS_SKU_AZURELINUX3,
284+
CONST_OS_SKU_FLATCAR,
283285
CONST_OS_SKU_UBUNTU,
284286
CONST_OS_SKU_CBLMARINER,
285287
CONST_OS_SKU_MARINER,
@@ -297,6 +299,7 @@
297299
node_os_skus_update = [
298300
CONST_OS_SKU_AZURELINUX,
299301
CONST_OS_SKU_AZURELINUX3,
302+
CONST_OS_SKU_FLATCAR,
300303
CONST_OS_SKU_UBUNTU,
301304
CONST_OS_SKU_UBUNTU2204,
302305
CONST_OS_SKU_UBUNTU2404,

src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3029,6 +3029,43 @@ def test_aks_nodepool_add_with_ossku_azurelinux3(self, resource_group, resource_
30293029
self.cmd(
30303030
'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()])
30313031

3032+
@AllowLargeResponse()
3033+
@AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus2euap')
3034+
def test_aks_nodepool_add_with_ossku_flatcar(self, resource_group, resource_group_location):
3035+
aks_name = self.create_random_name('cliakstest', 16)
3036+
node_pool_name = self.create_random_name('c', 6)
3037+
node_pool_name_second = self.create_random_name('c', 6)
3038+
self.kwargs.update({
3039+
'resource_group': resource_group,
3040+
'name': aks_name,
3041+
'node_pool_name': node_pool_name,
3042+
'node_pool_name_second': node_pool_name_second,
3043+
'ssh_key_value': self.generate_ssh_keys()
3044+
})
3045+
3046+
create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \
3047+
'--nodepool-name {node_pool_name} -c 1 ' \
3048+
'--ssh-key-value={ssh_key_value} ' \
3049+
'--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/AKSFlatcarPreview ' \
3050+
'--os-sku Flatcar'
3051+
self.cmd(create_cmd, checks=[
3052+
self.check('provisioningState', 'Succeeded'),
3053+
])
3054+
3055+
self.cmd('aks nodepool add '
3056+
'--resource-group={resource_group} '
3057+
'--cluster-name={name} '
3058+
'--name={node_pool_name_second} '
3059+
'--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/AKSFlatcarPreview '
3060+
'--os-sku Flatcar',
3061+
checks=[
3062+
self.check('provisioningState', 'Succeeded'),
3063+
self.check('osSku', 'Flatcar'),
3064+
])
3065+
3066+
self.cmd(
3067+
'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()])
3068+
30323069
@AllowLargeResponse()
30333070
@AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus2euap')
30343071
def test_aks_nodepool_add_with_ossku_azurelinuxosguard(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 = "18.0.0b39"
12+
VERSION = "18.0.0b40"
1313

1414
CLASSIFIERS = [
1515
"Development Status :: 4 - Beta",

0 commit comments

Comments
 (0)