brickyard opened a new pull request #306:
URL: https://github.com/apache/incubator-yunikorn-k8shim/pull/306
### What is this PR for?
Gang-scheduling in Yunikorn requires the use of placeholder pods to
guarantee placement of pods during the execution lifecycle. These placeholder
pods will eventually be replaced by the actual application pod and therefore
must have the same nodeSelector, tolerations, and affinity as the application
pods in order to perform replacement properly. This PR adds affinity support
to the `task-groups` configuration.
Example applied with the`yunikorn.apache.org/task-groups` label -
```json
[
{
"name": "d-spark-application-k07xl",
"minMember": 1,
"minResource": {
"cpu": "1",
"memory": "3200Mi"
}
},
{
"name": "e-spark-application-k07xl",
"minMember": 5,
"minResource": {
"cpu": "6",
"memory": "13000Mi"
},
"affinity": {
"podAffinity": {
"requiredDuringSchedulingIgnoredDuringExecution": [
{
"topologyKey": "topology.kubernetes.io/zone",
"labelSelector": {
"matchExpressions": [
{
"key": "sparkoperator.k8s.io/app-name",
"operator": "In",
"values": [
"spark-application-k07xl"
]
}
]
}
}
]
}
}
}
]
```
### What type of PR is it?
* [X] - Improvement
### What is the Jira issue?
* https://issues.apache.org/jira/browse/YUNIKORN-861
### How should this be tested?
### Screenshots (if appropriate)
### Questions:
* [ ] - The licenses files need update.
* [ ] - There is breaking changes for older versions.
* [X] - It needs documentation.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]