Skip to content
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
4 changes: 4 additions & 0 deletions src/aks-preview/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ To release a new version, please select a new version number (usually plus 1 to
Pending
+++++++

18.0.0b24
+++++++
* Suppress the ssh access annoying message if the cluster sku name is automatic.

18.0.0b23
+++++++
* `az aks create`: Add new parameter `--disable-run-command` to disable run command feature for the cluster
Expand Down
14 changes: 12 additions & 2 deletions src/aks-preview/azext_aks_preview/agentpool_decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
CONST_DEFAULT_WINDOWS_NODE_VM_SIZE,
CONST_DEFAULT_VMS_VM_SIZE,
CONST_DEFAULT_WINDOWS_VMS_VM_SIZE,
CONST_MANAGED_CLUSTER_SKU_NAME_AUTOMATIC,
CONST_SSH_ACCESS_LOCALUSER,
CONST_GPU_DRIVER_NONE,
CONST_NODEPOOL_MODE_MANAGEDSYSTEM,
Expand Down Expand Up @@ -567,6 +568,9 @@ def get_ssh_access(self) -> Union[str, None]:
"""
return self.raw_param.get("ssh_access")

def get_sku_name(self) -> str:
return self.raw_param.get("sku")

def get_yes(self) -> bool:
"""Obtain the value of yes.

Expand Down Expand Up @@ -982,13 +986,19 @@ def set_up_ssh_access(self, agentpool: AgentPool) -> AgentPool:
self._ensure_agentpool(agentpool)

ssh_access = self.context.get_ssh_access()
sku_name = self.context.get_sku_name()
if ssh_access is not None:
if agentpool.security_profile is None:
agentpool.security_profile = self.models.AgentPoolSecurityProfile() # pylint: disable=no-member
agentpool.security_profile.ssh_access = ssh_access
if ssh_access == CONST_SSH_ACCESS_LOCALUSER:
logger.warning("The new node pool will enable SSH access, recommended to use '--ssh-access disabled' "
"option to disable SSH access for the node pool to make it more secure.")
if sku_name == CONST_MANAGED_CLUSTER_SKU_NAME_AUTOMATIC:
logger.warning("SSH access is in preview")
else:
logger.warning(
"The new node pool will enable SSH access, recommended to use "
"'--ssh-access disabled' option to disable SSH access for the node pool to make it more secure."
)
return agentpool

def set_up_skip_gpu_driver_install(self, agentpool: AgentPool) -> AgentPool:
Expand Down
Loading
Loading