Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redis-cluster: create STS per Master/Replica pair #6540

Closed
nefelim4ag opened this issue Jun 2, 2021 · 5 comments
Closed

redis-cluster: create STS per Master/Replica pair #6540

nefelim4ag opened this issue Jun 2, 2021 · 5 comments
Labels
stale 15 days without activity

Comments

@nefelim4ag
Copy link
Contributor

nefelim4ag commented Jun 2, 2021

Redis cluster:
Currently when cluster provisioned all nodes randomly joined and we can't correctly handle podAntiAffinity in cluster.

So my proporse doing something like:
Sts per group of hosts, example:
numNodes: 8
replica: 2

M - redis-0-0
S - redis-0-1
M - redis-1-0
S - redis-1-1
M - redis-2-0
S - redis-2-1
M - redis-3-0
S - redis-3-1

So that's look easy to add new nodes, manage replicas and do any sort of internal antiAffinity
As we have labels on STS pods, we can continue use current code to build up cluster

But i'm not sure about replica migration behaviour

@miguelaeh
Copy link
Contributor

Hi @nefelim4ag ,
Thank you very much for the request. We are always happy to receive PRs of that type. Would you like to create one adding such feature?

@nefelim4ag
Copy link
Contributor Author

nefelim4ag commented Jun 6, 2021

I will try, when i have a bit free time

@plachta11b
Copy link

plachta11b commented Jun 9, 2021

Hi, I would prefer labelling pods as redis-cluster/replication: master or redis-cluster/replication: replica and having separate label for shard/partition as redis-cluster/shard: 0 or redis-cluster/shard: master-0-hash to avoid wildcards in podAntiAffinity/topologySpreadConstraints. So redis-2-1 would be something like redis-cluster/replication: replica, redis-cluster/shard: 2. I don't have much free time this month but i would love to help with this PR.

EDIT: it should be app.kubernetes.io/component: master and app.kubernetes.io/component: replica as already implemented in non cluster version.

@github-actions
Copy link

github-actions bot commented Jul 8, 2021

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

@github-actions github-actions bot added the stale 15 days without activity label Jul 8, 2021
@github-actions
Copy link

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale 15 days without activity
Projects
None yet
Development

No branches or pull requests

3 participants