Skip to content

Commit

Permalink
Feature: S3 attachments (#33)
Browse files Browse the repository at this point in the history
* add values for s3 attachments

* bump version
  • Loading branch information
machisuji authored Nov 2, 2023
1 parent e808dee commit 520bef6
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/openproject/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ home: "https://www.openproject.org/"
icon: "https://www.openproject.org/assets/images/press/openproject-icon-original-color-41055eb6.png"
type: "application"
appVersion: "13"
version: "2.3.0"
version: "2.4.0"
maintainers:
- name: OpenProject
url: https://github.com/opf/helm-charts
Expand Down
15 changes: 15 additions & 0 deletions charts/openproject/templates/secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,21 @@ stringData:
# Until https://community.openproject.org/wp/42390 is fixed (probably 12.5) we need the following setting
OPENPROJECT_SELF__REGISTRATION: "3"
{{- end }}
{{- if .Values.s3.enabled }}
OPENPROJECT_ATTACHMENTS__STORAGE: fog
OPENPROJECT_FOG_CREDENTIALS_PROVIDER: AWS
OPENPROJECT_FOG_CREDENTIALS_AWS__ACCESS__KEY__ID: {{ .Values.s3.accessKeyId }}
OPENPROJECT_FOG_CREDENTIALS_AWS__SECRET__ACCESS__KEY: {{ .Values.s3.secretAccessKey }}
{{- if .Values.s3.endpoint }}
OPENPROJECT_FOG_CREDENTIALS_ENDPOINT: {{ .Values.s3.endpoint }}
{{- end }}
OPENPROJECT_FOG_DIRECTORY: {{ .Values.s3.bucketName }}
OPENPROJECT_FOG_CREDENTIALS_REGION: {{ .Values.s3.region }}
OPENPROJECT_FOG_CREDENTIALS_PATH__STYLE: "{{ .Values.s3.pathStyle }}"
OPENPROJECT_FOG_CREDENTIALS_AWS__SIGNATURE__VERSION: "{{ .Values.s3.signatureVersion }}"
OPENPROJECT_FOG_CREDENTIALS_USE__IAM__PROFILE: "{{ .Values.s3.use_iam_profile }}"
OPENPROJECT_DIRECT__UPLOADS: "{{ .Values.s3.directUploads }}"
{{- end }}
# Additional environment variables
{{- range $key, $value := .Values.environment }}
{{ $key }}: {{ $value | quote }}
Expand Down
36 changes: 34 additions & 2 deletions charts/openproject/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,6 @@ openproject:
## Ref.: https://kubernetes.io/docs/concepts/storage/persistent-volumes/
#
persistence:
## Whether to enable session affinity or not. It is required by ingress.
#
enabled: true

## Define the volume access modes:
Expand All @@ -307,6 +305,40 @@ persistence:
## Define the class of PV.
storageClassName:

## Whether to use an S3-compatible object storage to store OpenProject attachments.
## If this is enabled, files will NOT be stored in the mounted volume configured in `persistence` above.
## The volume will not be used at all, so it `persistence.enabled` should be set to `false` in this case.
##
## Ref.: https://www.openproject.org/docs/installation-and-operations/configuration/#attachments-storage
#
s3:
enabled: false
accessKeyId:
secretAccessKey:
region:
bucketName:

## Remove or leave empty to use default AWS S3 endpoint
#
endpoint:
pathStyle: false
signatureVersion: 4
use_iam_profile: false

## If enabled, upload files directly to S3 from the browser instead of going through OpenProject.
## May not be supported by providers other than AWS S3 itself.
##
## Ref.: https://www.openproject.org/docs/installation-and-operations/configuration/#direct-uploads
#
directUploads: true

## You can always override these options via the environment, for instance:
##
## environment:
## OPENPROJECT_FOG_CREDENTIALS_REGION: 'us-east-1'
##
## Ref.: https://www.openproject.org/docs/installation-and-operations/configuration/#attachments-storage

## Define custom pod annotations.
#
podAnnotations: {}
Expand Down

0 comments on commit 520bef6

Please sign in to comment.