Skip to content

Commit

Permalink
SiSettings: run cdt on GCP using IAM roles
Browse files Browse the repository at this point in the history
  • Loading branch information
gousteris committed Nov 7, 2023
1 parent c4277e0 commit 6f8624b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/rptest/services/redpanda.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,14 +493,18 @@ def _load_s3_context(self, logger, test_context):
self.GLOBAL_S3_REGION_KEY, None)

# Enable S3 if AWS creds were given at globals
if cloud_storage_credentials_source == 'aws_instance_metadata':
if cloud_storage_credentials_source == 'aws_instance_metadata' or cloud_storage_credentials_source == 'gcp_instance_metadata':
logger.info("Running on AWS S3, setting IAM roles")
self.cloud_storage_credentials_source = cloud_storage_credentials_source
self.cloud_storage_access_key = None
self.cloud_storage_secret_key = None
self.endpoint_url = None # None so boto auto-gens the endpoint url
if test_context.globals.get(self.GLOBAL_CLOUD_PROVIDER,
'aws') == 'gcp':
self.endpoint_url = 'https://storage.googleapis.com'
self.cloud_storage_disable_tls = False # SI will fail to create archivers if tls is disabled
self.cloud_storage_region = cloud_storage_region
self.cloud_storage_api_endpoint_port = 443
elif cloud_storage_credentials_source == 'config_file' and cloud_storage_access_key and cloud_storage_secret_key:
logger.info("Running on AWS S3, setting credentials")
self.cloud_storage_access_key = cloud_storage_access_key
Expand Down

0 comments on commit 6f8624b

Please sign in to comment.