Conversation
Signed-off-by: Dmytro Artamonov <artamonovdima355@gmail.com>
Signed-off-by: Dmytro Artamonov <artamonovdima355@gmail.com>
Signed-off-by: Dmytro Artamonov <artamonovdima355@gmail.com>
Signed-off-by: Dmytro Artamonov <artamonovdima355@gmail.com>
Signed-off-by: Dmytro Artamonov <artamonovdima355@gmail.com>
Signed-off-by: Dmytro Artamonov <artamonovdima355@gmail.com>
Signed-off-by: Dmytro Artamonov <artamonovdima355@gmail.com>
Signed-off-by: Dmytro Artamonov <artamonovdima355@gmail.com>
Signed-off-by: Dmytro Artamonov <artamonovdima355@gmail.com>
Signed-off-by: Dmytro Artamonov <artamonovdima355@gmail.com>
Signed-off-by: Dmytro Artamonov <artamonovdima355@gmail.com>
Signed-off-by: Dmytro Artamonov <artamonovdima355@gmail.com>
Signed-off-by: Dmytro Artamonov <artamonovdima355@gmail.com>
Signed-off-by: Dmytro Artamonov <artamonovdima355@gmail.com>
4691cd5 to
e5d63e6
Compare
|
This PR also changes deployment to statefulset for non-cluster use cases. While it is not a compatible change I believe statefulset is more suitable for valkey workloads |
|
Thanks for submitting the PR. I would prefer a single chart to make it more consistent, but I understand that Valkey Cluster is quite different. I'll take a closer look on this chart this week. |
Signed-off-by: Dmytro Artamonov <artamonovdima355@gmail.com>
8e084de to
93ac771
Compare
|
We've been kicking the tyres on this PR, and it looks very promising. We'd love to see this PR accepted. A few thoughts (not all related specifically to this PR):
During testing I refactored this PR locally to configure with however until cluster mode supports a more arbitrary configuration then I don't think there is any benefit to this separation. |
Signed-off-by: Dmytro Artamonov <artamonovdima355@gmail.com>
|
@sgissi |
|
Hi @qjsoq, currently we are working on Replication and Sentinel, with Cluster being the next target. Ideally, I would like to keep a single chart to keep consistency and avoid repeating work across the two charts. At this point, I don't know yet if that is feasible or not. I estimate it will be a few weeks still until we are ready to review Cluster mode. |
|
Wouldn't it be slightly more optimal if there is |
Signed-off-by: Dmytro Artamonov <artamonovdima355@gmail.com>
Signed-off-by: Dmytro Artamonov <artamonovdima355@gmail.com>
bb7102b to
e8afc2d
Compare
This pull request introduces a new, comprehensive Helm chart named valkey-cluster for deploying a clustered Valkey instance on Kubernetes.
This chart is designed to handle the complexities of a clustered setup by leveraging a StatefulSet and an intelligent initialization script.
What This PR Does:
How the Auto-Clustering Works
The core of the cluster logic resides in the
init-cluster.shscript, which runs as a background process in the main container:Peer Discovery: Each pod uses the Kubernetes headless service to discover its peers.
Joining an Existing Cluster: If a new pod starts and discovers an already healthy cluster, it uses the
CLUSTER MEETcommand to join. It then intelligently finds a master with a deficit of replicas and assigns itself as a replica usingCLUSTER REPLICATE.Initial Cluster Creation: If no cluster is found, the first pod (-0) takes on the role of the initiator. It waits for all other pods to become ready and then bootstraps the entire cluster using the
valkey-cli --cluster createcommand with the appropriate number of replicas.Resiliency: The script can handle pods restarting by attempting to re-join the cluster and forget its old failed entry if necessary.
Here are some screenshots demonstrating the chart in action after a successful deployment.
For deployment these settings were set:
This shows the successful formation of a 6-node cluster (3 masters, 3 replicas).
This confirms that the StatefulSet has successfully created all pods and their corresponding PersistentVolumeClaims.