Closed jlpedrosa closed 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:
Backward compatibility: The changes break all current installations because the PVC generated by the StatefulSet has its own suffix related to the replica number. This could cause significant issues for existing setups.
The creation of a single PVC for all replicas could pose a problem in the current default configuration. In scenarios where multiple instances are running, modes such as ReadOnlyMany or ReadWriteMany must be used. This adjustment might not be suitable for all use cases.
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.
@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.
@pajikos https://github.com/pajikos/home-assistant-helm-chart/pull/48 I think this PR ticks all the boxes.
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.