mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-04 16:33:49 +08:00
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:
@@ -520,13 +520,10 @@ func createIngressGateway(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
nodeid := params["nodeid"]
|
||||
netid := params["network"]
|
||||
type failoverData struct {
|
||||
Failover bool `json:"failover"`
|
||||
}
|
||||
var failoverReqBody failoverData
|
||||
json.NewDecoder(r.Body).Decode(&failoverReqBody)
|
||||
var request models.IngressRequest
|
||||
json.NewDecoder(r.Body).Decode(&request)
|
||||
|
||||
node, err := logic.CreateIngressGateway(netid, nodeid, failoverReqBody.Failover)
|
||||
node, err := logic.CreateIngressGateway(netid, nodeid, request)
|
||||
if err != nil {
|
||||
logger.Log(0, r.Header.Get("user"),
|
||||
fmt.Sprintf("failed to create ingress gateway on node [%s] on network [%s]: %v",
|
||||
@@ -535,7 +532,7 @@ func createIngressGateway(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
if servercfg.Is_EE && failoverReqBody.Failover {
|
||||
if servercfg.Is_EE && request.Failover {
|
||||
if err = logic.EnterpriseResetFailoverFunc(node.Network); err != nil {
|
||||
logger.Log(1, "failed to reset failover list during failover create", node.ID.String(), node.Network)
|
||||
}
|
||||
|
Reference in New Issue
Block a user