Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions pkg/asset/ignition/bootstrap/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,12 +264,24 @@ func (a *Common) getTemplateData(dependencies asset.Parents, bootstrapInPlace bo
platformData.VSphere = vsphere.GetTemplateData(installConfig.Config.Platform.VSphere)
}

var APIIntVIPonIPv6 bool
var useIPv6ForNodeIP bool
platformAPIVIP := apiVIP(&installConfig.Config.Platform)
if platformAPIVIP == "" {
APIIntVIPonIPv6 = false
var ipv4, ipv6 bool

useIPv6ForNodeIP = false
for _, network := range installConfig.Config.Networking.ServiceNetwork {
if network.IP.To4() == nil {
ipv6 = true
} else {
ipv4 = true
}
}
if ipv6 && !ipv4 {
useIPv6ForNodeIP = true
}
} else {
APIIntVIPonIPv6 = net.ParseIP(platformAPIVIP).To4() == nil
useIPv6ForNodeIP = net.ParseIP(platformAPIVIP).To4() == nil
}

// Set cluster profile
Expand All @@ -295,7 +307,7 @@ func (a *Common) getTemplateData(dependencies asset.Parents, bootstrapInPlace bo
PlatformData: platformData,
ClusterProfile: clusterProfile,
BootstrapInPlace: bootstrapInPlaceConfig,
UseIPv6ForNodeIP: APIIntVIPonIPv6,
UseIPv6ForNodeIP: useIPv6ForNodeIP,
IsOKD: installConfig.Config.IsOKD(),
}
}
Expand Down