Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AKS] add UltraSSD support #18649

Merged
merged 1 commit into from
Jun 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
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
10 changes: 10 additions & 0 deletions src/azure-cli/azure/cli/command_modules/acs/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,9 @@
- name: --enable-encryption-at-host
type: bool
short-summary: Enable EncryptionAtHost, default value is false.
- name: --enable-ultra-ssd
type: bool
short-summary: Enable UltraSSD, default value is false.
- name: --enable-azure-rbac
type: bool
short-summary: Enable Azure RBAC to control authorization checks on cluster.
Expand Down Expand Up @@ -482,6 +485,8 @@
text: az aks create -g MyResourceGroup -n MyManagedCluster --node-osdisk-type Ephemeral --node-osdisk-size 48
- name: Create a kubernetes cluster with EncryptionAtHost enabled.
text: az aks create -g MyResourceGroup -n MyManagedCluster --enable-encryption-at-host
- name: Create a kubernetes cluster with UltraSSD enabled.
text: az aks create -g MyResourceGroup -n MyManagedCluster --enable-ultra-ssd
- name: Create a kubernetes cluster with Azure RBAC enabled.
text: az aks create -g MyResourceGroup -n MyManagedCluster --enable-aad --enable-azure-rbac
"""
Expand Down Expand Up @@ -821,11 +826,16 @@
- name: --enable-encryption-at-host
type: bool
short-summary: Enable EncryptionAtHost, default value is false.
- name: --enable-ultra-ssd
type: bool
short-summary: Enable UltraSSD, default value is false.
examples:
- name: Create a nodepool in an existing AKS cluster with ephemeral os enabled.
text: az aks nodepool add -g MyResourceGroup -n nodepool1 --cluster-name MyManagedCluster --node-osdisk-type Ephemeral --node-osdisk-size 48
- name: Create a nodepool with EncryptionAtHost enabled.
text: az aks nodepool add -g MyResourceGroup -n nodepool1 --cluster-name MyManagedCluster --enable-encryption-at-host
- name: Create a nodepool with UltraSSD enabled.
text: az aks nodepool add -g MyResourceGroup -n nodepool1 --cluster-name MyManagedCluster --enable-ultra-ssd
"""

helps['aks nodepool delete'] = """
Expand Down
4 changes: 4 additions & 0 deletions src/azure-cli/azure/cli/command_modules/acs/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,8 @@ def load_arguments(self, _):
c.argument('aci_subnet_name')
c.argument('enable_encryption_at_host', options_list=[
'--enable-encryption-at-host'], action='store_true')
c.argument('enable_ultra_ssd', options_list=[
Copy link
Contributor

Choose a reason for hiding this comment

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

so it cannot be updated to false anymore, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

false is by default, so it's meaningless to set as false, while it's still possible

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Juliehzl could you approve since there is no blocking issue? thanks.

'--enable-ultra-ssd'], action='store_true')
c.argument('appgw_name', options_list=[
'--appgw-name'], arg_group='Application Gateway')
c.argument('appgw_subnet_cidr', options_list=[
Expand Down Expand Up @@ -400,6 +402,8 @@ def load_arguments(self, _):
[CONST_OS_DISK_TYPE_MANAGED, CONST_OS_DISK_TYPE_EPHEMERAL]))
c.argument('enable_encryption_at_host', options_list=[
'--enable-encryption-at-host'], action='store_true')
c.argument('enable_ultra_ssd', options_list=[
'--enable-ultra-ssd'], action='store_true')

for scope in ['aks nodepool show', 'aks nodepool delete', 'aks nodepool scale', 'aks nodepool upgrade', 'aks nodepool update']:
with self.argument_context(scope) as c:
Expand Down
4 changes: 4 additions & 0 deletions src/azure-cli/azure/cli/command_modules/acs/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -1958,6 +1958,7 @@ def aks_create(cmd, client, resource_group_name, name, ssh_key_value, # pylint:
appgw_watch_namespace=None,
enable_sgxquotehelper=False,
enable_encryption_at_host=False,
enable_ultra_ssd=False,
no_wait=False,
yes=False,
enable_azure_rbac=False):
Expand Down Expand Up @@ -2034,6 +2035,7 @@ def aks_create(cmd, client, resource_group_name, name, ssh_key_value, # pylint:
enable_node_public_ip=enable_node_public_ip,
node_public_ip_prefix_id=node_public_ip_prefix_id,
enable_encryption_at_host=enable_encryption_at_host,
enable_ultra_ssd=enable_ultra_ssd,
max_pods=int(max_pods) if max_pods else None,
type=vm_set_type,
mode="System"
Expand Down Expand Up @@ -3801,6 +3803,7 @@ def aks_agentpool_add(cmd, client, resource_group_name, cluster_name, nodepool_n
max_surge=None,
mode="User",
enable_encryption_at_host=False,
enable_ultra_ssd=False,
no_wait=False):
AgentPool = cmd.get_models('AgentPool',
resource_type=ResourceType.MGMT_CONTAINERSERVICE,
Expand Down Expand Up @@ -3854,6 +3857,7 @@ def aks_agentpool_add(cmd, client, resource_group_name, cluster_name, nodepool_n
node_taints=taints_array,
upgrade_settings=upgradeSettings,
enable_encryption_at_host=enable_encryption_at_host,
enable_ultra_ssd=enable_ultra_ssd,
mode=mode
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4484,3 +4484,23 @@ def test_aks_update_to_msi_cluster_with_addons(self, resource_group, resource_gr
# delete
self.cmd(
'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()])

@live_only()
@AllowLargeResponse()
@AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2')
def test_aks_enable_utlra_ssd(self, resource_group, resource_group_location):
aks_name = self.create_random_name('cliakstest', 16)
self.kwargs.update({
'resource_group': resource_group,
'name': aks_name
})

create_cmd = 'aks create --resource-group={resource_group} --name={name} --node-vm-size Standard_D2s_v3 --zones 1 2 3 --enable-ultra-ssd'
self.cmd(create_cmd, checks=[
self.check('provisioningState', 'Succeeded')
])

# delete
self.cmd(
'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()])