Skip to content

Commit

Permalink
Support verify variable with storage-config json style (fix-3263) (ks…
Browse files Browse the repository at this point in the history
…erve#3267)

support verify variable with storage-config json style (fix-3263)

Signed-off-by: jooho <jlee@redhat.com>
  • Loading branch information
Jooho committed Nov 24, 2023
1 parent 7b7ae32 commit c1cf388
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/kserve/kserve/storage/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ def _update_with_storage_spec():
os.environ["AWS_SECRET_ACCESS_KEY"] = storage_secret_json.get("secret_access_key", "")
os.environ["AWS_DEFAULT_REGION"] = storage_secret_json.get("region", "")
os.environ["AWS_CA_BUNDLE"] = storage_secret_json.get("certificate", "")
os.environ["S3_VERIFY_SSL"] = storage_secret_json.get("verify_ssl", "1")
os.environ["awsAnonymousCredential"] = storage_secret_json.get("anonymous", "")

if storage_secret_json.get("type", "") == "hdfs" or storage_secret_json.get("type", "") == "webhdfs":
Expand Down Expand Up @@ -168,7 +169,7 @@ def _download_s3(uri, temp_dir: str):
kwargs.update({"endpoint_url": endpoint_url})
verify_ssl = os.getenv("S3_VERIFY_SSL")
if verify_ssl:
verify_ssl = verify_ssl != "0"
verify_ssl = not verify_ssl.lower() in ["0", "false"]
kwargs.update({"verify": verify_ssl})
s3 = boto3.resource("s3", **kwargs)
parsed = urlparse(uri, scheme='s3')
Expand Down

0 comments on commit c1cf388

Please sign in to comment.