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:
scottshotgg
2025-08-10 03:12:42 -05:00
committed by GitHub
parent ee2804d8a5
commit d7495357d5
6 changed files with 209 additions and 0 deletions

View File

@@ -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