Fix storagesvc url in archive (#2982)

Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
This commit is contained in:
soharab-ic
2024-08-14 18:02:05 +05:30
committed by GitHub
parent 7203cbf846
commit cb3a765495
2 changed files with 20 additions and 2 deletions
+3 -2
View File
@@ -104,11 +104,12 @@ func getArchiveURL(ctx context.Context, client cmd.Client, archiveID string, ser
storageType := resp.Header.Get("X-FISSION-STORAGETYPE")
if storageType == "local" {
storagesvcURL, err := util.GetStorageURL(ctx, client)
storageSvc, err := util.GetSvcName(ctx, client.KubernetesClient, "fission-storage")
if err != nil {
return "", err
}
client := storageSvcClient.MakeClient(storagesvcURL.String())
storagesvcURL := "http://" + storageSvc
client := storageSvcClient.MakeClient(storagesvcURL)
return client.GetUrl(archiveID), nil
} else if storageType == "s3" {
storageBucket := resp.Header.Get("X-FISSION-BUCKET")