Add region for the export bucket
This commit is contained in:
parent
dd9e16969a
commit
14d1c18268
8
Tiltfile
8
Tiltfile
@ -97,11 +97,13 @@ local_resource(
|
||||
# if using local S3 exports
|
||||
# k8s_yaml(configmap_from_dict("mev-inspect-export", inputs = {
|
||||
# "export-bucket-name" : "local-export",
|
||||
# "export-bucket-region": "us-east-1",
|
||||
# }))
|
||||
#
|
||||
# helm_remote("localstack",
|
||||
# repo_name="localstack-charts",
|
||||
# repo_url="https://localstack.github.io/helm-charts",
|
||||
# helm_remote(
|
||||
# "localstack",
|
||||
# repo_name="localstack-charts",
|
||||
# repo_url="https://localstack.github.io/helm-charts",
|
||||
# )
|
||||
#
|
||||
# local_resource(
|
||||
|
@ -91,6 +91,16 @@ spec:
|
||||
name: mev-inspect-listener-healthcheck
|
||||
key: url
|
||||
optional: true
|
||||
- name: EXPORT_BUCKET_NAME
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: mev-inspect-export
|
||||
key: export-bucket-name
|
||||
- name: EXPORT_BUCKET_REGION
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: mev-inspect-export
|
||||
key: export-bucket-region
|
||||
{{- range .Values.extraEnv }}
|
||||
- name: {{ .name }}
|
||||
value: {{ .value }}
|
||||
|
@ -96,6 +96,11 @@ spec:
|
||||
configMapKeyRef:
|
||||
name: mev-inspect-export
|
||||
key: export-bucket-name
|
||||
- name: EXPORT_BUCKET_REGION
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: mev-inspect-export
|
||||
key: export-bucket-region
|
||||
{{- range .Values.extraEnv }}
|
||||
- name: {{ .name }}
|
||||
value: {{ .value }}
|
||||
|
@ -50,7 +50,11 @@ def export_block_range(
|
||||
|
||||
def get_s3_client():
|
||||
endpoint_url = get_endpoint_url()
|
||||
return boto3.client("s3", endpoint_url=endpoint_url)
|
||||
return boto3.client(
|
||||
"s3",
|
||||
endpoint_url=endpoint_url,
|
||||
region_name=get_export_bucket_region(),
|
||||
)
|
||||
|
||||
|
||||
def get_endpoint_url() -> Optional[str]:
|
||||
@ -59,3 +63,7 @@ def get_endpoint_url() -> Optional[str]:
|
||||
|
||||
def get_export_bucket_name() -> str:
|
||||
return os.environ["EXPORT_BUCKET_NAME"]
|
||||
|
||||
|
||||
def get_export_bucket_region() -> str:
|
||||
return os.environ["EXPORT_BUCKET_REGION"]
|
||||
|
Loading…
x
Reference in New Issue
Block a user