mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -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:
@@ -157,15 +157,11 @@ func performCallhome(ctx context.Context) {
|
||||
}
|
||||
|
||||
const (
|
||||
healthURL = "https://subnet.min.io/api/health/upload"
|
||||
healthURLDev = "http://localhost:9000/api/health/upload"
|
||||
subnetHealthPath = "/api/health/upload"
|
||||
)
|
||||
|
||||
func sendHealthInfo(ctx context.Context, healthInfo madmin.HealthInfo) error {
|
||||
url := healthURL
|
||||
if globalIsCICD {
|
||||
url = healthURLDev
|
||||
}
|
||||
url := globalSubnetConfig.BaseURL + subnetHealthPath
|
||||
|
||||
filename := fmt.Sprintf("health_%s.json.gz", UTCNow().Format("20060102150405"))
|
||||
url += "?filename=" + filename
|
||||
|
||||
Reference in New Issue
Block a user