Skip to content

Commit 520bef6

Browse files
authored
Feature: S3 attachments (#33)
* add values for s3 attachments * bump version
1 parent e808dee commit 520bef6

File tree

3 files changed

+50
-3
lines changed

3 files changed

+50
-3
lines changed

charts/openproject/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ home: "https://www.openproject.org/"
66
icon: "https://www.openproject.org/assets/images/press/openproject-icon-original-color-41055eb6.png"
77
type: "application"
88
appVersion: "13"
9-
version: "2.3.0"
9+
version: "2.4.0"
1010
maintainers:
1111
- name: OpenProject
1212
url: https://github.com/opf/helm-charts

charts/openproject/templates/secrets.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,21 @@ stringData:
4848
# Until https://community.openproject.org/wp/42390 is fixed (probably 12.5) we need the following setting
4949
OPENPROJECT_SELF__REGISTRATION: "3"
5050
{{- end }}
51+
{{- if .Values.s3.enabled }}
52+
OPENPROJECT_ATTACHMENTS__STORAGE: fog
53+
OPENPROJECT_FOG_CREDENTIALS_PROVIDER: AWS
54+
OPENPROJECT_FOG_CREDENTIALS_AWS__ACCESS__KEY__ID: {{ .Values.s3.accessKeyId }}
55+
OPENPROJECT_FOG_CREDENTIALS_AWS__SECRET__ACCESS__KEY: {{ .Values.s3.secretAccessKey }}
56+
{{- if .Values.s3.endpoint }}
57+
OPENPROJECT_FOG_CREDENTIALS_ENDPOINT: {{ .Values.s3.endpoint }}
58+
{{- end }}
59+
OPENPROJECT_FOG_DIRECTORY: {{ .Values.s3.bucketName }}
60+
OPENPROJECT_FOG_CREDENTIALS_REGION: {{ .Values.s3.region }}
61+
OPENPROJECT_FOG_CREDENTIALS_PATH__STYLE: "{{ .Values.s3.pathStyle }}"
62+
OPENPROJECT_FOG_CREDENTIALS_AWS__SIGNATURE__VERSION: "{{ .Values.s3.signatureVersion }}"
63+
OPENPROJECT_FOG_CREDENTIALS_USE__IAM__PROFILE: "{{ .Values.s3.use_iam_profile }}"
64+
OPENPROJECT_DIRECT__UPLOADS: "{{ .Values.s3.directUploads }}"
65+
{{- end }}
5166
# Additional environment variables
5267
{{- range $key, $value := .Values.environment }}
5368
{{ $key }}: {{ $value | quote }}

charts/openproject/values.yaml

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,8 +280,6 @@ openproject:
280280
## Ref.: https://kubernetes.io/docs/concepts/storage/persistent-volumes/
281281
#
282282
persistence:
283-
## Whether to enable session affinity or not. It is required by ingress.
284-
#
285283
enabled: true
286284

287285
## Define the volume access modes:
@@ -307,6 +305,40 @@ persistence:
307305
## Define the class of PV.
308306
storageClassName:
309307

308+
## Whether to use an S3-compatible object storage to store OpenProject attachments.
309+
## If this is enabled, files will NOT be stored in the mounted volume configured in `persistence` above.
310+
## The volume will not be used at all, so it `persistence.enabled` should be set to `false` in this case.
311+
##
312+
## Ref.: https://www.openproject.org/docs/installation-and-operations/configuration/#attachments-storage
313+
#
314+
s3:
315+
enabled: false
316+
accessKeyId:
317+
secretAccessKey:
318+
region:
319+
bucketName:
320+
321+
## Remove or leave empty to use default AWS S3 endpoint
322+
#
323+
endpoint:
324+
pathStyle: false
325+
signatureVersion: 4
326+
use_iam_profile: false
327+
328+
## If enabled, upload files directly to S3 from the browser instead of going through OpenProject.
329+
## May not be supported by providers other than AWS S3 itself.
330+
##
331+
## Ref.: https://www.openproject.org/docs/installation-and-operations/configuration/#direct-uploads
332+
#
333+
directUploads: true
334+
335+
## You can always override these options via the environment, for instance:
336+
##
337+
## environment:
338+
## OPENPROJECT_FOG_CREDENTIALS_REGION: 'us-east-1'
339+
##
340+
## Ref.: https://www.openproject.org/docs/installation-and-operations/configuration/#attachments-storage
341+
310342
## Define custom pod annotations.
311343
#
312344
podAnnotations: {}

0 commit comments

Comments
 (0)