Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
a65c908ec7
|
|||
|
a2826da910
|
|||
|
5430859e9e
|
|||
|
90434d273b
|
|||
|
80014450fa
|
|||
|
31908f6439
|
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
*.swp
|
||||
*.tar.gz
|
||||
@@ -1,2 +1,10 @@
|
||||
# mailman3-helm-chart
|
||||
Helm chart for Mailman3 deployment
|
||||
|
||||
Fork of [fw8/mailman3-helm-chart](https://github.com/fw8/mailman3-helm-chart).
|
||||
|
||||
## Changelog
|
||||
|
||||
- Updated Ingress configuration
|
||||
- Supports external SMTP configuration
|
||||
- Added Bitnami PostgreSQL sub chart
|
||||
|
||||
@@ -15,9 +15,20 @@ 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.0.2
|
||||
version: 1.0.4
|
||||
|
||||
# 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
|
||||
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||
appVersion: 0.3.10
|
||||
|
||||
maintainers:
|
||||
- name: Eric O'Neill Meehan
|
||||
email: eric@eom.dev
|
||||
|
||||
dependencies:
|
||||
# https://github.com/bitnami/charts/blob/main/bitnami/postgresql
|
||||
- name: postgresql
|
||||
repository: oci://registry-1.docker.io/bitnamicharts
|
||||
version: 16.7.27
|
||||
condition: postgresql.enabled
|
||||
|
||||
@@ -47,12 +47,26 @@ spec:
|
||||
value: http://{{ include "mailman3.fullname" . }}-web.{{ .Release.Namespace }}.svc.{{ $clusterDomain }}/hyperkitty
|
||||
- name: MTA
|
||||
value: postfix
|
||||
{{- if .Values.smtp }}
|
||||
- name: SMTP_HOST
|
||||
value: {{ .Values.smtp.host }}
|
||||
- name: SMTP_PORT
|
||||
value: {{ .Values.smtp.port }}
|
||||
{{- else }}
|
||||
- name: SMTP_HOST
|
||||
value: {{ include "mailman3.fullname" . }}-core.{{ .Release.Namespace }}.svc.{{ $clusterDomain }}
|
||||
{{- end }}
|
||||
{{- if .Values.postgresql.enabled }}
|
||||
- name: DATABASE_CLASS
|
||||
value: mailman.database.postgresql.PostgreSQLDatabase
|
||||
- name: DATABASE_URL
|
||||
value: "postgresql://{{ .Values.postgresql.global.postgresql.auth.username }}:{{ .Values.postgresql.global.postgresql.auth.password }}@postgresql/mailman"
|
||||
{{- else }}
|
||||
- name: DATABASE_CLASS
|
||||
value: mailman.database.sqlite.SQLiteDatabase
|
||||
- name: DATABASE_URL
|
||||
value: "sqlite:////opt/mailman/var/data/mailman.db"
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: api
|
||||
containerPort: 8001
|
||||
@@ -76,6 +90,8 @@ spec:
|
||||
mountPath: /opt/mailman
|
||||
resources:
|
||||
{{- toYaml .Values.core.resources | nindent 12 }}
|
||||
{{- if .Values.smtp }}
|
||||
{{- else }}
|
||||
- name: postfix
|
||||
image: boky/postfix:latest
|
||||
env:
|
||||
@@ -118,6 +134,7 @@ spec:
|
||||
- name: core-data
|
||||
subPath: var/data
|
||||
mountPath: /mailman
|
||||
{{- end }}
|
||||
{{- with .Values.core.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
|
||||
@@ -1,33 +1,63 @@
|
||||
{{- if .Values.ingress.enabled -}}
|
||||
{{- $fullName := include "mailman3.fullname" . -}}
|
||||
{{- $svcPort := .Values.service.port -}}
|
||||
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
{{- else -}}
|
||||
apiVersion: extensions/v1beta1
|
||||
{{- end }}
|
||||
{{- $httpPort := .Values.service.port -}}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ $fullName }}
|
||||
namespace: {{ .Values.namespace | default .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "mailman3.labels" . | nindent 4 }}
|
||||
{{- with .Values.ingress.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- range $key, $value := .Values.ingress.annotations }}
|
||||
{{ $key }}: {{ $value | quote }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.ingress.tls }}
|
||||
ingressClassName: {{ tpl .Values.ingress.className . }}
|
||||
{{- if .Values.ingress.tls }}
|
||||
tls:
|
||||
{{- range .Values.ingress.tls }}
|
||||
- hosts:
|
||||
- {{ .Values.hostname }}
|
||||
secretName: {{ include "mailman3.fullname" . }}-certificate
|
||||
{{- range .hosts }}
|
||||
- {{ tpl . $ | quote }}
|
||||
{{- end }}
|
||||
secretName: {{ .secretName }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
rules:
|
||||
- host: {{ .Values.hostname | quote }}
|
||||
{{- range .Values.ingress.hosts }}
|
||||
- host: {{ tpl .host $ | quote }}
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
{{- if .paths }}
|
||||
{{- range .paths }}
|
||||
{{- if kindIs "string" . }}
|
||||
- path: {{ . }}
|
||||
pathType: {{ default "Prefix" $.Values.ingress.pathType }}
|
||||
backend:
|
||||
serviceName: {{ include "mailman3.fullname" . }}-web
|
||||
servicePort: 80
|
||||
service:
|
||||
name: {{ $fullName }}-web
|
||||
port:
|
||||
number: {{ $httpPort }}
|
||||
{{- else }}
|
||||
- path: {{ .path | default "/" }}
|
||||
pathType: {{ .pathType | default "Prefix" }}
|
||||
backend:
|
||||
service:
|
||||
name: {{ $fullName }}-web
|
||||
port:
|
||||
number: {{ $httpPort }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
- path: "/"
|
||||
pathType: "Prefix"
|
||||
backend:
|
||||
service:
|
||||
name: {{ $fullName }}-web
|
||||
port:
|
||||
number: {{ $httpPort }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
|
||||
@@ -51,17 +51,32 @@ spec:
|
||||
- name: SERVE_FROM_DOMAIN
|
||||
value: {{ .Values.hostname | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.postgresql.enabled }}
|
||||
- name: DATABASE_URL
|
||||
value: "postgresql://{{ .Values.postgresql.global.postgresql.auth.username }}:{{ .Values.postgresql.global.postgresql.auth.password }}@postgresql/mailman"
|
||||
- name: DATABASE_TYPE
|
||||
value: postgresql
|
||||
{{- else }}
|
||||
- name: DATABASE_URL
|
||||
value: sqlite://///opt/mailman-web-data/mailmanweb.db
|
||||
- name: DATABASE_TYPE
|
||||
value: sqlite
|
||||
{{- end }}
|
||||
- name: MAILMAN_ADMIN_USER
|
||||
value: {{ .Values.admin.username }}
|
||||
- name: MAILMAN_ADMIN_EMAIL
|
||||
value: {{ .Values.admin.email }}
|
||||
{{- if .Values.smtp }}
|
||||
- name: SMTP_HOST
|
||||
value: {{ .Values.smtp }}
|
||||
value: {{ .Values.smtp.host }}
|
||||
- name: SMTP_PORT
|
||||
value: {{ .Values.smtp.port }}
|
||||
- name: SMTP_HOST_USER
|
||||
value: {{ .Values.smtp.host_user }}
|
||||
- name: SMTP_HOST_PASSWORD
|
||||
value: {{ .Values.smtp.host_password }}
|
||||
- name: SMTP_USE_TLS
|
||||
value: {{ .Values.smtp.use_tls }}
|
||||
{{- else }}
|
||||
- name: SMTP_HOST
|
||||
value: {{ include "mailman3.fullname" . }}-core.{{ .Release.Namespace }}.svc.{{ $clusterDomain }}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#hyperkittyApiKey: supersecret
|
||||
#djangoSecretKey: supersecret
|
||||
|
||||
hostname: lists.example.org
|
||||
hostname: lists.example.com
|
||||
|
||||
imagePullSecrets: []
|
||||
nameOverride: ""
|
||||
@@ -65,14 +65,98 @@ web:
|
||||
size: 100Gi
|
||||
accessMode: ReadWriteOnce
|
||||
|
||||
smtp: null
|
||||
# host: mail.example.com
|
||||
# port: 25
|
||||
# host_user: admin@example.com
|
||||
# host_password: changeme
|
||||
# use_tls: "true"
|
||||
|
||||
service:
|
||||
type: ClusterIP
|
||||
port: 80
|
||||
|
||||
ingress:
|
||||
enabled: false
|
||||
tls: false
|
||||
annotations:
|
||||
# use NGINX Ingress Controller
|
||||
#kubernetes.io/ingress.class: "nginx"
|
||||
# use Cert-Manager for LetsEncrypt Certificates
|
||||
#cert-manager.io/issuer: "letsencrypt-prod"
|
||||
className: ""
|
||||
pathType: Prefix
|
||||
annotations: {}
|
||||
hosts:
|
||||
- host: lists.example.com
|
||||
paths:
|
||||
- path: /
|
||||
tls: []
|
||||
# - secretName: chart-example-tls
|
||||
# hosts:
|
||||
# - git.example.com
|
||||
|
||||
## @section PostgreSQL
|
||||
# Taken from Gitea Helm chart
|
||||
postgresql:
|
||||
## @param postgresql.enabled Enable PostgreSQL
|
||||
enabled: false
|
||||
|
||||
## @param postgresql.global.postgresql.auth.password Password for the `mailman` user (overrides `auth.password`)
|
||||
## @param postgresql.global.postgresql.auth.database Name for a custom database to create (overrides `auth.database`)
|
||||
## @param postgresql.global.postgresql.auth.username Name for a custom user to create (overrides `auth.username`)
|
||||
## @param postgresql.global.postgresql.service.ports.postgresql PostgreSQL service port (overrides `service.ports.postgresql`)
|
||||
global:
|
||||
postgresql:
|
||||
auth:
|
||||
password: mailman
|
||||
database: mailman
|
||||
username: mailman
|
||||
service:
|
||||
ports:
|
||||
postgresql: 5432
|
||||
|
||||
## @param postgresql.image.repository Image repository, eg. `bitnamilegacy/postgresql`.
|
||||
image:
|
||||
repository: bitnamilegacy/postgresql
|
||||
|
||||
primary:
|
||||
## @param postgresql.primary.persistence.enabled Enable persistence.
|
||||
## @param postgresql.primary.persistence.storageClass Persistent Volume storage class.
|
||||
## @param postgresql.primary.persistence.size PVC Storage Request for PostgreSQL volume.
|
||||
persistence:
|
||||
enabled: true
|
||||
storageClass: ""
|
||||
size: 10Gi
|
||||
|
||||
readReplicas:
|
||||
## @param postgresql.readReplicas.persistence.enabled Enable PostgreSQL read only data persistence using PVC.
|
||||
## @param postgresql.readReplicas.persistence.storageClass Persistent Volume storage class.
|
||||
## @param postgresql.readReplicas.persistence.size PVC Storage Request for PostgreSQL volume.
|
||||
persistence:
|
||||
enabled: true
|
||||
storageClass: ""
|
||||
size: ""
|
||||
|
||||
## @param postgresql.metrics.image.repository Image repository, eg. `bitnamilegacy/postgres-exporter`.
|
||||
metrics:
|
||||
image:
|
||||
repository: bitnamilegacy/postgres-exporter
|
||||
|
||||
## @param postgresql.volumePermissions.image.repository Image repository, eg. `bitnamilegacy/os-shell`.
|
||||
volumePermissions:
|
||||
image:
|
||||
repository: bitnamilegacy/os-shell
|
||||
|
||||
# By default, removed or moved settings that still remain in a user defined values.yaml will cause Helm to fail running the install/update.
|
||||
# Set it to false to skip this basic validation check.
|
||||
## @section Advanced
|
||||
## @param checkDeprecation Set it to false to skip this basic validation check.
|
||||
## @param test.enabled Set it to false to disable test-connection Pod.
|
||||
## @param test.image.name Image name for the wget container used in the test-connection Pod.
|
||||
## @param test.image.tag Image tag for the wget container used in the test-connection Pod.
|
||||
checkDeprecation: true
|
||||
test:
|
||||
enabled: true
|
||||
image:
|
||||
name: busybox
|
||||
tag: latest
|
||||
|
||||
## @param extraDeploy Array of extra objects to deploy with the release
|
||||
##
|
||||
extraDeploy: []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user