Skip to content

Commit

Permalink
Merge pull request #7750 from liqiang-fit2cloud/fix-7288
Browse files Browse the repository at this point in the history
Fix issue: harbor 1.7.4 aliyun oss chartmuseum 500
  • Loading branch information
ywk253100 authored May 16, 2019
2 parents a9d01a7 + 218889a commit 64cacc9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions make/photon/prepare/utils/chart.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,13 @@ def prepare_chartmuseum(config_dict):
elif storage_provider_name == 'oss':
# aliyun OSS
storage_driver = "alibaba"
storage_provider_config_options.append("STORAGE_ALIBABA_BUCKET=%s" % ( storage_provider_config_map.get("bucket") or '') )
bucket = storage_provider_config_map.get("bucket") or ''
endpoint = storage_provider_config_map.get("endpoint") or ''
if endpoint.startswith(bucket + "."):
endpoint = endpoint.replace(bucket + ".", "")
storage_provider_config_options.append("STORAGE_ALIBABA_BUCKET=%s" % bucket )
storage_provider_config_options.append("STORAGE_ALIBABA_ENDPOINT=%s" % endpoint )
storage_provider_config_options.append("STORAGE_ALIBABA_PREFIX=%s" % ( storage_provider_config_map.get("rootdirectory") or '') )
storage_provider_config_options.append("STORAGE_ALIBABA_ENDPOINT=%s" % ( storage_provider_config_map.get("endpoint") or '') )
storage_provider_config_options.append("ALIBABA_CLOUD_ACCESS_KEY_ID=%s" % ( storage_provider_config_map.get("accesskeyid") or '') )
storage_provider_config_options.append("ALIBABA_CLOUD_ACCESS_KEY_SECRET=%s" % ( storage_provider_config_map.get("accesskeysecret") or '') )
else:
Expand Down

0 comments on commit 64cacc9

Please sign in to comment.