Skip to content

Removal of Persistent Volumes #1875

Closed
Closed

Description

@wclr

I understand that it is quite expected behavior of helm to delete all the resources that were created while installation, but isn't unsafe to remove persistent volumes (and claims as well)?

Maybe after release deletion I would like old volumes to be assosiated with newly created resources. What do you think?

Activity

  1. technosophos commented on Jan 26, 2017

    @technosophos
    Member

    I was under the impression that we did not remove the underlying volume/claim. Is that right @viglesiasce ?

    EDIT: Oh, and there is an annotation for preserving resources that you don't want deleted. You can add the annotation: "helm.sh/resource-policy": keep. We might need to document that somewhere.

  2. wclr commented on Jan 26, 2017

    @wclr
    Author

    you mean anotation to PVC resource? But it is not very convenient with 3rd party charts right? For example what should be done with mongodb chart?

  3. wclr commented on Jan 30, 2017

    @wclr
    Author
  4. viglesiasce commented on Jan 30, 2017

    @viglesiasce
    Contributor

    When using StatefulSets the PVCs will be left alone.

    If using the PVC template in the chart then it will be deleted. We should add resource-policy: keep to the charts where we think it should be implemented although deleting the release is an indication that you want all of the resources to be deleted.

  5. technosophos commented on Jan 30, 2017

    @technosophos
    Member

    I guess the suggestion, then, is to fork charts and modify them on your own.

  6. viglesiasce commented on Jan 30, 2017

    @viglesiasce
    Contributor

    ...and then submit that change back as PR to the charts repo.

  7. technosophos commented on Feb 14, 2017

    @technosophos
    Member

    I think we should probably make it a best-practice to add this annotation to every chart that uses a PVC:

    "helm.sh/resource-policy": {{ default "keep" .Values.resourcePolicy }}
    

    Or, if we prefer, the default can be "delete". But the idea is to make it so that there is always a clear path for the user to toggle this.

    /cc @prydonius

    Edit: See helm/charts#44

  8. InAnimaTe commented on Feb 21, 2017

    @InAnimaTe

    I do the like the model of letting the user define this via annotation. I think we might want to make the default to keep them around unless the annotation is set. The other question is how to handle a --purge here, as I'd think most users would expect EVERYTHING to be forcibly removed on purge. Although, what if I want all the rollback configsets removed but not my PVC?

  9. technosophos commented on Feb 24, 2017

    @technosophos
    Member

    Yeah, I think we'd have to assume that if you say you want to keep the PVC, that means you don't ever want Helm to delete it.

  10. wclr commented on Jul 10, 2017

    @wclr
    Author

    Removal of PV created via PVC is still controlled not by heml, it is defined by reclaim policy on PV, should be Retain, but setting it via PVC annotations is not supported yet.

    May be can be closed.

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