mirror of https://github.com/kubernetes/kops.git
Rename BootConfig.APIServer to BootConfig.APIServerIP
This commit is contained in:
parent
6a4080dbe5
commit
0e2cc7e0cc
|
@ -49,12 +49,12 @@ func (b *EtcHostsBuilder) Build(c *fi.ModelBuilderContext) error {
|
|||
} else if b.Cluster.UsesNoneDNS() {
|
||||
task.Records = append(task.Records, nodetasks.HostRecord{
|
||||
Hostname: b.Cluster.Spec.MasterInternalName,
|
||||
Addresses: []string{b.BootConfig.APIServer},
|
||||
Addresses: []string{b.BootConfig.APIServerIP},
|
||||
})
|
||||
if b.UseKopsControllerForNodeBootstrap() {
|
||||
task.Records = append(task.Records, nodetasks.HostRecord{
|
||||
Hostname: "kops-controller.internal." + b.Cluster.Name,
|
||||
Addresses: []string{b.BootConfig.APIServer},
|
||||
Addresses: []string{b.BootConfig.APIServerIP},
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -90,9 +90,9 @@ type BootConfig struct {
|
|||
ConfigBase *string `json:",omitempty"`
|
||||
// ConfigServer holds the configuration for the configuration server.
|
||||
ConfigServer *ConfigServerOptions `json:",omitempty"`
|
||||
// APIServer is the API server IP address.
|
||||
// APIServerIP is the API server IP address.
|
||||
// This field is used for adding an alias for api.internal. in /etc/hosts, when Topology.DNS.Type == DNSTypeNone.
|
||||
APIServer string `json:",omitempty"`
|
||||
APIServerIP string `json:",omitempty"`
|
||||
// InstanceGroupName is the name of the instance group.
|
||||
InstanceGroupName string `json:",omitempty"`
|
||||
// InstanceGroupRole is the instance group role.
|
||||
|
|
|
@ -1424,11 +1424,11 @@ func (n *nodeUpConfigBuilder) BuildConfig(ig *kops.InstanceGroup, apiserverAddit
|
|||
}
|
||||
for _, additionalIP := range apiserverAdditionalIPs {
|
||||
if cidr.Contains(net.ParseIP(additionalIP)) {
|
||||
bootConfig.APIServer = additionalIP
|
||||
bootConfig.APIServerIP = additionalIP
|
||||
break
|
||||
}
|
||||
}
|
||||
if bootConfig.APIServer != "" {
|
||||
if bootConfig.APIServerIP != "" {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue