-
Notifications
You must be signed in to change notification settings - Fork 23
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
Placement enhancement: support spread policy #49
Comments
|
/assign @qiujian16 |
|
To add to the spreading. I was originally interested in putting a Example: ---
apiVersion: cluster.open-cluster-management.io/v1alpha1
kind: Placement
metadata:
name: two-cloud-providers
namespace: default
spec:
clusterSets:
- all-clusters
predicates:
- requiredClusterSelector:
numberOfClusters: 3
labelSelector:
matchLabels:
cloud: aws
- requiredClusterSelector:
numberOfClusters: 2
labelSelector:
matchLabels:
cloud: gcpSo in this scenario, even if each |
|
we were try to build a controller by putting noc in the predicate, but controller cannot easily reason about it. Especially when we add other properties like workload anitaffinity etc...I think we could consider having to placements to achieve this. And set a common label on the placement decision, so consumers can filter all related placementdecision by labels. WDYT @jnpacker @elgnay |
|
I see the same thing being achievable if an anti-affinity labelSelector, where I might use the label key or keys, like And so if |
|
This is current in progress document https://docs.google.com/document/d/1aaRSnyChczgJvejzug-fkY2eYhhQWfa2CPmqRq5s-SA/edit#heading=h.t2wrspluvypn I think what you mention according to the doc could be done by spreadPolicy:
spreadConstraints:
- maxSkew: 1
whenUnsatisfiable: DoNotSelect
topologyKey: region.open-cluster-management.io
topologyKeyType: Claimso if we want 4 clusters only from aws and gcp and we want them to spread to them. It will be like apiVersion: cluster.open-cluster-management.io/v1alpha1
kind: Placement
metadata:
name: ocp-placement
spec:
numberOfClusters: 4
predicates:
requiredClusterSelector:
claimSelector:
matchExpressions:
claimSelector:
matchExpressions:
- key: platform.open-cluster-management.io
operator: In
values:
- AWS
- GCP
spreadPolicy:
spreadConstraints:
- maxSkew: 1
whenUnsatisfiable: DoNotSelect
topologyKey: platform.open-cluster-management.io
topologyKeyType: Claim |
|
/kind feature |
|
The proposal about Spread policy in Placement is merged. |
|
/close |
|
@qiujian16: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
We should be able to support policy in placement:
The text was updated successfully, but these errors were encountered: