|
41 | 41 | CONST_DEFAULT_WINDOWS_NODE_VM_SIZE, |
42 | 42 | CONST_DEFAULT_VMS_VM_SIZE, |
43 | 43 | CONST_DEFAULT_WINDOWS_VMS_VM_SIZE, |
| 44 | + CONST_MANAGED_CLUSTER_SKU_NAME_AUTOMATIC, |
44 | 45 | CONST_SSH_ACCESS_LOCALUSER, |
45 | 46 | CONST_GPU_DRIVER_NONE, |
46 | 47 | CONST_NODEPOOL_MODE_MANAGEDSYSTEM, |
@@ -567,6 +568,9 @@ def get_ssh_access(self) -> Union[str, None]: |
567 | 568 | """ |
568 | 569 | return self.raw_param.get("ssh_access") |
569 | 570 |
|
| 571 | + def get_sku_name(self) -> str: |
| 572 | + return self.raw_param.get("sku") |
| 573 | + |
570 | 574 | def get_yes(self) -> bool: |
571 | 575 | """Obtain the value of yes. |
572 | 576 |
|
@@ -982,13 +986,19 @@ def set_up_ssh_access(self, agentpool: AgentPool) -> AgentPool: |
982 | 986 | self._ensure_agentpool(agentpool) |
983 | 987 |
|
984 | 988 | ssh_access = self.context.get_ssh_access() |
| 989 | + sku_name = self.context.get_sku_name() |
985 | 990 | if ssh_access is not None: |
986 | 991 | if agentpool.security_profile is None: |
987 | 992 | agentpool.security_profile = self.models.AgentPoolSecurityProfile() # pylint: disable=no-member |
988 | 993 | agentpool.security_profile.ssh_access = ssh_access |
989 | 994 | if ssh_access == CONST_SSH_ACCESS_LOCALUSER: |
990 | | - logger.warning("The new node pool will enable SSH access, recommended to use '--ssh-access disabled' " |
991 | | - "option to disable SSH access for the node pool to make it more secure.") |
| 995 | + if sku_name == CONST_MANAGED_CLUSTER_SKU_NAME_AUTOMATIC: |
| 996 | + logger.warning("--disable-ssh is in preview by the time automatic is GA") |
| 997 | + else: |
| 998 | + logger.warning( |
| 999 | + "The new node pool will enable SSH access, recommended to use " |
| 1000 | + "'--ssh-access disabled' option to disable SSH access for the node pool to make it more secure." |
| 1001 | + ) |
992 | 1002 | return agentpool |
993 | 1003 |
|
994 | 1004 | def set_up_skip_gpu_driver_install(self, agentpool: AgentPool) -> AgentPool: |
|
0 commit comments