Hide AKS-managed RGs from workspace selectors¶
Motivation¶
When AKS provisions a cluster it auto-creates a separate "node" resource
group that holds VMSS / NICs / disks / NSGs. By default this RG is named
MC_<workloadRG>_<clusterName>_<region> and is owned by AKS — users
must never select it as an ElasticBLAST workspace because the dashboard
cannot manage it independently of the parent AKS resource.
The auto-discovery flow was nevertheless surfacing the MC_ RG in two places:
- The BLAST Workspaces Found picker on first load listed
MC_rg-elb-01_elb-cluster_koreacentralalongside the realrg-elb-01workspace, because the MC_ RG happened to inherit at least oneelb-*tag. - The dashboard top-bar Workload RG dropdown also offered the MC_ RG as a selectable option.
User-facing change¶
- The workspace picker now omits AKS-managed node RGs entirely (they are not workspaces — there is no useful "pick" action for them).
- The Workload RG dropdown still shows AKS-managed RGs (so users can
see they exist) but renders them disabled with the description
<location> · AKS-managed (node RG).
Implementation¶
- New helper web/src/lib/aksManagedRg.ts
exports
isAksManagedResourceGroup({ name, tags }). It flags any RG carrying theaks-managed-cluster-nametag (definitive — set by AKS itself) or whose name starts withMC_(default node-RG naming). - web/src/pages/Dashboard/configFromTags.ts
short-circuits to
nullfor AKS-managed RGs, so the workspace picker never sees them. - web/src/components/ConfigBar.tsx
classifies each RG into
aks-managed/no elb-* tag/selectableand disables the first two with appropriate descriptions.
Validation¶
npx vitest run src/lib/aksManagedRg.test.ts— 4 tests pass (MC_ prefix,aks-managed-cluster-nametag, ordinary workspace RG, false positive onrg-MC_…middle-of-name).npx tsc --noEmit— clean.