Skip to content

Commit 417c38a

Browse files
authored
[AKS] BREAKING CHANGE: Change default VM size changes to "" and clear test cases (#8736)
* update * update
1 parent 0512f4d commit 417c38a

6 files changed

Lines changed: 13 additions & 8 deletions

File tree

src/aks-preview/HISTORY.rst

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

1212
Pending
1313
+++++++
14+
15+
17.0.0b1
16+
+++++++
17+
* [BREAKING CHANGE]: `az aks create`: Change default value of option `--node-vm-size` to ""
18+
* [BREAKING CHANGE]: `az aks nodepool add`: Change default value of option `--node-vm-size` to ""
19+
1420
16.0.0b1
1521
+++++++
1622
* [BREAKING CHANGE] Remove flux extension from the list of supported core extensions

src/aks-preview/azext_aks_preview/_consts.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@
4343
CONST_VIRTUAL_MACHINES = "VirtualMachines"
4444

4545
# vm size
46-
CONST_DEFAULT_NODE_VM_SIZE = "Standard_DS2_v2"
47-
CONST_DEFAULT_WINDOWS_NODE_VM_SIZE = "Standard_D2s_v3"
46+
CONST_DEFAULT_NODE_VM_SIZE = ""
47+
CONST_DEFAULT_WINDOWS_NODE_VM_SIZE = ""
4848

4949
# workload runtime
5050
CONST_WORKLOAD_RUNTIME_OCI_CONTAINER = "OCIContainer"

src/aks-preview/azext_aks_preview/_help.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
`--service-principal` is specified.
4141
- name: --node-vm-size -s
4242
type: string
43-
short-summary: Size of Virtual Machines to create as Kubernetes nodes.
43+
short-summary: Size of Virtual Machines to create as Kubernetes nodes. If the user does not specify one, server will select a default VM size for her/him.
4444
- name: --dns-name-prefix -p
4545
type: string
4646
short-summary: Prefix for hostnames that are created. If not specified, generate a hostname using the
@@ -1698,7 +1698,7 @@
16981698
parameters:
16991699
- name: --node-vm-size -s
17001700
type: string
1701-
short-summary: Size of Virtual Machines to create as Kubernetes nodes.
1701+
short-summary: Size of Virtual Machines to create as Kubernetes nodes. If the user does not specify one, server will select a default VM size for her/him.
17021702
- name: --node-count -c
17031703
type: int
17041704
short-summary: Number of nodes in the Kubernetes agent pool. After creating a cluster, you can change the

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
InvalidArgumentValueError,
4343
MutuallyExclusiveArgumentError,
4444
)
45+
from deepdiff import DeepDiff
4546

4647

4748
class AKSPreviewAgentPoolContextCommonTestCase(unittest.TestCase):
@@ -815,7 +816,7 @@ def common_get_vm_sizes(self):
815816
)
816817
agentpool_2 = self.create_initialized_agentpool_instance(os_type="linux")
817818
ctx_2.attach_agentpool(agentpool_2)
818-
self.assertEqual(ctx_2.get_vm_sizes(), [CONST_DEFAULT_NODE_VM_SIZE])
819+
self.assertEqual(ctx_2.get_vm_sizes(), [CONST_DEFAULT_NODE_VM_SIZE], DeepDiff(ctx_2.get_vm_sizes(), [CONST_DEFAULT_NODE_VM_SIZE]))
819820

820821
# custom
821822
ctx_3 = AKSPreviewAgentPoolContext(

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8023,7 +8023,6 @@ def test_aks_nodepool_update_taints_msi(
80238023
self.check("resourceGroup", "{resource_group}"),
80248024
self.check("agentPoolProfiles[0].count", 1),
80258025
self.check("agentPoolProfiles[0].osType", "Linux"),
8026-
self.check("agentPoolProfiles[0].vmSize", "Standard_DS2_v2"),
80278026
self.check("agentPoolProfiles[0].mode", "System"),
80288027
self.check("dnsPrefix", "{dns_name_prefix}"),
80298028
self.exists("kubernetesVersion"),
@@ -8132,7 +8131,6 @@ def test_aks_nodepool_update_label_msi(
81328131
self.check("resourceGroup", "{resource_group}"),
81338132
self.check("agentPoolProfiles[0].count", 1),
81348133
self.check("agentPoolProfiles[0].osType", "Linux"),
8135-
self.check("agentPoolProfiles[0].vmSize", "Standard_DS2_v2"),
81368134
self.check("agentPoolProfiles[0].mode", "System"),
81378135
self.check("dnsPrefix", "{dns_name_prefix}"),
81388136
self.exists("kubernetesVersion"),

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 setup, find_packages
1111

12-
VERSION = "16.0.0b1"
12+
VERSION = "17.0.0b1"
1313

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

0 commit comments

Comments
 (0)