Add ARM64 support for Helm installation in connectedk8s#34
Add ARM64 support for Helm installation in connectedk8s#34
Conversation
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
CodeGen Tools Feedback CollectionThank you for using our CodeGen tool. We value your feedback, and we would like to know how we can improve our product. Please take a few minutes to fill our codegen survey |
68f52b5 to
10c0313
Compare
There was a problem hiding this comment.
Pull request overview
Adds ARM64-aware Helm client installation for the connectedk8s and k8s-extension Azure CLI extensions by detecting host architecture, constructing arch-specific Helm artifact paths, and ensuring the versioned download directory exists before saving/extracting the Helm archive.
Changes:
- Detects host CPU architecture (
platform.machine()) and uses it to build Helm archive and install paths. - Adds an ARM64 download flow that pulls Helm from the official Helm distribution when running on ARM64.
- Fixes a latent directory-creation issue by creating
~/.azure/helm/<version>before downloading the archive.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
| src/k8s-extension/azext_k8s_extension/custom.py | Adds arch detection, ARM64 Helm download path, and corrects download directory creation for Helm install flow. |
| src/connectedk8s/azext_connectedk8s/custom.py | Mirrors the same ARM64-aware Helm installation updates and directory handling fix for connectedk8s. |
| if machine_type.lower() in ("aarch64", "arm64"): | ||
| arch = "arm64" | ||
| else: | ||
| arch = "amd64" |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
Summary
v3.12.2tov3.20.1.platform.machine()(mapsaarch64/arm64toarm64, defaults toamd64).amd64)._resolve_helm_pull_target()to resolve the correct OCI pull target: tries arch-specific tag first (helm-v3.20.1-linux-arm64), falls back to manifest list tag (helm-v3.20.1) with annotation-based matching.Why
az connectedk8s connectto work on ARM64 machines by downloading the correct Helm binary.Validation
.whl.az connectedk8s connect.Directory handling note
~/.azure/helm/<version>/<archive-file>.~/.azure/helm, not the required version subdirectory~/.azure/helm/<version>.~/.azure/helm/<version>was missing, even if~/.azure/helmalready existed.<version>directory had already been created by a prior run.download_location(~/.azure/helm/<version>) directly before download.