Skip to content

Commit

Permalink
adds ability to pull an SMTP hostname from an existing kubernetes sec…
Browse files Browse the repository at this point in the history
…ret (#437)

Signed-off-by: jessebot <jessebot@linux.com>
  • Loading branch information
jessebot committed Sep 2, 2023
1 parent 3cf00cf commit f1d1dd7
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion charts/nextcloud/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: nextcloud
version: 4.1.1
version: 4.2.0
appVersion: 27.0.2
description: A file sharing server that puts the control and security of your own data back into your hands.
keywords:
Expand Down
1 change: 1 addition & 0 deletions charts/nextcloud/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ The following table lists the configurable parameters of the nextcloud chart and
| `nextcloud.existingSecret.passwordKey` | Name of the key that contains the password | `nil` |
| `nextcloud.existingSecret.smtpUsernameKey` | Name of the key that contains the SMTP username | `nil` |
| `nextcloud.existingSecret.smtpPasswordKey` | Name of the key that contains the SMTP password | `nil` |
| `nextcloud.existingSecret.smtpHostKey` | Name of the key that contains the SMTP hostname | `nil` |
| `nextcloud.update` | Trigger update if custom command is used | `0` |
| `nextcloud.containerPort` | Customize container port when not running as root | `80` |
| `nextcloud.datadir` | nextcloud data dir location | `/var/www/html/data` |
Expand Down
8 changes: 5 additions & 3 deletions charts/nextcloud/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
Expand Down Expand Up @@ -191,14 +190,17 @@ Create environment variables used to configure the nextcloud container as well a
value: {{ .Values.nextcloud.mail.fromAddress | quote }}
- name: MAIL_DOMAIN
value: {{ .Values.nextcloud.mail.domain | quote }}
- name: SMTP_HOST
value: {{ .Values.nextcloud.mail.smtp.host | quote }}
- name: SMTP_SECURE
value: {{ .Values.nextcloud.mail.smtp.secure | quote }}
- name: SMTP_PORT
value: {{ .Values.nextcloud.mail.smtp.port | quote }}
- name: SMTP_AUTHTYPE
value: {{ .Values.nextcloud.mail.smtp.authtype | quote }}
- name: SMTP_HOST
valueFrom:
secretKeyRef:
name: {{ .Values.nextcloud.existingSecret.secretName | default (include "nextcloud.fullname" .) }}
key: {{ .Values.nextcloud.existingSecret.smtpHostKey | default "smtp-host" }}
- name: SMTP_NAME
valueFrom:
secretKeyRef:
Expand Down
1 change: 1 addition & 0 deletions charts/nextcloud/templates/secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ data:
{{- if .Values.nextcloud.mail.enabled }}
smtp-username: {{ default "" .Values.nextcloud.mail.smtp.name | b64enc | quote }}
smtp-password: {{ default "" .Values.nextcloud.mail.smtp.password | b64enc | quote }}
smtp-host: {{ default "" .Values.nextcloud.mail.smtp.host | b64enc | quote }}
{{- end }}
{{- end }}
1 change: 1 addition & 0 deletions charts/nextcloud/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ nextcloud:
# tokenKey: nextcloud-token
# smtpUsernameKey: smtp-username
# smtpPasswordKey: smtp-password
# smtpHostKey: smtp-host
update: 0
# If web server is not binding default port, you can define it
containerPort: 80
Expand Down

0 comments on commit f1d1dd7

Please sign in to comment.