mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-09-06 17:20:19 +00:00
Add Agent-level Tolerations setting (#5266)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -179,6 +179,14 @@ func podSpec(step *types.Step, config *config, options BackendOptions, nsp nativ
|
||||
Tolerations: tolerations(options.Tolerations),
|
||||
SecurityContext: podSecurityContext(options.SecurityContext, config.SecurityContext, step.Privileged),
|
||||
}
|
||||
|
||||
// If there are tolerations and they are allowed
|
||||
if config.PodTolerationsAllowFromStep && len(options.Tolerations) != 0 {
|
||||
spec.Tolerations = tolerations(options.Tolerations)
|
||||
} else {
|
||||
spec.Tolerations = tolerations(config.PodTolerations)
|
||||
}
|
||||
|
||||
spec.Volumes, err = pvcVolumes(step.Volumes)
|
||||
if err != nil {
|
||||
return spec, err
|
||||
|
Reference in New Issue
Block a user