Skip to content

Add ARM64 support for Helm installation in connectedk8s#34

Open
ashnanze wants to merge 14 commits intomainfrom
arm64-updates
Open

Add ARM64 support for Helm installation in connectedk8s#34
ashnanze wants to merge 14 commits intomainfrom
arm64-updates

Conversation

@ashnanze
Copy link
Copy Markdown

@ashnanze ashnanze commented Feb 26, 2026

Summary

  • Bumps Helm version from v3.12.2 to v3.20.1.
  • Detects host architecture via platform.machine() (maps aarch64/arm64 to arm64, defaults to amd64).
  • Uses the detected architecture in all Helm artifact tags, download file names, and install paths (previously hardcoded to amd64).
  • Adds _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.
  • Ensures the versioned local download directory exists before saving the Helm archive.

Why

  • Enables az connectedk8s connect to work on ARM64 machines by downloading the correct Helm binary.
  • Previously, ARM64 hosts would download the AMD64 binary, which would fail to execute. 

Validation

  • Built and installed the updated extension .whl.
  • Validated behavior on an ARM64 VM.
  • Validated behavior on an AMD64 VM.
  • Both VMs successfully completed az connectedk8s connect.
  • Confirmed the updated Helm installation flow works across both architectures.

Directory handling note

  • This fix also addresses a latent path issue in Helm download setup.
  • The download target file path is ~/.azure/helm/<version>/<archive-file>.
  • Previous logic only created the parent directory ~/.azure/helm, not the required version subdirectory ~/.azure/helm/<version>.
  • Failures occurred when ~/.azure/helm/<version> was missing, even if ~/.azure/helm already existed.
  • It could appear to work when that specific <version> directory had already been created by a prior run.
  • The fix now creates download_location (~/.azure/helm/<version>) directly before download.

@github-actions
Copy link
Copy Markdown

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).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

@github-actions
Copy link
Copy Markdown

CodeGen Tools Feedback Collection

Thank 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

@ashnanze ashnanze changed the title Add ARM64 support for Helm installation in connectedk8s and k8s-extension Add ARM64 support in connectedk8s and k8s-extension Feb 26, 2026
@ashnanze ashnanze changed the title Add ARM64 support in connectedk8s and k8s-extension Add ARM64 support for Helm installation in connectedk8s and k8s-extension Feb 26, 2026
@bgriddaluru bgriddaluru requested a review from Copilot February 26, 2026 20:15
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +711 to +714
if machine_type.lower() in ("aarch64", "arm64"):
arch = "arm64"
else:
arch = "amd64"

This comment was marked as outdated.

@AzureArcForKubernetes AzureArcForKubernetes deleted a comment from Copilot AI Mar 3, 2026
@ashnanze ashnanze changed the title Add ARM64 support for Helm installation in connectedk8s and k8s-extension Add ARM64 support for Helm installation in connectedk8s Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants