-
Notifications
You must be signed in to change notification settings - Fork 5
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
[Feature] Add option to define toleration on wave-build jobs to allow scheduling on tainted nodes #702
Comments
It would make sense to move this fwd as *replacement* of the existing node selector mechanism wave/src/main/groovy/io/seqera/wave/service/k8s/K8sServiceImpl.groovy Lines 83 to 85 in 55b28f8
wave/src/main/groovy/io/seqera/wave/service/builder/KubeBuildStrategy.groovy Lines 93 to 94 in 55b28f8
|
Note that under some circumstances |
@gavinelder @pditommaso Do we need tolerations for build pods only or for scan, transfer and mirror too? |
Only builds are platform dependent |
As discussed we are going to solve this via K8s admission controller. See #751 (comment) |
The following duplicates #291.
Background.
In the current setup, wave build pods can utilize the nodeSelector functionality as defined in the Wave config map. This allows users to specify node selection criteria, ensuring that certain workloads run on specific nodes. For example, a user can configure the nodeSelector in the Wave config map as follows:
This configuration ensures that wave build pods are scheduled on nodes labeled with
service=wave-build
. While this approach assigns these pods to specific nodes, it does not prevent other pods from being scheduled on those nodes, which can lead to unrelated workloads being scheduled on node-groups intended for wave.Problem
We have seen instances of wave becoming a noisy neighbor impacting other pods scheduled on the same node as the wave-build pods resulting in degraded performance and in some instances node failure when wave-build was configured without shared storage.
Feature Request
By adding support for tolerations as part of the job configuration we can allow cluster operators to taint nodes with relevant
NoSchedule
annotation preventing other workloads being configured on the relevant wave-build nodes.This taint would prevent any pods without the appropriate toleration from being scheduled on the nodes reserved for wave build jobs.
The configuration for the Wave build jobs would then look like the following for example, allowing the pod to tolerate the node taint.
Possible approach
A potential solution would be to allow end users to provide a Kubernetes-compliant list of Tolerations that can be added to the build jobs via the Wave service configuration. These tolerations would then be validated by the Wave service and injected into the build job pods during their creation.
By allowing users to specify tolerations in a format that directly follows the Kubernetes specification, we reduce the need for Wave to enforce specific business logic around pod scheduling, while ensuring that users can define their own scheduling constraints and preferences.
An example config would look like the following.
Alternatives considered
Use of an kubernetes admission controller
It is possible to use a admission controller such as Kyverno to add these relevant tolerations via mutation
The use of mutation as outlined below may by a suitable however for customer environments having native support within the wave application removes the need to run and operate additional infrastructure.
Additional Information
The following is the Tolleration specification from
kubernetes/pkg/apis/core/types.go
Toleration specification
Pod Specification
Example Pod with Tollerations.
The text was updated successfully, but these errors were encountered: