pajikos / home-assistant-helm-chart

Helm Chart for Home Assistant
MIT License
107 stars 30 forks source link

Add pvc #47

Closed jlpedrosa closed 6 months ago

jlpedrosa commented 6 months ago

This PR transform the stateful set claim template to a rendered PVC. This enables reusing existing PVCs so the data can be used between cluster re installs without restoring backups. It also enables estaticly provisioning the volumes (PV and PVC), so there's an escape hatch for the complex configuration required by home-assistant.

The PVC (instead of template) also has been augmented to allow selector and annotations.

pajikos commented 6 months ago

Hi, thank you for your contribution. I completely understand the changes you've made. However, I need to address two issues related to your changes:

I believe that creating a custom PVC can offer benefits in certain specific situations. However, for backup purposes, this might not be the ideal approach since the PVC has a predetermined name, unlike in Deployment mode where a UUID is used in the name. This means that when a new HA deployment is created, the previous PVC with the expected name will be found and reused.

To accommodate these considerations, I have created a new branch. I would suggest making the manual creation of a PVC an optional choice in the values.yaml file. This would provide flexibility and allow users to choose the best configuration for their specific needs.

jlpedrosa commented 6 months ago

@pajikos this is my train of thoughts:

Let me know what you think. BTW, doublechecked and Indeed it can be injected in the replicaset via template, instead of creating the PVC automatically.

jlpedrosa commented 6 months ago

@pajikos https://github.com/pajikos/home-assistant-helm-chart/pull/48 I think this PR ticks all the boxes.