Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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.0b29
+++++++
* Refactor code to suppress ssh access warning message when creating an automatic cluster.

18.0.0b28
+++++++
* Add interactive AI-powered debugging tool `az aks agent`.
Expand Down
19 changes: 10 additions & 9 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_BASE,
CONST_MANAGED_CLUSTER_SKU_NAME_AUTOMATIC,
CONST_SSH_ACCESS_LOCALUSER,
CONST_GPU_DRIVER_NONE,
Expand Down Expand Up @@ -569,7 +570,10 @@ 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")
skuName = self.raw_param.get("sku")
if skuName is None:
skuName = CONST_MANAGED_CLUSTER_SKU_NAME_BASE
return skuName

def get_yes(self) -> bool:
"""Obtain the value of yes.
Expand Down Expand Up @@ -987,18 +991,15 @@ def set_up_ssh_access(self, agentpool: AgentPool) -> AgentPool:

ssh_access = self.context.get_ssh_access()
sku_name = self.context.get_sku_name()
if ssh_access is not None:
if ssh_access is not None and sku_name.lower() != CONST_MANAGED_CLUSTER_SKU_NAME_AUTOMATIC:
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:
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."
)
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