Skip to content

Unexpected Behavior: Changing ownership of resource via 'meta.helm.sh/release-name' still leads to deletion by previous owner #12683

Closed

Description

@mcquackers

helm version`:
version.BuildInfo{Version:"v3.13.0", GitCommit:"825e86f6a7a38cef1112bfa606e4127a706749b1", GitTreeState:"clean", GoVersion:"go1.20.8"}

Output of kubectl version:
Client Version: v1.28.3
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.24.17-eks-8cb36c9

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

Details:
I'm transitioning ownership of a simple Configuration Map away from one release and to another.
Expected plan of transition:

  • kubectl patch cm --patch '{"metadata":{"annotations": {"meta.helm.sh/release-name": "<new owner release name>"}}}'
  • kubectl get cm -o jsonpath='{.metadata.annotations}' -> confirm annotation changed (release-namespace has not changed)
  • helm upgrade --install <new release name> -> No issues, views CM as part of its release
  • reconfirm CM release-name annotation
  • Delete CM yaml file from old owner release charts
  • Deploy updated release for old owner

Expected result:
The CM does not get deleted

Actual result:
The CM gets deleted.

I expected that as part of 7649 that the old owner would not attempt to delete a resource that it doesn't own.

Activity

  1. gjenkins8 commented on Jan 5, 2024

    @gjenkins8
    Member

    #7649 just enables Helm to adopt resources. I don't think any functionality was added that prevents Helm from deleting previously owned / "now adopted" resources. Indeed, Helm tracks the resources it does own (as part of the manifest), and deletes these.

    If support for disowning resources is desired, I think that needs to be proposed (and implemented)(unless I'm mistaken, and that is part of #7649 and I missed that detail).

  2. github-actions commented on Apr 5, 2024

    @github-actions

    This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions