You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(driver/kubernetes): support pod affinity/topology spread via driver-opt or pod template ConfigMap #3919
When running multiple parallel docker buildx build invocations with the Kubernetes driver (one builder per image context), all BuildKit pods tend to be scheduled on the same cluster node by the Kubernetes bin-packing scheduler. This causes disk I/O contention during layer extraction — all pods decompress and write the same base image layers simultaneously on shared ephemeral storage, multiplying extraction time by 3–4×.
Example: extracting a 180 MB layer takes ~15s in isolation but ~55s when 3 pods share the same node.
Requested Feature
Expose a mechanism to inject pod affinity / anti-affinity / topology spread constraints into the BuildKit pod spec created by the Kubernetes driver.
Option A: New driver-opt parameters
Add direct driver-opt support for the most common scheduling hints:
The ConfigMap (in the same namespace) would contain arbitrary pod spec fields — affinity, topologySpreadConstraints, securityContext, priorityClassName, etc. — giving operators full control without requiring new driver-opt parameters for every Kubernetes scheduling feature.
None available without a MutatingAdmissionWebhook or third-party policy engine (e.g. Kyverno), which adds significant operational overhead just to influence BuildKit pod scheduling.
Activity
crazy-max commentedon Nov 20, 2026
Opened #4230