Skip to content

Commit

Permalink
add is_minio check
Browse files Browse the repository at this point in the history
  • Loading branch information
maskarb committed Jan 23, 2025
1 parent 6a90622 commit 52b6d41
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions koku/koku/configurator.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ def __init__(self):
session = boto3.Session()
credentials = session.get_credentials()
self.credentials = credentials.get_frozen_credentials()
self.is_minio = ENVIRONMENT.get_value("TRINO_S3A_OR_S3", default="s3a") == "s3a"

@staticmethod
def get_feature_flag_host():
Expand Down Expand Up @@ -492,6 +493,8 @@ def get_object_store_tls():
return False

def get_object_store_access_key_default(self, requested_name: str = ""):
if self.is_minio:
return self.get_object_store_access_key(requested_name)
return self.credentials.access_key

@staticmethod
Expand All @@ -505,6 +508,8 @@ def get_object_store_access_key(requested_name: str = ""):
return LoadedConfig.objectStore.accessKey

def get_object_store_secret_key_default(self, requested_name: str = ""):
if self.is_minio:
return self.get_object_store_secret_key(requested_name)
return self.credentials.secret_key

@staticmethod
Expand Down

0 comments on commit 52b6d41

Please sign in to comment.