Add internal/external DNS node address types

parent 71369b9b
...@@ -79,9 +79,17 @@ func NewServerRunOptions() *ServerRunOptions { ...@@ -79,9 +79,17 @@ func NewServerRunOptions() *ServerRunOptions {
Port: ports.KubeletPort, Port: ports.KubeletPort,
ReadOnlyPort: ports.KubeletReadOnlyPort, ReadOnlyPort: ports.KubeletReadOnlyPort,
PreferredAddressTypes: []string{ PreferredAddressTypes: []string{
// --override-hostname
string(api.NodeHostName), string(api.NodeHostName),
// internal, preferring DNS if reported
string(api.NodeInternalDNS),
string(api.NodeInternalIP), string(api.NodeInternalIP),
// external, preferring DNS if reported
string(api.NodeExternalDNS),
string(api.NodeExternalIP), string(api.NodeExternalIP),
string(api.NodeLegacyHostIP), string(api.NodeLegacyHostIP),
}, },
EnableHttps: true, EnableHttps: true,
......
...@@ -2718,6 +2718,8 @@ const ( ...@@ -2718,6 +2718,8 @@ const (
NodeHostName NodeAddressType = "Hostname" NodeHostName NodeAddressType = "Hostname"
NodeExternalIP NodeAddressType = "ExternalIP" NodeExternalIP NodeAddressType = "ExternalIP"
NodeInternalIP NodeAddressType = "InternalIP" NodeInternalIP NodeAddressType = "InternalIP"
NodeExternalDNS NodeAddressType = "ExternalDNS"
NodeInternalDNS NodeAddressType = "InternalDNS"
) )
type NodeAddress struct { type NodeAddress struct {
......
...@@ -3142,6 +3142,8 @@ const ( ...@@ -3142,6 +3142,8 @@ const (
NodeHostName NodeAddressType = "Hostname" NodeHostName NodeAddressType = "Hostname"
NodeExternalIP NodeAddressType = "ExternalIP" NodeExternalIP NodeAddressType = "ExternalIP"
NodeInternalIP NodeAddressType = "InternalIP" NodeInternalIP NodeAddressType = "InternalIP"
NodeExternalDNS NodeAddressType = "ExternalDNS"
NodeInternalDNS NodeAddressType = "InternalDNS"
) )
// NodeAddress contains information for the node's address. // NodeAddress contains information for the node's address.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment