mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-09-03 13:13:43 +00:00
Add dns config option to official feature set (#4418)
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
This commit is contained in:
@@ -162,6 +162,16 @@ func podSpec(step *types.Step, config *config, options BackendOptions, nsp nativ
|
||||
return spec, err
|
||||
}
|
||||
|
||||
if len(step.DNS) != 0 || len(step.DNSSearch) != 0 {
|
||||
spec.DNSConfig = &v1.PodDNSConfig{}
|
||||
if len(step.DNS) != 0 {
|
||||
spec.DNSConfig.Nameservers = step.DNS
|
||||
}
|
||||
if len(step.DNSSearch) != 0 {
|
||||
spec.DNSConfig.Searches = step.DNSSearch
|
||||
}
|
||||
}
|
||||
|
||||
log.Trace().Msgf("using the image pull secrets: %v", config.ImagePullSecretNames)
|
||||
spec.ImagePullSecrets = secretsReferences(config.ImagePullSecretNames)
|
||||
if needsRegistrySecret(step) {
|
||||
|
Reference in New Issue
Block a user