mirror of
https://github.com/rancher/types.git
synced 2025-07-05 09:46:13 +00:00
ExternalIP to node
This commit is contained in:
parent
0efe60ff1a
commit
a1a28ef8e8
@ -103,9 +103,10 @@ func nativeNodeTypes(schemas *types.Schemas) *types.Schemas {
|
||||
schema.CodeName = "InternalNodeStatus"
|
||||
schema.CodeNamePlural = "InternalNodeStatuses"
|
||||
}, struct {
|
||||
IPAddress string
|
||||
Hostname string
|
||||
Info NodeInfo
|
||||
IPAddress string
|
||||
ExternalIPAddress string `json:"externalIpAddress,omitempty"`
|
||||
Hostname string
|
||||
Info NodeInfo
|
||||
}{})
|
||||
}
|
||||
|
||||
|
@ -15,6 +15,8 @@ func (n NodeAddressMapper) FromInternal(data map[string]interface{}) {
|
||||
a := address["address"]
|
||||
if t == "InternalIP" {
|
||||
data["ipAddress"] = a
|
||||
} else if t == "ExternalIP" {
|
||||
data["externalIpAddress"] = a
|
||||
} else if t == "Hostname" {
|
||||
data["hostname"] = a
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user