Skip to content

reinstall fails when resources of the same kind but different group were kept #13582

@jiashengz

Description

@jiashengz

Helm installs fails when resources of the same kind but different groups were installed previously and kept in the cluster with, for example, helm resource policy keep annotation.

An example chart is provided at https://github.com/jiashengz/helm-gvk-repro, the issue can be reproduced by checking out the repo and then do:

$ helm install test ./test
NAME: test
LAST DEPLOYED: Tue Dec 31 01:41:04 2024
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
$ helm uninstall test
These resources were kept due to the resource policy:
[Shirt] shirt
[Shirt] shirt

release "test" uninstalled
$ helm install test ./test
Error: INSTALLATION FAILED: cannot patch "shirt" with kind Shirt: shirts.stable.example.com "shirt" is invalid: metadata.resourceVersion: Invalid value: 0x0: must be specified for an update

Output of helm version:

version.BuildInfo{Version:"v3.12.3", GitCommit:"3a31588ad33fe3b89af5a2a54ee1d25bfe6eaa5e", GitTreeState:"clean", GoVersion:"go1.20.7"}

Output of kubectl version:

Client Version: v1.30.8-dispatcher
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.21.1
WARNING: version difference between client (1.30) and server (1.21) exceeds the supported minor version skew of +/-1

Cloud Provider/Platform (AKS, GKE, Minikube etc.):
KIND

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions