Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .env.base
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_SCHEME=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=noreply@restarters.test
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious, is this a real address?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah we're good. The .test domains are reserved https://en.wikipedia.org/wiki/.test

MAIL_FROM_NAME=Restarters

# =============================================================================
# PUSHER CONFIGURATION
Expand Down
4 changes: 3 additions & 1 deletion .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ MAIL_HOST="$MAIL_HOST"
MAIL_PORT="$MAIL_PORT"
MAIL_USERNAME="$MAIL_USERNAME"
MAIL_PASSWORD="$MAIL_PASSWORD"
MAIL_SCHEME="$MAIL_SCHEME"
MAIL_ENCRYPTION="$MAIL_ENCRYPTION"
MAIL_FROM_ADDRESS="$MAIL_FROM_ADDRESS"
MAIL_FROM_NAME="$MAIL_FROM_NAME"

# =============================================================================
# PUSHER CONFIGURATION
Expand Down
2 changes: 1 addition & 1 deletion charts/restarters/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.2.0
version: 0.2.1

# 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/restarters/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,16 @@ Helper to generate environment variables from secrets
secretKeyRef:
name: {{ .Values.secrets.dbCredentials.secretName }}
key: {{ .Values.secrets.dbCredentials.keys.dbPassword }}
- name: MAIL_USERNAME
valueFrom:
secretKeyRef:
name: {{ .Values.secrets.mailCredentials.secretName }}
key: {{ .Values.secrets.mailCredentials.keys.mailUsername }}
- name: MAIL_PASSWORD
valueFrom:
secretKeyRef:
name: {{ .Values.secrets.mailCredentials.secretName }}
key: {{ .Values.secrets.mailCredentials.keys.mailPassword }}
{{- end }}

{{/*
Expand Down
14 changes: 14 additions & 0 deletions charts/restarters/templates/secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,17 @@ data:
{{ .Values.secrets.dbCredentials.keys.dbUsername }}: {{ .Values.secrets.dbCredentials.data.dbUsername | b64enc | quote }}
{{ .Values.secrets.dbCredentials.keys.dbPassword }}: {{ .Values.secrets.dbCredentials.data.dbPassword | b64enc | quote }}
{{- end }}

{{- if .Values.secrets.mailCredentials.createSecret }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ .Values.secrets.mailCredentials.secretName }}
labels:
{{- include "restarters.labels" . | nindent 4 }}
type: Opaque
data:
{{ .Values.secrets.mailCredentials.keys.mailUsername }}: {{ .Values.secrets.mailCredentials.data.mailUsername | b64enc | quote }}
{{ .Values.secrets.mailCredentials.keys.mailPassword }}: {{ .Values.secrets.mailCredentials.data.mailPassword | b64enc | quote }}
{{- end }}
18 changes: 15 additions & 3 deletions charts/restarters/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,18 @@ secrets:
dbDatabase: "your-db-database-here"
dbUsername: "your-db-username-here"
dbPassword: "your-db-password-here"
# Mail credentials
# IMPORTANT: For production deployments, create the secret externally and set createSecret: false
# For development, you can set createSecret: true and provide values in the data section
mailCredentials:
createSecret: true
secretName: "restarters-mail-credentials"
keys:
mailUsername: "MAIL_USERNAME"
mailPassword: "MAIL_PASSWORD"
data:
mailUsername: "your-mail-username-here"
mailPassword: "your-mail-password-here"

# Environment variable groups - organized by functionality
envGroups:
Expand Down Expand Up @@ -263,9 +275,9 @@ envGroups:
MAIL_MAILER: "smtp"
MAIL_HOST: "mailpit"
MAIL_PORT: "1025"
MAIL_USERNAME: "null"
MAIL_PASSWORD: "null"
MAIL_SCHEME: "null"
MAIL_ENCRYPTION: "null"
MAIL_FROM_ADDRESS: "noreply@restarters.test"
MAIL_FROM_NAME: "Restarters"

# Pusher configuration
pusher:
Expand Down