mirror of
https://github.com/minio/minio.git
synced 2025-01-23 12:43:16 -05:00
Upgrade Console to v0.44.0 (#18717)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
This commit is contained in:
parent
fd2c38fbef
commit
5fc7da345d
@ -23,7 +23,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/klauspost/compress/gzhttp"
|
"github.com/klauspost/compress/gzhttp"
|
||||||
"github.com/minio/console/restapi"
|
consoleapi "github.com/minio/console/api"
|
||||||
xhttp "github.com/minio/minio/internal/http"
|
xhttp "github.com/minio/minio/internal/http"
|
||||||
"github.com/minio/minio/internal/logger"
|
"github.com/minio/minio/internal/logger"
|
||||||
"github.com/minio/mux"
|
"github.com/minio/mux"
|
||||||
@ -43,13 +43,13 @@ func setHTTPServer(h *xhttp.Server) {
|
|||||||
globalObjLayerMutex.Unlock()
|
globalObjLayerMutex.Unlock()
|
||||||
}
|
}
|
||||||
|
|
||||||
func newConsoleServerFn() *restapi.Server {
|
func newConsoleServerFn() *consoleapi.Server {
|
||||||
globalObjLayerMutex.RLock()
|
globalObjLayerMutex.RLock()
|
||||||
defer globalObjLayerMutex.RUnlock()
|
defer globalObjLayerMutex.RUnlock()
|
||||||
return globalConsoleSrv
|
return globalConsoleSrv
|
||||||
}
|
}
|
||||||
|
|
||||||
func setConsoleSrv(srv *restapi.Server) {
|
func setConsoleSrv(srv *consoleapi.Server) {
|
||||||
globalObjLayerMutex.Lock()
|
globalObjLayerMutex.Lock()
|
||||||
globalConsoleSrv = srv
|
globalConsoleSrv = srv
|
||||||
globalObjLayerMutex.Unlock()
|
globalObjLayerMutex.Unlock()
|
||||||
|
@ -46,10 +46,10 @@ import (
|
|||||||
"github.com/inconshreveable/mousetrap"
|
"github.com/inconshreveable/mousetrap"
|
||||||
dns2 "github.com/miekg/dns"
|
dns2 "github.com/miekg/dns"
|
||||||
"github.com/minio/cli"
|
"github.com/minio/cli"
|
||||||
|
consoleapi "github.com/minio/console/api"
|
||||||
|
"github.com/minio/console/api/operations"
|
||||||
consoleoauth2 "github.com/minio/console/pkg/auth/idp/oauth2"
|
consoleoauth2 "github.com/minio/console/pkg/auth/idp/oauth2"
|
||||||
consoleCerts "github.com/minio/console/pkg/certs"
|
consoleCerts "github.com/minio/console/pkg/certs"
|
||||||
"github.com/minio/console/restapi"
|
|
||||||
"github.com/minio/console/restapi/operations"
|
|
||||||
"github.com/minio/kes-go"
|
"github.com/minio/kes-go"
|
||||||
"github.com/minio/madmin-go/v3"
|
"github.com/minio/madmin-go/v3"
|
||||||
"github.com/minio/minio-go/v7"
|
"github.com/minio/minio-go/v7"
|
||||||
@ -207,7 +207,7 @@ func buildOpenIDConsoleConfig() consoleoauth2.OpenIDPCfg {
|
|||||||
return m
|
return m
|
||||||
}
|
}
|
||||||
|
|
||||||
func initConsoleServer() (*restapi.Server, error) {
|
func initConsoleServer() (*consoleapi.Server, error) {
|
||||||
// unset all console_ environment variables.
|
// unset all console_ environment variables.
|
||||||
for _, cenv := range env.List(consolePrefix) {
|
for _, cenv := range env.List(consolePrefix) {
|
||||||
os.Unsetenv(cenv)
|
os.Unsetenv(cenv)
|
||||||
@ -225,9 +225,9 @@ func initConsoleServer() (*restapi.Server, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// set certs before other console initialization
|
// set certs before other console initialization
|
||||||
restapi.GlobalRootCAs, restapi.GlobalPublicCerts, restapi.GlobalTLSCertsManager = globalRootCAs, globalPublicCerts, globalTLSCerts
|
consoleapi.GlobalRootCAs, consoleapi.GlobalPublicCerts, consoleapi.GlobalTLSCertsManager = globalRootCAs, globalPublicCerts, globalTLSCerts
|
||||||
|
|
||||||
swaggerSpec, err := loads.Embedded(restapi.SwaggerJSON, restapi.FlatSwaggerJSON)
|
swaggerSpec, err := loads.Embedded(consoleapi.SwaggerJSON, consoleapi.FlatSwaggerJSON)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@ -238,18 +238,18 @@ func initConsoleServer() (*restapi.Server, error) {
|
|||||||
// Disable console logging if server debug log is not enabled
|
// Disable console logging if server debug log is not enabled
|
||||||
noLog := func(string, ...interface{}) {}
|
noLog := func(string, ...interface{}) {}
|
||||||
|
|
||||||
restapi.LogInfo = noLog
|
consoleapi.LogInfo = noLog
|
||||||
restapi.LogError = noLog
|
consoleapi.LogError = noLog
|
||||||
api.Logger = noLog
|
api.Logger = noLog
|
||||||
}
|
}
|
||||||
|
|
||||||
// Pass in console application config. This needs to happen before the
|
// Pass in console application config. This needs to happen before the
|
||||||
// ConfigureAPI() call.
|
// ConfigureAPI() call.
|
||||||
restapi.GlobalMinIOConfig = restapi.MinIOConfig{
|
consoleapi.GlobalMinIOConfig = consoleapi.MinIOConfig{
|
||||||
OpenIDProviders: buildOpenIDConsoleConfig(),
|
OpenIDProviders: buildOpenIDConsoleConfig(),
|
||||||
}
|
}
|
||||||
|
|
||||||
server := restapi.NewServer(api)
|
server := consoleapi.NewServer(api)
|
||||||
// register all APIs
|
// register all APIs
|
||||||
server.ConfigureAPI()
|
server.ConfigureAPI()
|
||||||
|
|
||||||
@ -257,16 +257,16 @@ func initConsoleServer() (*restapi.Server, error) {
|
|||||||
|
|
||||||
server.Host = globalMinioConsoleHost
|
server.Host = globalMinioConsoleHost
|
||||||
server.Port = consolePort
|
server.Port = consolePort
|
||||||
restapi.Port = globalMinioConsolePort
|
consoleapi.Port = globalMinioConsolePort
|
||||||
restapi.Hostname = globalMinioConsoleHost
|
consoleapi.Hostname = globalMinioConsoleHost
|
||||||
|
|
||||||
if globalIsTLS {
|
if globalIsTLS {
|
||||||
// If TLS certificates are provided enforce the HTTPS.
|
// If TLS certificates are provided enforce the HTTPS.
|
||||||
server.EnabledListeners = []string{"https"}
|
server.EnabledListeners = []string{"https"}
|
||||||
server.TLSPort = consolePort
|
server.TLSPort = consolePort
|
||||||
// Need to store tls-port, tls-host un config variables so secure.middleware can read from there
|
// Need to store tls-port, tls-host un config variables so secure.middleware can read from there
|
||||||
restapi.TLSPort = globalMinioConsolePort
|
consoleapi.TLSPort = globalMinioConsolePort
|
||||||
restapi.Hostname = globalMinioConsoleHost
|
consoleapi.Hostname = globalMinioConsoleHost
|
||||||
}
|
}
|
||||||
|
|
||||||
return server, nil
|
return server, nil
|
||||||
|
@ -25,7 +25,7 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/minio/console/restapi"
|
consoleapi "github.com/minio/console/api"
|
||||||
"github.com/minio/dnscache"
|
"github.com/minio/dnscache"
|
||||||
"github.com/minio/madmin-go/v3"
|
"github.com/minio/madmin-go/v3"
|
||||||
"github.com/minio/minio-go/v7"
|
"github.com/minio/minio-go/v7"
|
||||||
@ -395,7 +395,7 @@ var (
|
|||||||
|
|
||||||
globalTierJournal *TierJournal
|
globalTierJournal *TierJournal
|
||||||
|
|
||||||
globalConsoleSrv *restapi.Server
|
globalConsoleSrv *consoleapi.Server
|
||||||
|
|
||||||
// handles service freeze or un-freeze S3 API calls.
|
// handles service freeze or un-freeze S3 API calls.
|
||||||
globalServiceFreeze atomic.Value
|
globalServiceFreeze atomic.Value
|
||||||
|
2
go.mod
2
go.mod
@ -45,7 +45,7 @@ require (
|
|||||||
github.com/lithammer/shortuuid/v4 v4.0.0
|
github.com/lithammer/shortuuid/v4 v4.0.0
|
||||||
github.com/miekg/dns v1.1.57
|
github.com/miekg/dns v1.1.57
|
||||||
github.com/minio/cli v1.24.2
|
github.com/minio/cli v1.24.2
|
||||||
github.com/minio/console v0.43.1
|
github.com/minio/console v0.44.0
|
||||||
github.com/minio/csvparser v1.0.0
|
github.com/minio/csvparser v1.0.0
|
||||||
github.com/minio/dnscache v0.1.1
|
github.com/minio/dnscache v0.1.1
|
||||||
github.com/minio/dperf v0.5.3
|
github.com/minio/dperf v0.5.3
|
||||||
|
4
go.sum
4
go.sum
@ -430,8 +430,8 @@ github.com/minio/cli v1.24.2 h1:J+fCUh9mhPLjN3Lj/YhklXvxj8mnyE/D6FpFduXJ2jg=
|
|||||||
github.com/minio/cli v1.24.2/go.mod h1:bYxnK0uS629N3Bq+AOZZ+6lwF77Sodk4+UL9vNuXhOY=
|
github.com/minio/cli v1.24.2/go.mod h1:bYxnK0uS629N3Bq+AOZZ+6lwF77Sodk4+UL9vNuXhOY=
|
||||||
github.com/minio/colorjson v1.0.6 h1:m7TUvpvt0u7FBmVIEQNIa0T4NBQlxrcMBp4wJKsg2Ik=
|
github.com/minio/colorjson v1.0.6 h1:m7TUvpvt0u7FBmVIEQNIa0T4NBQlxrcMBp4wJKsg2Ik=
|
||||||
github.com/minio/colorjson v1.0.6/go.mod h1:LUXwS5ZGNb6Eh9f+t+3uJiowD3XsIWtsvTriUBeqgYs=
|
github.com/minio/colorjson v1.0.6/go.mod h1:LUXwS5ZGNb6Eh9f+t+3uJiowD3XsIWtsvTriUBeqgYs=
|
||||||
github.com/minio/console v0.43.1 h1:Z4dfVov1ysjzNGqV+NDJFa4F1jcF9cFT/Bkt2/oxKCA=
|
github.com/minio/console v0.44.0 h1:VclHJzIT7tzaTJ3JG6n5vBizpk7XyBIpyOFsv+E+ojE=
|
||||||
github.com/minio/console v0.43.1/go.mod h1:Qv5fqXgmYNBreEK2KwkIdtpDknu9wDgE10rur4yiRFI=
|
github.com/minio/console v0.44.0/go.mod h1:nUPbLiOTMLEDb2JK/tvY75l7Cg+d3BDqJhI7881U+rc=
|
||||||
github.com/minio/csvparser v1.0.0 h1:xJEHcYK8ZAjeW4hNV9Zu30u+/2o4UyPnYgyjWp8b7ZU=
|
github.com/minio/csvparser v1.0.0 h1:xJEHcYK8ZAjeW4hNV9Zu30u+/2o4UyPnYgyjWp8b7ZU=
|
||||||
github.com/minio/csvparser v1.0.0/go.mod h1:lKXskSLzPgC5WQyzP7maKH7Sl1cqvANXo9YCto8zbtM=
|
github.com/minio/csvparser v1.0.0/go.mod h1:lKXskSLzPgC5WQyzP7maKH7Sl1cqvANXo9YCto8zbtM=
|
||||||
github.com/minio/dnscache v0.1.1 h1:AMYLqomzskpORiUA1ciN9k7bZT1oB3YZN4cEIi88W5o=
|
github.com/minio/dnscache v0.1.1 h1:AMYLqomzskpORiUA1ciN9k7bZT1oB3YZN4cEIi88W5o=
|
||||||
|
Loading…
x
Reference in New Issue
Block a user