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

* Fix `az aks update` command failing on updating the ssh key value if cluster was created without ssh key, see issue `\#5559 <https://github.com/Azure/azure-cli-extensions/issues/5559>`_.
* Mark "--enable-pod-security-policy" deprecated

0.5.115
Expand All @@ -28,7 +29,7 @@ Pending
+++++++

* Fix workload identity update error after oidc issure GA in azure-cli.
* Fix `az aks update` command failing on SP-based cluster blocked by validation in AzureMonitorMetrics Addon, see issue `\#5336 <https://github.com/Azure/azure-cli-extensions/issues/5488>`_.
* Fix `az aks update` command failing on SP-based cluster blocked by validation in AzureMonitorMetrics Addon, see issue `\#5488 <https://github.com/Azure/azure-cli-extensions/issues/5488>`_.
* Fix `az aks update` command failing on changes not related to outbound type conversion, see issue `\#24430 https://github.com/Azure/azure-cli/issues/24430>`_.

0.5.112
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3176,14 +3176,15 @@ def update_linux_profile(self, mc: ManagedCluster) -> ManagedCluster:
ssh_key_value = self.context.get_ssh_key_value_for_update()

if ssh_key_value:
if mc.linux_profile is None:
raise InvalidArgumentValueError("Updating the cluster with no ssh key set at creation is not supported")
mc.linux_profile.ssh = self.models.ContainerServiceSshConfiguration(
public_keys=[
self.models.ContainerServiceSshPublicKey(
key_data=ssh_key_value
)
]
)

return mc

def update_mc_profile_preview(self) -> ManagedCluster:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5804,6 +5804,21 @@ def test_update_azure_monitor_profile(self):
)
self.assertEqual(dec_mc_1, ground_truth_mc_1)

def test_update_linux_profile(self):
dec_1 = AKSPreviewManagedClusterUpdateDecorator(
self.cmd,
self.client,
{"ssh_key_value": "test_key"},
CUSTOM_MGMT_AKS_PREVIEW,
)
mc_1 = self.models.ManagedCluster(
location="test_location",
)
dec_1.context.attach_mc(mc_1)
# fail on cluster has no linux profile
with self.assertRaises(InvalidArgumentValueError):
dec_mc_1 = dec_1.update_linux_profile(mc_1)

def test_update_mc_profile_preview(self):
import inspect

Expand Down