Skip to content

Commit 68f52b5

Browse files
committed
editing
1 parent b7a34ab commit 68f52b5

3 files changed

Lines changed: 8 additions & 43 deletions

File tree

src/connectedk8s/azext_connectedk8s/custom.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1306,7 +1306,8 @@ def install_helm_client(cmd: CLICommand) -> str:
13061306

13071307
# Download compressed Helm binary if not already present
13081308
if not os.path.isfile(install_location):
1309-
# Creating the helm folder if it doesnt exist
1309+
# The archive is downloaded to ~/.azure/helm/<version>/<archive-file>.
1310+
# Ensure the <version> directory exists first to avoid file-not-found errors.
13101311
if not os.path.exists(download_location):
13111312
try:
13121313
os.makedirs(download_location)
@@ -1326,6 +1327,7 @@ def install_helm_client(cmd: CLICommand) -> str:
13261327
retry_count = 3
13271328
retry_delay = 5
13281329
if arch == "arm64":
1330+
# ARM64 Helm binaries are downloaded from the official Helm distribution.
13291331
official_helm_url = f"https://get.helm.sh/{download_file_name}"
13301332
download_location_file = os.path.expanduser(
13311333
os.path.join(download_location, download_file_name)
@@ -1349,6 +1351,7 @@ def install_helm_client(cmd: CLICommand) -> str:
13491351
)
13501352
time.sleep(retry_delay)
13511353
else:
1354+
# Non-ARM64 binaries continue to use MCR artifacts for existing behavior.
13521355
mcr_url = utils.get_mcr_path(cmd.cli_ctx.cloud.endpoints.active_directory)
13531356

13541357
client = oras.client.OrasClient(hostname=mcr_url)

src/connectedk8s/azext_connectedk8s/tests/latest/test_custom.py

Lines changed: 0 additions & 41 deletions
This file was deleted.

src/k8s-extension/azext_k8s_extension/custom.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,8 @@ def install_helm_client(cmd: CLICommand) -> str:
751751

752752
# Download compressed Helm binary if not already present
753753
if not os.path.isfile(install_location):
754-
# Creating the helm folder if it doesnt exist
754+
# The archive is downloaded to ~/.azure/helm/<version>/<archive-file>.
755+
# Ensure the <version> directory exists first to avoid file-not-found errors.
755756
if not os.path.exists(download_location):
756757
try:
757758
os.makedirs(download_location)
@@ -771,6 +772,7 @@ def install_helm_client(cmd: CLICommand) -> str:
771772
retry_count = 3
772773
retry_delay = 5
773774
if arch == "arm64":
775+
# ARM64 Helm binaries are downloaded from the official Helm distribution.
774776
official_helm_url = f"https://get.helm.sh/{download_file_name}"
775777
download_location_file = os.path.expanduser(
776778
os.path.join(download_location, download_file_name)
@@ -794,6 +796,7 @@ def install_helm_client(cmd: CLICommand) -> str:
794796
)
795797
time.sleep(retry_delay)
796798
else:
799+
# Non-ARM64 binaries continue to use MCR artifacts for existing behavior.
797800
mcr_url = utils.get_mcr_path(cmd.cli_ctx.cloud.endpoints.active_directory)
798801

799802
client = oras.client.OrasClient(hostname=mcr_url)

0 commit comments

Comments
 (0)