-
-
Notifications
You must be signed in to change notification settings - Fork 77
Description
Describe the bug
Hi, I joined a new team in the process of deploying your product to automatically stop and start some software stacks running in Kubernetes, depending on your great open-source software.
My coworker deployed Sablier as a StatefulSet, with only one replica, a PVC, and the file storage feature activated. This setup effectively maintains its state across restarts, making it somewhat functional.
However, it is quite a sub-optimal setup for Kubernetes. Since it is a StatefulSet with one replica, updating Sablier or just losing the pod means the whole Sablier service becomes unavailable for a while.
The StatefulSet with one replica is necessary because the state is saved in memory in the tinykv store. If we have several Sablier pods with a random load balancer (i.e., what you have with a Deployment and N replicas), the state would be inconsistent between pods, leading to premature stops for some apps.
I find all of this a bit brittle for a good Kubernetes deployment, ideally using as many stateless pods as possible with a remote distributed store. Another solution is to have a truly stateful Sablier app, with built-in clustering. And a last one would be going full into a Kubernetes Operator, using CRD and leases to acheive HA and leader election.
Anyway, here are my questions:
- Are you aware of these limitations regarding using Sablier in Kubernetes? If yes, should we amend the documentation accordingly, and also change the official Helm chart which tries to deploy a Deployment for an inherently stateful app?
- Do you have any plans to have better support for an HA deployment on Kubernetes, either by having an external kvstore such as Redis, or going more into a Kubernetes operator, with CRD and leases?
I think that your tool is a very interesting approach for on-demand environments and a good way to reduce load in cloud environments. I would be happy to help better support this kind of usage on Kubernetes.
Here is some context, but my point is quite agnostic of the version/reverse proxy used.
Context
Sablier version: 1.8.1
Provider: Kubernetes
Reverse proxy: Traefik v2.11
Running as a StatefulSet in Kubernetes
Anyway, thanks for your time on this FOSS software!