reload console certs upon SIGHUP (#1268)

This commit is contained in:
Harshavardhana
2021-11-30 11:00:46 -08:00
committed by GitHub
parent c529a6d127
commit eefc6a7894
15 changed files with 138 additions and 17 deletions

View File

@@ -21,6 +21,7 @@ import (
"io/ioutil"
"path/filepath"
"strconv"
"syscall"
"time"
"github.com/minio/console/restapi"
@@ -173,6 +174,10 @@ func loadOperatorAllCerts(ctx *cli.Context) error {
}
}
if restapi.GlobalTLSCertsManager != nil {
restapi.GlobalTLSCertsManager.ReloadOnSignal(syscall.SIGHUP)
}
return nil
}

View File

@@ -22,6 +22,7 @@ import (
"os"
"path/filepath"
"strconv"
"syscall"
"time"
"github.com/go-openapi/loads"
@@ -172,6 +173,10 @@ func loadAllCerts(ctx *cli.Context) error {
}
}
if restapi.GlobalTLSCertsManager != nil {
restapi.GlobalTLSCertsManager.ReloadOnSignal(syscall.SIGHUP)
}
return nil
}