Skip to content

Commit 86565d9

Browse files
authored
aks: add 'enable-ultra-ssd' parameter (Azure#3469)
* aks: add 'enable-ultra-ssd' parameter fix comments fix comments * aks: add new version change * aks: add test test case
1 parent 6f9f864 commit 86565d9

File tree

7 files changed

+37
-2
lines changed

7 files changed

+37
-2
lines changed

src/aks-preview/HISTORY.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
Release History
44
===============
5+
0.5.17
6+
+++++
7+
* Add parameter '--enable-ultra-ssd' to enable UltraSSD on agent node pool
58

69
0.5.16
710
+++++

src/aks-preview/azext_aks_preview/_help.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,9 @@
330330
- name: --enable-encryption-at-host
331331
type: bool
332332
short-summary: Enable EncryptionAtHost on agent node pool.
333+
- name: --enable-ultra-ssd
334+
type: bool
335+
short-summary: Enable UltraSSD on agent node pool.
333336
- name: --enable-secret-rotation
334337
type: bool
335338
short-summary: Enable secret rotation. Use with azure-keyvault-secrets-provider addon.
@@ -375,6 +378,8 @@
375378
text: az aks create -g MyResourceGroup -n MyManagedCluster --tags "foo=bar" "baz=qux"
376379
- name: Create a kubernetes cluster with EncryptionAtHost enabled.
377380
text: az aks create -g MyResourceGroup -n MyManagedCluster --enable-encryption-at-host
381+
- name: Create a kubernetes cluster with UltraSSD enabled.
382+
text: az aks create -g MyResourceGroup -n MyManagedCluster --enable-ultra-ssd
378383
- name: Create a kubernetes cluster with custom control plane identity and kubelet identity.
379384
text: az aks create -g MyResourceGroup -n MyManagedCluster --assign-identity <control-plane-identity-resource-id> --assign-kubelet-identity <kubelet-identity-resource-id>
380385
- name: Create a kubernetes cluster with Azure RBAC enabled.
@@ -927,6 +932,9 @@
927932
- name: --enable-encryption-at-host
928933
type: bool
929934
short-summary: Enable EncryptionAtHost on agent node pool.
935+
- name: --enable-ultra-ssd
936+
type: bool
937+
short-summary: Enable UltraSSD on agent node pool.
930938
examples:
931939
- name: Create a nodepool in an existing AKS cluster with ephemeral os enabled.
932940
text: az aks nodepool add -g MyResourceGroup -n nodepool1 --cluster-name MyManagedCluster --node-osdisk-type Ephemeral --node-osdisk-size 48

src/aks-preview/azext_aks_preview/_params.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ def load_arguments(self, _):
129129
c.argument('appgw_watch_namespace', options_list=['--appgw-watch-namespace'], arg_group='Application Gateway')
130130
c.argument('aci_subnet_name', type=str)
131131
c.argument('enable_encryption_at_host', arg_type=get_three_state_flag(), help='Enable EncryptionAtHost.')
132+
c.argument('enable_ultra_ssd', action='store_true')
132133
c.argument('enable_secret_rotation', action='store_true')
133134
c.argument('assign_kubelet_identity', type=str, validator=validate_assign_kubelet_identity)
134135
c.argument('disable_local_accounts', action='store_true')
@@ -228,6 +229,7 @@ def load_arguments(self, _):
228229
c.argument('kubelet_config', type=str)
229230
c.argument('linux_os_config', type=str)
230231
c.argument('enable_encryption_at_host', options_list=['--enable-encryption-at-host'], action='store_true')
232+
c.argument('enable_ultra_ssd', action='store_true')
231233

232234
for scope in ['aks nodepool show', 'aks nodepool delete', 'aks nodepool scale', 'aks nodepool upgrade', 'aks nodepool update']:
233235
with self.argument_context(scope) as c:

src/aks-preview/azext_aks_preview/custom.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,6 +1032,7 @@ def aks_create(cmd, # pylint: disable=too-many-locals,too-many-statements,to
10321032
enable_pod_identity=False,
10331033
enable_pod_identity_with_kubenet=False,
10341034
enable_encryption_at_host=False,
1035+
enable_ultra_ssd=False,
10351036
enable_secret_rotation=False,
10361037
disable_local_accounts=False,
10371038
no_wait=False,
@@ -1093,6 +1094,7 @@ def aks_create(cmd, # pylint: disable=too-many-locals,too-many-statements,to
10931094
enable_fips=enable_fips_image,
10941095
node_public_ip_prefix_id=node_public_ip_prefix_id,
10951096
enable_encryption_at_host=enable_encryption_at_host,
1097+
enable_ultra_ssd=enable_ultra_ssd,
10961098
max_pods=int(max_pods) if max_pods else None,
10971099
type=vm_set_type
10981100
)
@@ -3022,6 +3024,7 @@ def aks_agentpool_add(cmd, # pylint: disable=unused-argument,too-many-local
30223024
kubelet_config=None,
30233025
linux_os_config=None,
30243026
enable_encryption_at_host=False,
3027+
enable_ultra_ssd=False,
30253028
no_wait=False):
30263029
instances = client.list(resource_group_name, cluster_name)
30273030
for agentpool_profile in instances:
@@ -3073,6 +3076,7 @@ def aks_agentpool_add(cmd, # pylint: disable=unused-argument,too-many-local
30733076
scale_set_priority=priority,
30743077
upgrade_settings=upgradeSettings,
30753078
enable_encryption_at_host=enable_encryption_at_host,
3079+
enable_ultra_ssd=enable_ultra_ssd,
30763080
mode=mode
30773081
)
30783082

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

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1705,3 +1705,22 @@ def test_aks_disable_local_accounts(self, resource_group, resource_group_locatio
17051705
# delete
17061706
self.cmd(
17071707
'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()])
1708+
1709+
@live_only()
1710+
@AllowLargeResponse()
1711+
@AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2')
1712+
def test_aks_enable_utlra_ssd(self, resource_group, resource_group_location):
1713+
aks_name = self.create_random_name('cliakstest', 16)
1714+
self.kwargs.update({
1715+
'resource_group': resource_group,
1716+
'name': aks_name
1717+
})
1718+
1719+
create_cmd = 'aks create --resource-group={resource_group} --name={name} --node-vm-size Standard_D2s_v3 --zones 1 2 3 --enable-ultra-ssd'
1720+
self.cmd(create_cmd, checks=[
1721+
self.check('provisioningState', 'Succeeded')
1722+
])
1723+
1724+
# delete
1725+
self.cmd(
1726+
'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()])

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,5 @@ def test_aks_run_command(self, resource_group, resource_group_location):
7474
self.check('exitCode', 0),
7575
])
7676

77-
7877
if __name__ == '__main__':
7978
unittest.main()

src/aks-preview/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from codecs import open as open1
99
from setuptools import setup, find_packages
1010

11-
VERSION = "0.5.16"
11+
VERSION = "0.5.17"
1212
CLASSIFIERS = [
1313
'Development Status :: 4 - Beta',
1414
'Intended Audience :: Developers',

0 commit comments

Comments
 (0)