Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle existingClaim for storage conf #123

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jusabatier
Copy link
Contributor

This PR add the ability to provide the name of an existing PVC to use for persistence.

Here I use LongHorn to manage PV/PVC, so I need this ability if I want to setup persistence.

@edevosc2c
Copy link
Member

edevosc2c commented Dec 19, 2024

What's special about your setup that wouldn't work with the already available parameters for creating a PVC?

We provide the ability to:

@jusabatier
Copy link
Contributor Author

If I use storageclass, the pvc will be created in longhorn with a random name at the pod's startup, and deleted when it terminate.

The most common method to work with longhorn is to use existingClaims to provide the PVC to use.

@edevosc2c
Copy link
Member

edevosc2c commented Dec 19, 2024

the pvc will be created in longhorn with a random name at the pod's startup

The PVC name is not random, it's actually generated here: https://github.com/georchestra/helm-georchestra/blob/main/templates/geoserver/geoserver-geodata-pvc.yaml#L7

But the PV name is random, yes that's a feature. But you should get the same result if you create a PVC "normally", that's how Kubernetes works with dynamically provisionned PVC.

and deleted when it terminate

That's not true, we have recently configured helm.sh/resource-policy: true so that if you delete the helm chart then the PVC are kept.

And about keeping the PV in case you delete the PVC, you need to create a storageclass with the parameter reclaimPolicy: Retain.

I fail to see how using an external PVC will be different from letting the helm chart manage it for you. If you have mistakenly deleted a PVC, then you can switch it back in state from "Released" to "Available" using this method: https://stackoverflow.com/a/59406641 and then assign its "random name" in pv_name parameter: https://github.com/georchestra/helm-georchestra/blob/main/values.yaml#L231


I'm available on georchestra matrix if you want to further discuss this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants