Symptom
Re-running the installer with a different workspace name than a previous install fails at helm upgrade --install with:
Error: unable to continue with install: PriorityClass "tracebloc-data-plane" in namespace "" exists and cannot be imported into the current release: invalid ownership metadata; annotation validation error: key "meta.helm.sh/release-name" must equal "ap-workspace": current value is "arturo-local"; annotation validation error: key "meta.helm.sh/release-namespace" must equal "ap-workspace": current value is "arturo-local"
Reported by an operator (Arturo) on 2026-05-26 — first install used workspace arturo-local, second install used ap-workspace.
Root cause
PriorityClass is cluster-scoped. The chart correctly annotates it with helm.sh/resource-policy: keep (client/templates/priority-class.yaml:11) so helm uninstall doesn't yank it out from under sibling releases. But Helm's other side of that coin is: when a release with a different name tries to render the same cluster-scoped resource, Helm refuses to "adopt" it because the stored ownership annotations (meta.helm.sh/release-name, meta.helm.sh/release-namespace) don't match.
Result: a perfectly normal "I want to rename my workspace" flow becomes a hard failure with a Helm-shaped error message that the target user (an ML operator running a one-line installer) has no realistic way to diagnose.
Current workaround
Three manual options, none discoverable from the installer output:
- Re-use the same workspace name as the previous install.
- Re-stamp the PriorityClass ownership annotations to match the new release name + namespace, then re-run.
helm uninstall <old-release> + kubectl delete priorityclass tracebloc-data-plane, then re-run.
Proposed fix
Have install-client-helm.sh detect the case before helm upgrade --install and adopt the existing PriorityClass automatically:
# In install-client-helm.sh, before the helm upgrade --install call:
if kubectl get priorityclass tracebloc-data-plane -o json 2>/dev/null \
| jq -e '.metadata.annotations["meta.helm.sh/release-name"]' >/dev/null; then
existing_release=$(kubectl get priorityclass tracebloc-data-plane \
-o jsonpath='{.metadata.annotations.meta\.helm\.sh/release-name}')
if [[ "$existing_release" != "$TB_NAMESPACE" ]]; then
log "Adopting existing tracebloc-data-plane PriorityClass (was owned by '$existing_release')"
kubectl annotate --overwrite priorityclass tracebloc-data-plane \
"meta.helm.sh/release-name=$TB_NAMESPACE" \
"meta.helm.sh/release-namespace=$TB_NAMESPACE"
kubectl label --overwrite priorityclass tracebloc-data-plane \
app.kubernetes.io/managed-by=Helm
fi
fi
Safe because the chart re-renders identical PriorityClass content regardless of which release "owns" it — only the ownership annotations differ, and Helm only inspects those.
Acceptance criteria
Notes
- Same problem will recur for any other cluster-scoped resource the chart introduces in the future (ClusterRole, StorageClass with
helm.sh/resource-policy: keep, etc.). Worth factoring the adoption logic into a small helper that takes (kind, name) as args so future cluster-scoped resources can be added to the list without re-implementing it.
- The chart's
helm.sh/resource-policy: keep choice is correct and should stay — this is purely an installer-side fix.
Symptom
Re-running the installer with a different workspace name than a previous install fails at
helm upgrade --installwith:Reported by an operator (
Arturo) on 2026-05-26 — first install used workspacearturo-local, second install usedap-workspace.Root cause
PriorityClassis cluster-scoped. The chart correctly annotates it withhelm.sh/resource-policy: keep(client/templates/priority-class.yaml:11) sohelm uninstalldoesn't yank it out from under sibling releases. But Helm's other side of that coin is: when a release with a different name tries to render the same cluster-scoped resource, Helm refuses to "adopt" it because the stored ownership annotations (meta.helm.sh/release-name,meta.helm.sh/release-namespace) don't match.Result: a perfectly normal "I want to rename my workspace" flow becomes a hard failure with a Helm-shaped error message that the target user (an ML operator running a one-line installer) has no realistic way to diagnose.
Current workaround
Three manual options, none discoverable from the installer output:
helm uninstall <old-release>+kubectl delete priorityclass tracebloc-data-plane, then re-run.Proposed fix
Have
install-client-helm.shdetect the case beforehelm upgrade --installand adopt the existing PriorityClass automatically:Safe because the chart re-renders identical PriorityClass content regardless of which release "owns" it — only the ownership annotations differ, and Helm only inspects those.
Acceptance criteria
install-k8s.sh(orinstall.sh) with a new workspace name when a previous workspace exists succeeds without manualkubectlintervention.install.ps1/install-k8s.ps1if PowerShell installer follows the same flow.helm template+ manualkubectl applysetup, since helm-unittest can't simulate cluster state).Notes
helm.sh/resource-policy: keep, etc.). Worth factoring the adoption logic into a small helper that takes(kind, name)as args so future cluster-scoped resources can be added to the list without re-implementing it.helm.sh/resource-policy: keepchoice is correct and should stay — this is purely an installer-side fix.