@@ -37,6 +37,24 @@ Choose an installation method based on your needs:
3737helm upgrade --install toolhive-operator-crds oci://ghcr.io/stacklok/toolhive/toolhive-operator-crds
3838```
3939
40+ :::warning[ Namespace consistency]
41+
42+ When you install this chart, Helm stamps all CRDs with a
43+ ` meta.helm.sh/release-namespace ` annotation set to the namespace used at install
44+ time. This annotation ** cannot be changed** by subsequent ` helm upgrade `
45+ commands targeting a different namespace.
46+
47+ You can install this chart in any namespace, but you ** must use the same
48+ namespace consistently** for all future upgrades. If you plan to install the
49+ operator in ` toolhive-system ` , install the CRD chart there too:
50+
51+ ``` bash
52+ helm upgrade --install toolhive-operator-crds oci://ghcr.io/stacklok/toolhive/toolhive-operator-crds \
53+ -n toolhive-system --create-namespace
54+ ```
55+
56+ :::
57+
4058This command installs the latest version of the ToolHive operator CRDs Helm
4159chart. To install a specific version, append ` --version <VERSION> ` to the
4260command, for example:
@@ -480,6 +498,34 @@ Common causes include:
480498
481499</details>
482500
501+ <details>
502+ <summary>CRD upgrade fails with namespace mismatch</summary>
503+
504+ If you see an error like the following when upgrading the CRD chart :
505+
506+ ` ` ` text
507+ Error: invalid ownership metadata; annotation validation error:
508+ key "meta.helm.sh/release-namespace" must equal "toolhive-system":
509+ current value is "default"
510+ ` ` `
511+
512+ This means the CRD chart was originally installed in a different namespace than
513+ the one you're now targeting. To fix this, patch the ownership annotations on
514+ all CRDs to match your desired namespace :
515+
516+ ` ` ` bash
517+ for crd in $(kubectl get crd -o name | grep toolhive.stacklok.dev); do
518+ kubectl annotate "$crd" \
519+ meta.helm.sh/release-namespace=<TARGET_NAMESPACE> --overwrite
520+ done
521+ ` ` `
522+
523+ Replace `<TARGET_NAMESPACE>` with the namespace you want to use going forward
524+ (for example, `toolhive-system`). This is a one-time operation. After patching,
525+ future upgrades work as long as you use the same namespace consistently.
526+
527+ </details>
528+
483529<details>
484530<summary>CRDs installation fails</summary>
485531
0 commit comments