mirror of
https://github.com/gravitl/netmaker.git
synced 2024-09-20 15:26:04 +08:00
added kubernetes listen port
This commit is contained in:
parent
d7abd9c612
commit
a39ef16394
|
@ -8,7 +8,7 @@ import (
|
|||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/gravitl/netmaker/servercfg"
|
||||
"github.com/gravitl/netmaker/models"
|
||||
"github.com/gravitl/netmaker/netclient/ncutils"
|
||||
"golang.zx2c4.com/wireguard/wgctrl/wgtypes"
|
||||
|
@ -16,6 +16,9 @@ import (
|
|||
|
||||
// == Join, Checkin, and Leave for Server ==
|
||||
|
||||
// KUBERNETES_LISTEN_PORT - starting port for Kubernetes in order to use NodePort range
|
||||
const KUBERNETES_LISTEN_PORT = 31821
|
||||
|
||||
// ServerJoin - responsible for joining a server to a network
|
||||
func ServerJoin(network string, serverID string, privateKey string) error {
|
||||
|
||||
|
@ -33,6 +36,9 @@ func ServerJoin(network string, serverID string, privateKey string) error {
|
|||
MacAddress: serverID,
|
||||
UDPHolePunch: "no",
|
||||
}
|
||||
if servercfg.GetPlatform() == "Kubernetes" {
|
||||
node.ListenPort = KUBERNETES_LISTEN_PORT
|
||||
}
|
||||
node.SetDefaults()
|
||||
|
||||
if node.LocalRange != "" && node.LocalAddress == "" {
|
||||
|
|
Loading…
Reference in a new issue