-
Notifications
You must be signed in to change notification settings - Fork 237
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
Enable pod antiaffinity by default #285
Comments
Hey @anubisg1, pod affinity is a configurable option, that is indeed a good idea, do you want to raise a PR on it? |
i can try but i never looked into an operator implementation :) let me see what i can come out with |
it would be good to use labels on each nodePools component based on the roles and then use antiaffinity against that label. Otherwise, each cluster setup requires a greater number of nodes to host (in case bigger setup). |
This is what i used as affinity rules
|
…iAffinity This PR helps to add a default podAntiAffinity rule in each nodePool component with the cluster-name as selector to schedule the replicas on different nodes on Kubernetes. All components using the same rule, thus each replica from nodePool components schedules on different nodes. This can be improved on component wise in nodePool in future if needed. Fixes opensearch-project#285 - [x] Commits are signed per the DCO using --signoff - [x] Unittest added for the new/changed functionality and all unit tests are successful - [x] Customer-visible features documented - [x] No linter warnings (`helm lint` and `helm template`) By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check [here](https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#developer-certificate-of-origin). Signed-off-by: Rajesh M <[email protected]>
…iAffinity This PR helps to add a default podAntiAffinity rule in each nodePool component with the cluster-name as selector to schedule the replicas on different nodes on Kubernetes. All components using the same rule, thus each replica from nodePool components schedules on different nodes. This can be improved on component wise in nodePool in future if needed. Fixes opensearch-project#285 - [x] Commits are signed per the DCO using --signoff - [x] Unittest added for the new/changed functionality and all unit tests are successful - [x] Customer-visible features documented - [x] No linter warnings (`helm lint` and `helm template`) By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check [here](https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#developer-certificate-of-origin). Signed-off-by: Rajesh M <[email protected]>
Thanks! updated the PR with this way!! |
When installing a cluster via the operator, pod antiaffinity should be enabled by default (and user should be allowed to override it) so that each opensearch cluster node runs on a separate k8s node in order to provide an appropriate level of HA and fault tolerance
something similar to the following should exist by default (without any user configuration)
The text was updated successfully, but these errors were encountered: