Extclient NET-63x (#2286)

* model changes

* additional fields for extclient create

* add DNS to extclient config

* extclient name checks

* update extclient

* nmctl extclient

* final tweaks

* review comments

* add extclientdns to node on ingress creation

* fix to add ingress dns to api (#2296)

---------

Co-authored-by: Aceix <aceixsmartX@gmail.com>
This commit is contained in:
Matthew R Kasun
2023-05-17 10:58:03 -04:00
committed by GitHub
parent 058533db3f
commit 78640f1342
17 changed files with 202 additions and 117 deletions

View File

@@ -32,6 +32,7 @@ type ApiNode struct {
RelayAddrs []string `json:"relayaddrs"`
FailoverNode string `json:"failovernode"`
DNSOn bool `json:"dnson"`
IngressDns string `json:"ingressdns"`
Server string `json:"server"`
InternetGateway string `json:"internetgateway"`
Connected bool `json:"connected"`
@@ -61,6 +62,7 @@ func (a *ApiNode) ConvertToServerNode(currentNode *Node) *Node {
convertedNode.IngressGatewayRange = currentNode.IngressGatewayRange
convertedNode.IngressGatewayRange6 = currentNode.IngressGatewayRange6
convertedNode.DNSOn = a.DNSOn
convertedNode.IngressDNS = a.IngressDns
convertedNode.EgressGatewayRequest = currentNode.EgressGatewayRequest
convertedNode.EgressGatewayNatEnabled = currentNode.EgressGatewayNatEnabled
convertedNode.PersistentKeepalive = time.Second * time.Duration(a.PersistentKeepalive)
@@ -148,6 +150,7 @@ func (nm *Node) ConvertToAPINode() *ApiNode {
apiNode.FailoverNode = ""
}
apiNode.DNSOn = nm.DNSOn
apiNode.IngressDns = nm.IngressDNS
apiNode.Server = nm.Server
apiNode.InternetGateway = nm.InternetGateway.String()
if isEmptyAddr(apiNode.InternetGateway) {