Read subnet proxy configuration from minio or env var (#1511)

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
This commit is contained in:
Lenin Alevski
2022-02-03 12:04:35 -06:00
committed by GitHub
parent 4091b11f99
commit 297c980a8d
11 changed files with 70 additions and 65 deletions

View File

@@ -87,6 +87,7 @@ func GetOrganizations(client cluster.HTTPClientI, token string) ([]*models.Subne
type LicenseTokenConfig struct {
APIKey string
License string
Proxy string
}
func Register(client cluster.HTTPClientI, admInfo madmin.InfoMessage, apiKey, token, accountID string) (*LicenseTokenConfig, error) {
@@ -115,7 +116,7 @@ func Register(client cluster.HTTPClientI, admInfo madmin.InfoMessage, apiKey, to
subnetAPIKey := respJSON.Get("api_key").String()
licenseJwt := respJSON.Get("license").String()
if subnetAPIKey != "" {
if subnetAPIKey != "" || licenseJwt != "" {
return &LicenseTokenConfig{
APIKey: subnetAPIKey,
License: licenseJwt,