Skip to content

Commit

Permalink
adding mailer
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Aug 7, 2023
1 parent 72d6a44 commit 058c70f
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/humhub/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.14
version: 0.1.15

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
10 changes: 10 additions & 0 deletions charts/humhub/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,16 @@ Return the humhub-database Secret Name
{{- printf "%s-database" (include "humhub.fullname" .) -}}
{{- end -}}
{{- end -}}
{{/*
Return the humhub-database Secret Name
*/}}
{{- define "humhub.mailerSecretName" -}}
{{- if .Values.mailer.existingSecret }}
{{- printf "%s" .Values.mailer.existingSecret -}}
{{- else -}}
{{- printf "%s-mailer" (include "humhub.fullname" .) -}}
{{- end -}}
{{- end -}}

{{/*
Return the path to redis
Expand Down
22 changes: 22 additions & 0 deletions charts/humhub/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,28 @@ spec:
value: {{ .Values.autoinstall | quote }}
- name: HUMHUB_EMAIL
value: {{ .Values.humhubEmail | quote }}
- name: HUMHUB_MAILER_SYSTEM_EMAIL_ADDRESS
value: {{ .Values.mailer.systemEmailAdress | quote }}
- name: HUMHUB_MAILER_SYSTEM_EMAIL_NAME
value: {{ .Values.mailer.systemEmailName | quote }}
- name: HUMHUB_MAILER_TRANSPORT_TYPE
value: {{ .Values.mailer.transportType | quote }}
- name: HUMHUB_MAILER_HOSTNAME
value: {{ .Values.mailer.hostname | quote }}
- name: HUMHUB_MAILER_PORT
value: {{ .Values.mailer.port | quote }}
- name: HUMHUB_MAILER_USERNAME
value: {{ .Values.mailer.username | quote }}
- name: HUMHUB_MAILER_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "humhub.mailerSecretName" . }}
key: SMTP
- name: HUMHUB_MAILER_ENCRYPTION
value: {{ .Values.mailer.encryption | quote }}
- name: HUMHUB_MAILER_ALLOW_SELF_SIGNED_CERTS
value: {{ .Values.mailer.allowSelfSignedCerts | quote }}

- name: HUMHUB_LANG
value: {{ .Values.humhubLanguage | quote }}
- name: HUMHUB_DEBUG
Expand Down
9 changes: 9 additions & 0 deletions charts/humhub/templates/mailer-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{{- if (not .Values.mailer.existingSecret) }}
apiVersion: v1
kind: Secret
metadata:
name: {{ include "humhub.mailerSecretName" . }}
type: Opaque
data:
SMTP: {{.Values.mailer.password | b64enc | quote }}
{{- end }}
2 changes: 2 additions & 0 deletions charts/humhub/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,11 @@ mailer:
port: 25
username: ""
password: ""
existingSecret: ""
encryption: false
allowSelfSignedCerts: false


theming:
primary: "435f6f"
background: "f3f3f3"
Expand Down

0 comments on commit 058c70f

Please sign in to comment.