mirror of https://github.com/k3s-io/k3s
parent
2fcac6abf2
commit
ccc3eb2c31
|
@ -121,7 +121,6 @@ type RouterOpts struct {
|
|||
type MetadataOpts struct {
|
||||
SearchOrder string `gcfg:"search-order"`
|
||||
RequestTimeout MyDuration `gcfg:"request-timeout"`
|
||||
DHCPDomain string `gcfg:"dhcp-domain"`
|
||||
}
|
||||
|
||||
// OpenStack is an implementation of cloud provider Interface for OpenStack.
|
||||
|
@ -234,7 +233,6 @@ func configFromEnv() (cfg Config, ok bool) {
|
|||
cfg.Global.TrustID != "")
|
||||
|
||||
cfg.Metadata.SearchOrder = fmt.Sprintf("%s,%s", configDriveID, metadataID)
|
||||
cfg.Metadata.DHCPDomain = "novalocal"
|
||||
cfg.BlockStorage.BSVersion = "auto"
|
||||
|
||||
return
|
||||
|
@ -252,7 +250,6 @@ func readConfig(config io.Reader) (Config, error) {
|
|||
cfg.BlockStorage.TrustDevicePath = false
|
||||
cfg.BlockStorage.IgnoreVolumeAZ = false
|
||||
cfg.Metadata.SearchOrder = fmt.Sprintf("%s,%s", configDriveID, metadataID)
|
||||
cfg.Metadata.DHCPDomain = "novalocal"
|
||||
|
||||
err := gcfg.ReadInto(&cfg, config)
|
||||
return cfg, err
|
||||
|
|
|
@ -62,10 +62,6 @@ func (i *Instances) CurrentNodeName(ctx context.Context, hostname string) (types
|
|||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
domain := "." + i.opts.DHCPDomain
|
||||
if i.opts.DHCPDomain != "" && strings.HasSuffix(md.Hostname, domain) {
|
||||
return types.NodeName(strings.TrimSuffix(md.Hostname, domain)), nil
|
||||
}
|
||||
return types.NodeName(strings.Split(md.Hostname, ".")[0]), nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue