mirror of https://github.com/kubernetes/kops.git
Better readable modification assigning of PrivateIPv4Address
This commit is contained in:
parent
2c0f9809eb
commit
295fb11ac2
|
|
@ -72,12 +72,14 @@ func (b *APILoadBalancerBuilder) Build(c *fi.ModelBuilderContext) error {
|
||||||
if subnet.Name == clusterSubnet.Name {
|
if subnet.Name == clusterSubnet.Name {
|
||||||
elbSubnet := b.LinkToSubnet(&clusterSubnet)
|
elbSubnet := b.LinkToSubnet(&clusterSubnet)
|
||||||
elbSubnets = append(elbSubnets, elbSubnet)
|
elbSubnets = append(elbSubnets, elbSubnet)
|
||||||
nlbSubnetMappings = append(nlbSubnetMappings, &awstasks.SubnetMapping{
|
|
||||||
|
nlbSubnetMapping := &awstasks.SubnetMapping{
|
||||||
Subnet: elbSubnet,
|
Subnet: elbSubnet,
|
||||||
})
|
|
||||||
if subnet.PrivateIPv4Address != nil {
|
|
||||||
nlbSubnetMappings[len(nlbSubnetMappings)-1].PrivateIPv4Address = subnet.PrivateIPv4Address
|
|
||||||
}
|
}
|
||||||
|
if subnet.PrivateIPv4Address != nil {
|
||||||
|
nlbSubnetMapping.PrivateIPv4Address = subnet.PrivateIPv4Address
|
||||||
|
}
|
||||||
|
nlbSubnetMappings = append(nlbSubnetMappings, nlbSubnetMapping)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue