-
Notifications
You must be signed in to change notification settings - Fork 900
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
Will SpreadConstraints make effect when replicaSchedulingType is Divided? #5986
Comments
In theory, it should be in effect. Can you share how your PropagationPolicy is set? |
The pp is as following: resourceSelectors:
- apiVersion: apps/v1
kind: Deployment
name: whoami
namespace: test
placement:
clusterAffinity:
clusterNames:
- member1
- member2
spreadConstraints:
- maxGroups: 2
minGroups: 2
replicaScheduling:
replicaDivisionPreference: Weighted
replicaSchedulingType: Divided
weightPreference:
dynamicWeight: AvailableReplicas |
BTW, if the weightPreference is static, for example, three replicas with a weight ratio of 3:1, I believe according to the current code logic, the scheduling result would be 3:0. Would the spreadConstraint then not take effect? I only see |
According to the pp configuration you share, there is no problem. Check whether the number of copies in the other cluster is insufficient. You can view the log of the scheduler.
If it's static, it should ignore the amount of resources for allocation. |
I mean static weight ratio is 3:1. Anyway, thanks pretty much for your answer on the weekend. I will read the code further and test more. |
Please provide an in-depth description of the question you have:
When I test
SpreadConstraints
, I found it will not make effect when replicaSchedulingType is Divided. I have two clusters, where one cluster has significantly more resources than the other, and all replicas are scheduled to the larger cluster. I expect to addSpreadConstraints
to make sure the smaller cluster will get at least one replica. However, it seems not both for dynamic and static.What do you think about this question?:
I'm not sure my use case is correct. If it is, I think
SpreadConstraints
should be supported even replicaSchedulingType is Divided.Environment:
The text was updated successfully, but these errors were encountered: