-
Notifications
You must be signed in to change notification settings - Fork 397
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
support specifying existing volume in grafana dataStorage #810
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me initially, wdyt @pb82 @addreas @NissesSenap @weisdd ?
@Iridias Can you clarify one thing for me? (laziness on my part 😉 ) What happens when a user defines a grafana CR without the volume name specified, and then the CR is updated with a new name, will the old pvc be deleted and replaced with a new one? How will data persistence work across these?
I'm just wondering whether there's going to be some data persistence issues across CR updates. Thanks!
Also many thanks for contributing to the project! 😄
What is the need for this feature @Iridias? Why not let the operator manage the PV? You can already define a storage class what else do you need? There probably is a good reason but it would be good to define it. |
When we're "updating" one of our clusters, we're in fact rather setup a new one, deploy everything on it and switch the routing (all automated of course). But this leads to the situation, that everything that is not stored on a volume/storage outside the cluster, will be lost.
I would assume, that the PVC will be updated, but the previously created PV will be deleted - as the default reclaim-policy is "Delete". Have not tested it tough. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds very reasonable. We do the same thing but currently we don't store any data in PVC:s that is worth saving.
Put a minor comment.
LGTM, thanks allot for your contribution @Iridias, I did a minor change in the example so it works out of the box with the ingress config. |
Description
In order to reference an existing volume (e.g. for a specific blob/file-storage) it must be possible to specify the volumeName in the PVC.
The PVC will be created using the attributes in
Grafana.spec.dataStorage
, so I added a new attributevolumeName
that will be used when creating thePersistentVolumeClaimSpec
Type of change
Checklist
Verification steps
deploy/examples/persistentvolume/Grafana-existingVolume.yaml
)kubectl get pvc -n your-namespace