You've already forked woodpecker
mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-11-23 21:44:44 +02:00
Fix IPv6 host aliases for kubernetes (#2992)
Closes #2991 [Tests](https://github.com/woodpecker-ci/woodpecker/pull/2993#issuecomment-1868048169) --------- Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
@@ -88,8 +88,12 @@ func toHostConfig(step *types.Step) *container.HostConfig {
|
||||
if len(step.DNSSearch) != 0 {
|
||||
config.DNSSearch = step.DNSSearch
|
||||
}
|
||||
extraHosts := []string{}
|
||||
for _, hostAlias := range step.ExtraHosts {
|
||||
extraHosts = append(extraHosts, hostAlias.Name+":"+hostAlias.IP)
|
||||
}
|
||||
if len(step.ExtraHosts) != 0 {
|
||||
config.ExtraHosts = step.ExtraHosts
|
||||
config.ExtraHosts = extraHosts
|
||||
}
|
||||
if len(step.Devices) != 0 {
|
||||
config.Devices = toDev(step.Devices)
|
||||
|
||||
Reference in New Issue
Block a user