mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #5254 from swordqiu/automated-cherry-pick-of-#5252-upstream-release-3.1
Automated cherry pick of #5252: fix: use globalEndpointType as default endpoint type
This commit is contained in:
@@ -23,7 +23,7 @@ import (
|
||||
)
|
||||
|
||||
func setInfluxdbRetentionPolicy() error {
|
||||
urls, err := auth.GetServiceURLs("influxdb", options.Options.Region, "", "internal")
|
||||
urls, err := auth.GetServiceURLs("influxdb", options.Options.Region, "", "")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ func (l *SLocalImageCache) prepare(ctx context.Context, zone, srcUrl, format str
|
||||
l.consumerCount++
|
||||
return true, true
|
||||
}
|
||||
url, err := auth.GetServiceURL("image", "", zone, "public")
|
||||
url, err := auth.GetServiceURL("image", "", zone, "")
|
||||
if err != nil {
|
||||
log.Errorf("Failed to acquire image %s", err)
|
||||
return false, true
|
||||
|
||||
@@ -210,10 +210,16 @@ func (a *authManager) reAuth() {
|
||||
}
|
||||
|
||||
func (a *authManager) GetServiceURL(service, region, zone, endpointType string) (string, error) {
|
||||
if endpointType == "" && globalEndpointType != "" {
|
||||
endpointType = globalEndpointType
|
||||
}
|
||||
return a.adminCredential.GetServiceURL(service, region, zone, endpointType)
|
||||
}
|
||||
|
||||
func (a *authManager) GetServiceURLs(service, region, zone, endpointType string) ([]string, error) {
|
||||
if endpointType == "" && globalEndpointType != "" {
|
||||
endpointType = globalEndpointType
|
||||
}
|
||||
return a.adminCredential.GetServiceURLs(service, region, zone, endpointType)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user