mirror of
https://github.com/minio/minio.git
synced 2025-11-24 03:27:44 -05:00
Pass SUBNET URL to console (#18503)
When minio runs with MINIO_CI_CD=on, it is expected to communicate with the locally running SUBNET. This is happening in the case of MinIO via call home functionality. However, the subnet-related functionality inside the console continues to talk to the SUBNET production URL. Because of this, the console cannot be tested with a locally running SUBNET. Set the env variable CONSOLE_SUBNET_URL correctly in such cases. (The console already has code to use the value of this variable as the subnet URL)
This commit is contained in:
@@ -29,8 +29,7 @@ import (
|
||||
|
||||
const (
|
||||
licUpdateCycle = 24 * time.Hour * 30
|
||||
licRenewURL = "https://subnet.min.io/api/cluster/renew-license"
|
||||
licRenewURLDev = "http://localhost:9000/api/cluster/renew-license"
|
||||
licRenewPath = "/api/cluster/renew-license"
|
||||
)
|
||||
|
||||
// initlicenseUpdateJob start the periodic license update job in the background.
|
||||
@@ -82,10 +81,7 @@ func licenceUpdaterLoop(ctx context.Context, objAPI ObjectLayer) {
|
||||
func performLicenseUpdate(ctx context.Context, objectAPI ObjectLayer) {
|
||||
// the subnet license renewal api renews the license only
|
||||
// if required e.g. when it is expiring soon
|
||||
url := licRenewURL
|
||||
if globalIsCICD {
|
||||
url = licRenewURLDev
|
||||
}
|
||||
url := globalSubnetConfig.BaseURL + licRenewPath
|
||||
|
||||
resp, err := globalSubnetConfig.Post(url, nil)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user