Allow save object to S3 in different region (#910)

* Allow save object to S3 in different region

* feat(helm & docker-compose): adds S3_REGION to helm chart & docker-compose

Explicitly adding the environment variable to deployment configuration files provides system operators with documentation of its existence.

Set to empty by default, which will result in the default value being used.

Co-authored-by: Iain Sproat <68657+iainsproat@users.noreply.github.com>
This commit is contained in:
Peter Grainger
2022-08-15 13:24:30 +01:00
committed by GitHub
parent 0084102d0d
commit 72d27b9a7c
7 changed files with 11 additions and 1 deletions
+1
View File
@@ -259,6 +259,7 @@ jobs:
S3_SECRET_KEY: 'minioadmin'
S3_BUCKET: 'speckle-server'
S3_CREATE_BUCKET: 'true'
S3_REGION: '' # optional, defaults to 'us-east-1'
steps:
- checkout
- restore_cache:
+2
View File
@@ -39,6 +39,7 @@ services:
S3_SECRET_KEY: 'minioadmin'
S3_BUCKET: 'speckle-server'
S3_CREATE_BUCKET: 'true'
S3_REGION: '' # optional, defaults to 'us-east-1'
FILE_SIZE_LIMIT_MB: 100
preview-service:
@@ -77,5 +78,6 @@ services:
S3_ACCESS_KEY: 'minioadmin'
S3_SECRET_KEY: 'minioadmin'
S3_BUCKET: 'speckle-server'
S3_REGION: '' # optional, defaults to 'us-east-1'
SPECKLE_SERVER_URL: 'http://speckle-server:3000'
@@ -27,7 +27,7 @@ const getS3Config = () => {
forcePathStyle: true,
// s3ForcePathStyle: true,
// signatureVersion: 'v4',
region: 'us-east-1'
region: process.env.S3_REGION || 'us-east-1'
}
}
return s3Config
@@ -79,6 +79,7 @@ services:
S3_SECRET_KEY: 'minioadmin'
S3_BUCKET: 'speckle-server'
S3_CREATE_BUCKET: 'true'
S3_REGION: '' # optional, defaults to 'us-east-1'
FILE_SIZE_LIMIT_MB: 100
@@ -116,5 +117,6 @@ services:
S3_ACCESS_KEY: 'minioadmin'
S3_SECRET_KEY: 'minioadmin'
S3_BUCKET: 'speckle-server'
S3_REGION: '' # optional, defaults to 'us-east-1'
SPECKLE_SERVER_URL: 'http://speckle-server:3000'
@@ -92,6 +92,8 @@ spec:
secretKeyRef:
name: {{ .Values.secretName }}
key: s3_secret_key
- name: S3_REGION
value: "{{ .Values.s3.region }}"
- name: FILE_IMPORT_TIME_LIMIT_MIN
value: {{ .Values.fileimport_service.time_limit_min | quote }}
@@ -141,6 +141,8 @@ spec:
key: s3_secret_key
- name: S3_CREATE_BUCKET
value: "{{ .Values.s3.create_bucket }}"
- name: S3_REGION
value: "{{ .Values.s3.region }}"
{{- end }}
+1
View File
@@ -27,6 +27,7 @@ s3:
bucket: ''
access_key: ''
create_bucket: 'false'
region: '' # optional, defaults to 'us-east-1'
# secret_key: secret -> s3_secret_key
networkPolicy: # if network policy is enabled for any service, this provides the networkPolicy with the necessary details to allow egress connections to the s3 compatible storage
externalToCluster: # use if the s3 compatible storage is external to the kubernetes cluster