aksd: Add support for AKS Hybrid and Edge clusters#782
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds first-class support in the AKS Desktop plugin for Arc-connected AKS Hybrid & Edge clusters, including discovery via az connectedk8s list, cluster-type metadata persisted in cluster settings, and UI + pre-open flows to manage and verify the required local proxy.
Changes:
- Add an
aksarccluster discriminator + Azure metadata to persisted cluster settings, and apply a distinct Home badge appearance for Hybrid/Edge clusters. - Discover Arc-connected clusters, surface them alongside managed AKS clusters in the registration flow, and add proxy start/stop controls + a pre-open hook to automatically re-establish connectivity.
- Add unit tests/a11y tests for Arc discovery and proxy flows, plus i18n updates for new UI strings.
Reviewed changes
Copilot reviewed 34 out of 35 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| plugins/aks-desktop/src/utils/shared/clusterSettings.ts | Extend persisted cluster settings with cluster type/Azure metadata and add helper to set a distinct badge appearance. |
| plugins/aks-desktop/src/utils/azure/az-clusters.ts | Add getConnectedClusters() to discover Arc-connected clusters via az connectedk8s list. |
| plugins/aks-desktop/src/utils/azure/az-clusters.test.ts | Unit tests for getConnectedClusters() filtering + resilience behavior. |
| plugins/aks-desktop/src/utils/azure/aksHybridEdgeProxy.test.ts | Unit tests for proxy start/stop IPC intents and verification helpers. |
| plugins/aks-desktop/src/utils/azure/aks.ts | Merge managed AKS clusters with Arc-connected clusters and surface clusterType/connectivity metadata. |
| plugins/aks-desktop/src/utils/azure/aks.test.ts | Unit tests covering AKS + Arc merge and resilience to Arc discovery failure. |
| plugins/aks-desktop/src/index.tsx | Register cluster-provider menu item, dialog, and pre-open hook for Hybrid/Edge proxy lifecycle. |
| plugins/aks-desktop/src/headlamp-plugin.d.ts | Local type augmentation for the new registerClusterProviderPreOpen extension point. |
| plugins/aks-desktop/src/components/CreateAKSProject/hooks/useExtensionCheck.ts | Generalize extension-check hook to support checking/installing arbitrary az extensions. |
| plugins/aks-desktop/src/components/AksHybridEdge/AksHybridEdgeProxyControls.tsx | Add cluster menu item + dialog to start/stop and verify the Arc proxy, including portal remediation link. |
| plugins/aks-desktop/src/components/AksHybridEdge/AksHybridEdgeProxyControls.guidepup.test.tsx | Guidepup + axe a11y coverage for menu item/dialog states. |
| plugins/aks-desktop/src/components/AksHybridEdge/aksHybridEdgePreOpen.ts | Pre-open hook to auto-start/verify proxy on cluster open; also guides users for manually-added Arc-proxy contexts. |
| plugins/aks-desktop/src/components/AksHybridEdge/aksHybridEdgePreOpen.test.ts | Unit tests for Arc-proxy detection and pre-open behavior. |
| plugins/aks-desktop/src/components/AKS/RegisterAKSClusterDialogPure.tsx | Registration UI updates: show Hybrid/Edge badges, disable offline Arc clusters, and display selected cluster type. |
| plugins/aks-desktop/src/components/AKS/RegisterAKSClusterDialog.tsx | Hybrid/Edge registration path: extension gate, start proxy, verify reachability, persist metadata + badge. |
| plugins/aks-desktop/locales/en/translation.json | Add/organize new strings for Hybrid/Edge discovery + proxy UI and related messaging. |
| plugins/aks-desktop/locales/de/translation.json | Add new keys for Hybrid/Edge/proxy UI (placeholders for translation where applicable). |
| plugins/aks-desktop/locales/es/translation.json | Add new keys for Hybrid/Edge/proxy UI (placeholders for translation where applicable). |
| plugins/aks-desktop/locales/fr/translation.json | Add new keys for Hybrid/Edge/proxy UI (placeholders for translation where applicable). |
| plugins/aks-desktop/locales/id/translation.json | Add new keys for Hybrid/Edge/proxy UI (placeholders for translation where applicable). |
| plugins/aks-desktop/locales/it/translation.json | Add new keys for Hybrid/Edge/proxy UI (placeholders for translation where applicable). |
| plugins/aks-desktop/locales/ja/translation.json | Add new keys for Hybrid/Edge/proxy UI (placeholders for translation where applicable). |
| plugins/aks-desktop/locales/ko/translation.json | Add new keys for Hybrid/Edge/proxy UI (placeholders for translation where applicable). |
| plugins/aks-desktop/locales/nl/translation.json | Add new keys for Hybrid/Edge/proxy UI (placeholders for translation where applicable). |
| plugins/aks-desktop/locales/pt-BR/translation.json | Add new keys for Hybrid/Edge/proxy UI (placeholders for translation where applicable). |
| plugins/aks-desktop/locales/pt-PT/translation.json | Add new keys for Hybrid/Edge/proxy UI (placeholders for translation where applicable). |
| plugins/aks-desktop/locales/ru/translation.json | Add new keys for Hybrid/Edge/proxy UI (placeholders for translation where applicable). |
| plugins/aks-desktop/locales/sv/translation.json | Add new keys for Hybrid/Edge/proxy UI (placeholders for translation where applicable). |
| plugins/aks-desktop/locales/tr/translation.json | Add new keys for Hybrid/Edge/proxy UI (placeholders for translation where applicable). |
| plugins/aks-desktop/locales/zh-Hans/translation.json | Add new keys for Hybrid/Edge/proxy UI (placeholders for translation where applicable). |
| plugins/aks-desktop/locales/zh-Hant/translation.json | Add new keys for Hybrid/Edge/proxy UI (placeholders for translation where applicable). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
0dfcff5 to
00e2718
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 37 out of 38 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
plugins/aks-desktop/src/utils/azure/aks.ts:105
isAzureRBACEnabledis derived ascluster.aadProfile !== null, butgetClusters()returns simplified cluster objects that do not includeaadProfile. That makesundefined !== nullevaluate totrue, so clusters are incorrectly marked as Azure RBAC enabled (including AKS Hybrid & Edge entries). Use a boolean coercion (or explicit null/undefined check) instead of!== null.
00e2718 to
4de7cf3
Compare
4de7cf3 to
5fc799d
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 36 out of 37 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
plugins/aks-desktop/src/utils/shared/clusterSettings.ts:11
- The
clusterTypedoc comment says'aks'is persisted for managed clusters, but there’s no code writingclusterType: 'aks'(search inplugins/aks-desktop/srcfinds no such assignment). In this PR, managed clusters appear to be identified by an unsetclusterType, so the comment is misleading and could cause incorrect assumptions when adding future features.
8042804 to
2667333
Compare
Description
This PR adds support for adding AKS Hybrid/Edge cluster via cluster setup and manage the proxies required for accessing them.
Test Cases:
TC-01 — Add an AKS Hybrid/Edge cluster
Goal: Register an Arc-connected cluster and open it successfully.
Steps:
distinct AKS Hybrid/Edge badge.
Expected:
TC-02 — Start / Stop the proxy from the cluster menu
Goal: The cluster action-menu item starts and stops the proxy, and its label
reflects the live connection state.
Preconditions: An Arc cluster is registered (TC-01).
Steps:
cluster prompts to reconnect). Confirm no
connectedk8s proxyprocess remains (see check above).(Starting → Verifying).
Expected:
TC-03 — Restart the app; pre-open re-establishes the proxy
Goal: After a full restart (proxy is not persisted), simply opening the cluster
re-creates its proxy automatically via the pre-open hook.
Preconditions: An Arc cluster registered and previously opened (TC-01).
Steps:
connectedk8s proxy/arcproxyprocess is running (see check above).Expected:
and the cluster's resources load — with no manual proxy start required.
TC-04 — Proxy is stopped after the app is closed
Goal: Closing the app tears down all proxies (nothing left running in the background).
Preconditions: One or more Arc clusters opened with active proxies (TC-01 / TC-04).
Steps:
connectedk8s proxyprocesses are running (see check above).Expected:
connectedk8s proxyand no childarcproxydaemon processes remain, and the proxy port(s) are freed.
TC-05 — Multiple Arc clusters accessed at once (combined multi-cluster view)
Goal: Two or more Arc clusters can be selected together and viewed in the
combined multi-cluster view, which requires all their proxies to be up at once.
Preconditions: At least two Arc clusters registered (repeat TC-01).
Steps:
status shows Active (start each from the cluster menu if needed).
cluster A and Arc cluster B (multi-select checkboxes), then confirm.
e.g.
.../c/A+B/..., and the sidebar reflects multiple selected clusters).Expected:
A's (no port conflict — two proxy processes coexist).
attributed to its source cluster; no re-login or manual proxy restart is needed.
Related: #781