mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-25 01:40:46 +08:00
GRA-1298: License check changes, free tier limits for saas (#2418)
* set free tier limits through config * add host limit to config * check for host limit on free tier * fix license validation, replace node limit with hosts * add hosts to telemetry data * debug init * validate license every 1hr * hook manager, api to fetch server usage * hook manager, server usage api * encode json server usage api * update ngork url * update license validation endpoint * avoid setting limits on eer * adding hotfix * correct users limits env var * add comments to exported funcs --------- Co-authored-by: afeiszli <alex.feiszli@gmail.com>
This commit is contained in:
7
main.go
7
main.go
@@ -42,6 +42,9 @@ func main() {
|
||||
initialize() // initial db and acls
|
||||
setGarbageCollection()
|
||||
setVerbosity()
|
||||
if servercfg.DeployedByOperator() && !servercfg.Is_EE {
|
||||
logic.SetFreeTierLimits()
|
||||
}
|
||||
defer database.CloseDB()
|
||||
ctx, stop := signal.NotifyContext(context.Background(), syscall.SIGTERM, os.Interrupt)
|
||||
defer stop()
|
||||
@@ -89,7 +92,6 @@ func initialize() { // Client Mode Prereq Check
|
||||
if err != nil {
|
||||
logger.Log(1, "Timer error occurred: ", err.Error())
|
||||
}
|
||||
|
||||
logic.EnterpriseCheck()
|
||||
|
||||
var authProvider = auth.InitializeAuthProvider()
|
||||
@@ -150,6 +152,9 @@ func startControllers(wg *sync.WaitGroup, ctx context.Context) {
|
||||
// starts the stun server
|
||||
wg.Add(1)
|
||||
go stunserver.Start(wg, ctx)
|
||||
|
||||
wg.Add(1)
|
||||
go logic.StartHookManager(ctx, wg)
|
||||
}
|
||||
|
||||
// Should we be using a context vice a waitgroup????????????
|
||||
|
||||
Reference in New Issue
Block a user