Easy Cluster mode on kubernetes
- Dominant language
- C#
- Stars
- 12k
- Forks
- 703
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 36
Description
### Feature request type
Kubernetes Operator, or easy config file setup for garnet
### Is your feature request related to a problem? Please describe
Using cluster mode on kubernetes is impossible without an operator to meet the other nodes in a statefulset.
Indeed, garnet uses the same cluster model as redis where stafulset/service (with clusterIP none) dns naming pattern is unknown at the config level.
### Describe the solution you'd like
provide an operator that orchestrates cluster setup, recovery, migration based on a custom CRD that describes the cluster topology :
```yaml
apiVersion: garnet.microsoft/v1
kind: GarnetCluster
metadata:
name: garnet-cluster
spec:
masterCount: 3
replicasPerMaster: 1
storage:
volumeClaimTemplate:
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
```
- Changing masterCount should reshard and migrate data to resized masters
- changing replicasPerMaster should replicate data
### Describe alternatives you've considered
Allow graceful recovery of the cluster when one or many nodes restart using a dns naming pattern (would be nice) using a predefined cluster DNS names lists. Example :
in garnet.conf
```json
{
"clusterMasterNames": ["garnet-0", "garnet-1", "garnet-3"],
"clusterReplicaNames" : ["garnet-4", "garnet-5", "garnet-6"]
}
```
- `clusterReplicaNames` vector should have a size that is multiple of `clustesMasterNames`
- each cluster know who he is by getting it's hostname as kubernetes would provision it whensetting a statefulset
- only static setup would be supported (no dynamic resharding, or dynamic replication)
### Additional context
_No response_
Contributor guide
No contributing guide indexed for this repository
Research direction
No files, tests, or code entry points are named. Start by reviewing Garnet's cluster-mode configuration alongside the proposed Kubernetes StatefulSet, headless Service DNS naming, and GarnetCluster CRD. Done would mean a defined path for cluster setup, recovery, migration, and the stated master and replica count changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kubernetes
- Domain
- cloud, distributed-systems, infrastructure
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100