console license page improvements and fixes (#647)

- fixed issue when deploying tenant with tls disabled
- applied new design for tenant details and license screens
- added license refresh job to operator console
- added new refresh license endpoint
- console operator not longer store CONSOLE_ACCESS_KEY and
  CONSOLE_SECRET_KEY values in the tenant-console-secret

Co-authored-by: Daniel Valdivia <hola@danielvaldivia.com>
This commit is contained in:
Lenin Alevski
2021-03-22 11:08:31 -07:00
committed by GitHub
parent 2a704d3d59
commit 7ce36bac42
29 changed files with 1382 additions and 135 deletions

View File

@@ -21,6 +21,7 @@ import (
"log"
"os"
"path/filepath"
"time"
"github.com/go-openapi/loads"
"github.com/jessevdk/go-flags"
@@ -135,6 +136,28 @@ func startServer(ctx *cli.Context) error {
server.ConfigureAPI()
// subnet license refresh process
go func() {
failedAttempts := 0
for {
if err := restapi.RefreshLicense(); err != nil {
log.Println(err)
failedAttempts++
// end license refresh after 3 consecutive failed attempts
if failedAttempts >= 3 {
return
}
// wait 5 minutes and retry again
time.Sleep(time.Minute * 5)
continue
}
// if license refreshed successfully reset the counter
failedAttempts = 0
// try to refresh license every 24 hrs
time.Sleep(time.Hour * 24)
}
}()
if err := server.Serve(); err != nil {
log.Fatalln(err)
}