Pass through AWS creds as well. Turn into a secret. Make all optional for folks not using the export
This commit is contained in:
parent
c079ac9aa6
commit
4dbe6ed2d7
4
Tiltfile
4
Tiltfile
@ -95,9 +95,11 @@ local_resource(
|
|||||||
)
|
)
|
||||||
|
|
||||||
# if using local S3 exports
|
# if using local S3 exports
|
||||||
# k8s_yaml(configmap_from_dict("mev-inspect-export", inputs = {
|
# k8s_yaml(secret_from_dict("mev-inspect-export", inputs = {
|
||||||
# "export-bucket-name" : "local-export",
|
# "export-bucket-name" : "local-export",
|
||||||
# "export-bucket-region": "us-east-1",
|
# "export-bucket-region": "us-east-1",
|
||||||
|
# "export-aws-access-key-id": "foobar",
|
||||||
|
# "export-aws-secret-access-key": "foobar",
|
||||||
# }))
|
# }))
|
||||||
#
|
#
|
||||||
# helm_remote(
|
# helm_remote(
|
||||||
|
@ -93,14 +93,28 @@ spec:
|
|||||||
optional: true
|
optional: true
|
||||||
- name: EXPORT_BUCKET_NAME
|
- name: EXPORT_BUCKET_NAME
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
secretKeyRef:
|
||||||
name: mev-inspect-export
|
name: mev-inspect-export
|
||||||
key: export-bucket-name
|
key: export-bucket-name
|
||||||
|
optional: true
|
||||||
- name: EXPORT_BUCKET_REGION
|
- name: EXPORT_BUCKET_REGION
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
secretKeyRef:
|
||||||
name: mev-inspect-export
|
name: mev-inspect-export
|
||||||
key: export-bucket-region
|
key: export-bucket-region
|
||||||
|
optional: true
|
||||||
|
- name: EXPORT_AWS_ACCESS_KEY_ID
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: mev-inspect-export
|
||||||
|
key: export-aws-access-key-id
|
||||||
|
optional: true
|
||||||
|
- name: EXPORT_AWS_SECRET_ACCESS_KEY
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: mev-inspect-export
|
||||||
|
key: export-aws-secret-access-key
|
||||||
|
optional: true
|
||||||
{{- range .Values.extraEnv }}
|
{{- range .Values.extraEnv }}
|
||||||
- name: {{ .name }}
|
- name: {{ .name }}
|
||||||
value: {{ .value }}
|
value: {{ .value }}
|
||||||
|
@ -93,14 +93,28 @@ spec:
|
|||||||
optional: true
|
optional: true
|
||||||
- name: EXPORT_BUCKET_NAME
|
- name: EXPORT_BUCKET_NAME
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
secretKeyRef:
|
||||||
name: mev-inspect-export
|
name: mev-inspect-export
|
||||||
key: export-bucket-name
|
key: export-bucket-name
|
||||||
|
optional: true
|
||||||
- name: EXPORT_BUCKET_REGION
|
- name: EXPORT_BUCKET_REGION
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
secretKeyRef:
|
||||||
name: mev-inspect-export
|
name: mev-inspect-export
|
||||||
key: export-bucket-region
|
key: export-bucket-region
|
||||||
|
optional: true
|
||||||
|
- name: EXPORT_AWS_ACCESS_KEY_ID
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: mev-inspect-export
|
||||||
|
key: export-aws-access-key-id
|
||||||
|
optional: true
|
||||||
|
- name: EXPORT_AWS_SECRET_ACCESS_KEY
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: mev-inspect-export
|
||||||
|
key: export-aws-secret-access-key
|
||||||
|
optional: true
|
||||||
{{- range .Values.extraEnv }}
|
{{- range .Values.extraEnv }}
|
||||||
- name: {{ .name }}
|
- name: {{ .name }}
|
||||||
value: {{ .value }}
|
value: {{ .value }}
|
||||||
|
@ -54,6 +54,8 @@ def get_s3_client():
|
|||||||
"s3",
|
"s3",
|
||||||
endpoint_url=endpoint_url,
|
endpoint_url=endpoint_url,
|
||||||
region_name=get_export_bucket_region(),
|
region_name=get_export_bucket_region(),
|
||||||
|
aws_access_key_id=get_export_aws_access_key_id(),
|
||||||
|
aws_secret_access_key=get_export_aws_secret_access_key(),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -67,3 +69,11 @@ def get_export_bucket_name() -> str:
|
|||||||
|
|
||||||
def get_export_bucket_region() -> str:
|
def get_export_bucket_region() -> str:
|
||||||
return os.environ["EXPORT_BUCKET_REGION"]
|
return os.environ["EXPORT_BUCKET_REGION"]
|
||||||
|
|
||||||
|
|
||||||
|
def get_export_aws_access_key_id() -> str:
|
||||||
|
return os.environ["EXPORT_AWS_ACCESS_KEY_ID"]
|
||||||
|
|
||||||
|
|
||||||
|
def get_export_aws_secret_access_key() -> str:
|
||||||
|
return os.environ["EXPORT_AWS_SECRET_ACCESS_KEY"]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user