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

@@ -96,7 +96,7 @@ func DeleteEgressGateway(network, nodeid string) (models.Node, error) {
}
// CreateIngressGateway - creates an ingress gateway
func CreateIngressGateway(netid string, nodeid string, failover bool) (models.Node, error) {
func CreateIngressGateway(netid string, nodeid string, ingress models.IngressRequest) (models.Node, error) {
node, err := GetNodeByID(nodeid)
if err != nil {
@@ -120,8 +120,9 @@ func CreateIngressGateway(netid string, nodeid string, failover bool) (models.No
node.IsIngressGateway = true
node.IngressGatewayRange = network.AddressRange
node.IngressGatewayRange6 = network.AddressRange6
node.IngressDNS = ingress.ExtclientDNS
node.SetLastModified()
if failover && servercfg.Is_EE {
if ingress.Failover && servercfg.Is_EE {
node.Failover = true
}
data, err := json.Marshal(&node)