Giter Site home page Giter Site logo

Comments (5)

dtomcej avatar dtomcej commented on August 24, 2024

Good catch.

We should add the helm resource policy for that:

helm/helm#1875

https://helm.sh/docs/howto/charts_tips_and_tricks/#tell-helm-not-to-uninstall-a-resource

however, if helm creates it, and doesn't delete it, then it becomes orphaned, and may cause issues with the second helm install.

@jasperkuperus Is there a situation that you would delete and then re-install? or is allowing your PVC to remain after the delete so that you can back it up etc would be sufficient?

from traefik-helm-chart.

jasperkuperus avatar jasperkuperus commented on August 24, 2024

I've had situations where I'd do a helm delete to get a cluster down quickly, or when helm wasn't able to upgrade the cluster. Then a clean slate with a clean install is the solution for me sometimes. It's not so much for backups, I just want the physical disk to stay in place, so I don't loose my certificates.

I have currently solved it by creating my own PVC:

{{ if .Values.global.tls }}
apiVersion: v1
kind: PersistentVolume
metadata:
  name: {{ .Release.Name }}-lets-encrypt-cert-volume
spec:
  storageClassName: ""
  capacity:
    storage: 10G
  accessModes:
    - ReadWriteMany
  gcePersistentDisk:
    pdName: {{ .Release.Name }}-lets-encrypt-cert-volume
    fsType: ext4
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: {{ .Release.Name }}-lets-encrypt-cert-volume-claim
spec:
  # It's necessary to specify "" as the storageClassName
  # so that the default storage class won't be used, see
  # https://kubernetes.io/docs/concepts/storage/persistent-volumes/#class-1
  storageClassName: ""
  volumeName: {{ .Release.Name }}-lets-encrypt-cert-volume
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: 10G
{{ end }}

Removing the kubernetes volume/pvc is not a problem for me. But the actual disk for this volume/pvc is.

from traefik-helm-chart.

jasperkuperus avatar jasperkuperus commented on August 24, 2024

I tried the resource policy btw, which did not help me. The solution as described in my previous comment keeps the disk alive, but makes it possible to remove the pvc/volume. I see there's some GCP specific stuff in there. Not sure if we could do without.

from traefik-helm-chart.

jakubhajek avatar jakubhajek commented on August 24, 2024

Hello @jasperkuperus

Thanks for pointing out that. It is already implemented in #389 by using the specific resource-policy helm.sh/resource-policy: keep. Saying that in a simple word - uninstalling the chart will not remove the Traefik PVC.

from traefik-helm-chart.

jasperkuperus avatar jasperkuperus commented on August 24, 2024

Hello @jasperkuperus

Thanks for pointing out that. It is already implemented in #389 by using the specific resource-policy helm.sh/resource-policy: keep. Saying that in a simple word - uninstalling the chart will not remove the Traefik PVC.

That's great! I'm not really in a position to test this out any time soon though. But if that PR covers it, I guess we can close this issue for now.

from traefik-helm-chart.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.