Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ephemeral ca cert path for RGW only #10697

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions ocs_ci/ocs/bucket_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
exec_nb_db_query,
exec_cmd,
)
from ocs_ci.helpers.helpers import create_resource
from ocs_ci.helpers.helpers import create_resource, storagecluster_independent_check
from ocs_ci.utility import version

logger = logging.getLogger(__name__)
Expand All @@ -52,13 +52,18 @@ def craft_s3_command(cmd, mcg_obj=None, api=False, signed_request_creds=None):
if (signed_request_creds and signed_request_creds.get("ssl")) is False
else ""
)

if mcg_obj:
if mcg_obj.region:
region = f"AWS_DEFAULT_REGION={mcg_obj.region} "
else:
region = ""
if storagecluster_independent_check() and config.EXTERNAL_MODE["rgw_secure"]:
AWS_CA_BUNDLE_PATH = constants.AWSCLI_CA_BUNDLE_PATH
else:
AWS_CA_BUNDLE_PATH = constants.SERVICE_CA_CRT_AWSCLI_PATH
base_command = (
f'sh -c "AWS_CA_BUNDLE={constants.AWSCLI_CA_BUNDLE_PATH} '
f'sh -c "AWS_CA_BUNDLE={AWS_CA_BUNDLE_PATH} '
f"AWS_ACCESS_KEY_ID={mcg_obj.access_key_id} "
f"AWS_SECRET_ACCESS_KEY={mcg_obj.access_key} "
f"{region}"
Expand Down
Loading