Skip to content

Commit a3b1906

Browse files
committed
Merge branch 'main' of https://github.com/Azure/azure-cli-extensions into remove-agent-from-aks-preview
2 parents c698aa6 + 40ef8c9 commit a3b1906

8 files changed

Lines changed: 1190 additions & 1363 deletions

File tree

src/aks-preview/HISTORY.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,14 @@ To release a new version, please select a new version number (usually plus 1 to
1212
Pending
1313
+++++++
1414

15-
18.0.0b29
15+
18.0.0b30
1616
+++++++
1717
* Remove interactive AI-powered debugging tool `az aks agent`.
1818

19+
18.0.0b29
20+
+++++++
21+
* Refactor code to suppress ssh access warning message when creating an automatic cluster.
22+
1923
18.0.0b28
2024
+++++++
2125
* Add interactive AI-powered debugging tool `az aks agent`.

src/aks-preview/azext_aks_preview/agentpool_decorator.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -987,18 +987,17 @@ def set_up_ssh_access(self, agentpool: AgentPool) -> AgentPool:
987987

988988
ssh_access = self.context.get_ssh_access()
989989
sku_name = self.context.get_sku_name()
990+
if sku_name and sku_name.lower() == CONST_MANAGED_CLUSTER_SKU_NAME_AUTOMATIC:
991+
return agentpool
990992
if ssh_access is not None:
991993
if agentpool.security_profile is None:
992994
agentpool.security_profile = self.models.AgentPoolSecurityProfile() # pylint: disable=no-member
993995
agentpool.security_profile.ssh_access = ssh_access
994996
if ssh_access == CONST_SSH_ACCESS_LOCALUSER:
995-
if sku_name == CONST_MANAGED_CLUSTER_SKU_NAME_AUTOMATIC:
996-
logger.warning("SSH access is in preview")
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-
)
997+
logger.warning(
998+
"The new node pool will enable SSH access, recommended to use "
999+
"'--ssh-access disabled' option to disable SSH access for the node pool to make it more secure."
1000+
)
10021001
return agentpool
10031002

10041003
def set_up_skip_gpu_driver_install(self, agentpool: AgentPool) -> AgentPool:

src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_automatic_sku.yaml

Lines changed: 1122 additions & 1347 deletions
Large diffs are not rendered by default.

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1115,11 +1115,7 @@ def test_set_up_ssh_access_logs_warning_for_automatic(self):
11151115
# Construct and attach the agentpool using the correct method
11161116
with patch("azext_aks_preview.agentpool_decorator.cf_agent_pools", return_value=Mock(list=Mock(return_value=[]))):
11171117
agentpool = dec.construct_agentpool_profile_preview()
1118-
1119-
# Now run set_up_ssh_access and assert the expected log is emitted
1120-
with self.assertLogs(level='WARNING') as log:
1121-
dec.set_up_ssh_access(agentpool)
1122-
self.assertIn("SSH access is in preview", "\n".join(log.output))
1118+
self.assertEqual(agentpool.security_profile, None)
11231119

11241120

11251121
def test_set_up_ssh_access_logs_warning_for_base(self):

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3674,7 +3674,7 @@ def test_aks_nodepool_add_with_gpu_instance_profile(
36743674
@live_only() # live only due to workspace is not mocked correctly and role assignment is not mocked
36753675
@AllowLargeResponse()
36763676
@AKSCustomResourceGroupPreparer(
3677-
random_name_length=17, name_prefix="clitest", location="eastus2"
3677+
random_name_length=17, name_prefix="clitest", location="westus2"
36783678
)
36793679
def test_aks_automatic_sku(self, resource_group, resource_group_location):
36803680
# reset the count so in replay mode the random names will start with 0

src/aks-preview/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
from setuptools import find_packages, setup
1111

12-
VERSION = "18.0.0b29"
12+
VERSION = "18.0.0b30"
1313

1414
CLASSIFIERS = [
1515
"Development Status :: 4 - Beta",

src/containerapp/azext_containerapp/_params.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,5 +525,5 @@ def load_arguments(self, _):
525525
c.argument('min_replicas', options_list=['--min-replicas'], type=int, deprecate_info=c.deprecate(hide=True, expiration='2.78.0'), help="The workload profile minimum instances is used instead.")
526526
c.argument('max_replicas', options_list=['--max-replicas'], type=int, deprecate_info=c.deprecate(hide=True, expiration='2.78.0'), help="The workload profile maximum instances is used instead.")
527527
c.argument('termination_grace_period', options_list=['--termination-grace-period', '-t'], type=int, help="Time in seconds to drain requests during ingress shutdown. Default 500, minimum 0, maximum 3600.")
528-
c.argument('request_idle_timeout', options_list=['--request-idle-timeout'], type=int, help="Timeout in minutes for idle requests. Default 4, minimum 1.")
528+
c.argument('request_idle_timeout', options_list=['--request-idle-timeout'], type=int, help="Timeout in minutes for idle requests. Default 4, minimum 4, maximum 30.")
529529
c.argument('header_count_limit', options_list=['--header-count-limit'], type=int, help="Limit of http headers per request. Default 100, minimum 1.")

src/index.json

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14817,6 +14817,59 @@
1481714817
"version": "18.0.0b28"
1481814818
},
1481914819
"sha256Digest": "fba489d2db98baa01d01cee7b6f1e96707f48089508b3eb803200c338ee293ab"
14820+
},
14821+
{
14822+
"downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/aks_preview-18.0.0b29-py2.py3-none-any.whl",
14823+
"filename": "aks_preview-18.0.0b29-py2.py3-none-any.whl",
14824+
"metadata": {
14825+
"azext.isPreview": true,
14826+
"azext.minCliCoreVersion": "2.61.0",
14827+
"classifiers": [
14828+
"Development Status :: 4 - Beta",
14829+
"Intended Audience :: Developers",
14830+
"Intended Audience :: System Administrators",
14831+
"Programming Language :: Python",
14832+
"Programming Language :: Python :: 3",
14833+
"Programming Language :: Python :: 3.6",
14834+
"Programming Language :: Python :: 3.7",
14835+
"Programming Language :: Python :: 3.8",
14836+
"License :: OSI Approved :: MIT License"
14837+
],
14838+
"extensions": {
14839+
"python.details": {
14840+
"contacts": [
14841+
{
14842+
"email": "azpycli@microsoft.com",
14843+
"name": "Microsoft Corporation",
14844+
"role": "author"
14845+
}
14846+
],
14847+
"document_names": {
14848+
"description": "DESCRIPTION.rst"
14849+
},
14850+
"project_urls": {
14851+
"Home": "https://github.com/Azure/azure-cli-extensions/tree/main/src/aks-preview"
14852+
}
14853+
}
14854+
},
14855+
"extras": [],
14856+
"generator": "bdist_wheel (0.30.0)",
14857+
"license": "MIT",
14858+
"metadata_version": "2.0",
14859+
"name": "aks-preview",
14860+
"run_requires": [
14861+
{
14862+
"environment": "python_version >= \"3.10\"",
14863+
"requires": [
14864+
"holmesgpt (==0.12.6)",
14865+
"holmesgpt==0.12.6"
14866+
]
14867+
}
14868+
],
14869+
"summary": "Provides a preview for upcoming AKS features",
14870+
"version": "18.0.0b29"
14871+
},
14872+
"sha256Digest": "48fa6b8e9e05ee528467c4918cb8cff08011ebdb5d9142aa4fd6db180fa4274d"
1482014873
}
1482114874
],
1482214875
"aksarc": [

0 commit comments

Comments
 (0)