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

Make affinity/antiaffinity topologyKey and required/preferred parameters configurable for podDistribution setting #772

Open
alexandv opened this issue Sep 8, 2021 · 4 comments

Comments

@alexandv
Copy link

alexandv commented Sep 8, 2021

Hello,

We would like to have replicas spread across availability zones. Currently, the podDistribution settings only work with the hostname topologyKey as far as I can tell:
https://github.com/Altinity/clickhouse-operator/blob/master/pkg/model/affinity.go#L504
https://github.com/Altinity/clickhouse-operator/blob/master/pkg/model/affinity.go#L529
https://github.com/Altinity/clickhouse-operator/blob/master/pkg/model/affinity.go#L561

The only way we have found to have pods spread across zones now is to use one pod template per zone which is repetitive and error-prone.

I also noticed that pod affinity is currently enforced using PreferredDuringSchedulingIgnoredDuringExecution and pod anti affinity using RequiredDuringSchedulingIgnoredDuringExecution. Can we also make this configurable?

2 additional optional settings like this could work:

podDistribution:
- type: ReplicaAntiAffinity
  topologyKey: kubernetes.io/zone
  affType: preferredDuringSchedulingIgnoredDuringExecution

Thanks

@alex-zaitsev
Copy link
Member

Make sense. We will plan it for the next release.

@alex-zaitsev
Copy link
Member

topologyKey is added into 0.16.0 release.

@alexandv
Copy link
Author

Thanks @alex-zaitsev . We will test it and let you know if there are any issues.

@emanuelioan
Copy link

Hey @alex-zaitsev , any update on supporting preferredDuringSchedulingIgnoredDuringExecution ? I'd like to spread replicas over multiple AZs and requiredDuringSchedulingIgnoredDuringExecution wouldn't work if I had more replicas than AZs.

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

No branches or pull requests

3 participants