During a Helm chart installation or upgrade, the deployment fails with the following status details:
Error Code: CNF130002
Message: Helm Instantiation Failed. Reason: Helm Chart could not be deployed.
Internal Message: CNF install failed: Unable to continue with install: CustomResourceDefinition "###########.extensions.istio.io" 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 "<expected-release>": current value is "<old-release>"
TCP: 5.x, TCA: 3.x
This is a Helm ownership conflict. The Helm chart you are deploying contains the wasmplugins.extensions.istio.io CustomResourceDefinition (CRD). However, this CRD already exists in the Kubernetes cluster and is annotated as belonging to a previous or different Helm release. Because the meta.helm.sh/release-name and meta.helm.sh/release-namespace annotations do not match the incoming deployment, Helm refuses to overwrite or adopt the resource for safety reasons.
There are two ways to resolve this issue. The Patching Method is recommended for production environments as it preserves existing configurations. The Deletion Method should only be used in fresh environments.
Method 1: Patch CRD Annotations (Recommended) You must force Helm to adopt the existing CRD by updating its metadata to match the new release.
Identify your new Helm release name and the target namespace from your deployment configuration.
Run the following kubectl commands to update the annotations and labels (replace <YOUR_NEW_RELEASE_NAME> and <YOUR_HELM_NAMESPACE> with your specific values):
# Update the release-name annotationkubectl annotate crd wasmplugins.extensions.istio.io meta.helm.sh/release-name="<YOUR_NEW_RELEASE_NAME>" --overwrite
# Update the release-namespace annotationkubectl annotate crd wasmplugins.extensions.istio.io meta.helm.sh/release-namespace="<YOUR_HELM_NAMESPACE>" --overwrite
# Label the resource as managed by Helmkubectl label crd wasmplugins.extensions.istio.io app.kubernetes.io/managed-by="Helm" --overwrite
Method 2: Delete and Recreate (Destructive) Warning: Only perform this step if you are certain no existing workloads depend on the current CRD configuration, as this will drop existing custom resources associated with it.
Delete the conflicting CRD from the cluster:
kubectl delete crd wasmplugins.extensions.istio.io
Retry the CNF instantiation after following one of these methods
For further assistance, please contact Broadcom Support.