Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

Helm Chart PVC does not allow for multiple replicas or configuration changes #3258

Closed
metalsp0rk opened this issue Nov 4, 2023 · 1 comment

Comments

@metalsp0rk
Copy link

Background information

  • Dendrite version or git SHA: 317b101
  • SQLite3 or Postgres?: Postgres
  • Running in Docker?: Kubernetes
  • go version:
  • Client used (if applicable): N/A

Description

  • What is the problem: The PVC configuration for the Helm chart dendrite deployment is set to ReadWriteOnce, which prevents multiple replicas to be spun up, and additionally prevents the create -> terminate lifecycle pattern when upgrading.
  • Who is affected: Anyone using the Helm chart.
  • How is this bug manifesting: When attempting to upgrade the server or change configuration
  • When did this first appear: After making a configuration change

Steps to reproduce

  • deploy the Dendrite Helm chart
  • make a configuration change
  • the kubernetes control plane will then attempt to deploy a second pod, which gets stuck in containerCreating, causing a bad state, that requires the uninstallation of the helm chart and manual clean up of resources on the cluster.

I would expect multiple pods to be able to be launched simultaneously, but currently the PVC configuration prevents this.
I would be happy to submit a PR to address the change in the helm chart if a change is welcomed in this area.

@wrenix
Copy link
Contributor

wrenix commented Feb 8, 2024

You chould change the updateStrategy to type: Recreate to solve your problem on change config ... (i think it usefull to change that to default, i create a PR)

An change of the helm-chart to support PVC to ReadWriteMany is possible (but current no good idea, also like to change to StatefulSet with VolumneTemplate):

dendrite does not support to be run multiple times, see: #2975
for replica higher then 1 (or an HorizontalPodAutoscaler) or during update/config change.

wrenix added a commit to wrenix/dendrite that referenced this issue Feb 8, 2024
Current dendrite needs an PVC and replica of 1 is forced, so best way of update and change of configuration is to stop and start (instatt of start multiple dendrite pod with deadlock of binding pvc)

see: matrix-org#3258
wrenix added a commit to wrenix/dendrite that referenced this issue Feb 8, 2024
Current dendrite needs an PVC and replica of 1 is forced, so best way of update and change of configuration is to stop and start (instatt of start multiple dendrite pod with deadlock of binding pvc)

see: matrix-org#3258
Signed-off-by: WrenIX <dev.github@wrenix.eu>
S7evinK pushed a commit that referenced this issue Feb 28, 2024
Current dendrite needs an PVC and replica of 1 is forced, so best way of
update and change of configuration is to stop and start (instatt of
start multiple dendrite pod with deadlock of binding pvc)

see: #3258

### Pull Request Checklist

<!-- Please read
https://matrix-org.github.io/dendrite/development/contributing before
submitting your pull request -->

* [x] I have added Go unit tests or [Complement integration
tests](https://github.com/matrix-org/complement) for this PR _or_ I have
justified why this PR doesn't need tests
* [x] Pull request includes a [sign off below using a legally
identifiable
name](https://matrix-org.github.io/dendrite/development/contributing#sign-off)
_or_ I have already signed off privately

 Signed-off-by: `Your Name <your@email.example.org>`
 - [x] version bump of helm Chart

Signed-off-by: WrenIX <dev.github@wrenix.eu>

[skip ci]
@S7evinK S7evinK closed this as completed Feb 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants