Skip to content

Commit

Permalink
add support to set subnet license for embedded console
Browse files Browse the repository at this point in the history
  • Loading branch information
harshavardhana committed Aug 17, 2021
1 parent 17e0de1 commit ea8f781
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/common-main.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ func minioConfigToConsoleFeatures() {
}
os.Setenv("CONSOLE_MINIO_REGION", globalServerRegion)
os.Setenv("CONSOLE_CERT_PASSWD", env.Get("MINIO_CERT_PASSWD", ""))
if globalSubnetLicense != "" {
os.Setenv("CONSOLE_SUBNET_LICENSE", globalSubnetLicense)
}
}

func initConsoleServer() (*restapi.Server, error) {
Expand Down Expand Up @@ -596,6 +599,8 @@ func handleCommonEnvVars() {
if tiers := env.Get("_MINIO_DEBUG_REMOTE_TIERS_IMMEDIATELY", ""); tiers != "" {
globalDebugRemoteTiersImmediately = strings.Split(tiers, ",")
}

globalSubnetLicense = env.Get(config.EnvMinIOSubnetLicense, "")
}

func logStartupMessage(msg string) {
Expand Down
3 changes: 3 additions & 0 deletions cmd/globals.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,9 @@ var (
// The name of this local node, fetched from arguments
globalLocalNodeName string

// The global subnet license
globalSubnetLicense string

globalRemoteEndpoints map[string]Endpoint

// Global server's network statistics
Expand Down
1 change: 1 addition & 0 deletions internal/config/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ const (
EnvArgs = "MINIO_ARGS"
EnvDNSWebhook = "MINIO_DNS_WEBHOOK_ENDPOINT"

EnvMinIOSubnetLicense = "MINIO_SUBNET_LICENSE"
EnvMinIOServerURL = "MINIO_SERVER_URL"
EnvMinIOBrowserRedirectURL = "MINIO_BROWSER_REDIRECT_URL"
EnvRootDiskThresholdSize = "MINIO_ROOTDISK_THRESHOLD_SIZE"
Expand Down

0 comments on commit ea8f781

Please sign in to comment.