Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
0faf17c7ee
|
|||
|
7c62c36c4f
|
|||
|
4fb8fb9a3d
|
|||
|
a65c908ec7
|
|||
|
a2826da910
|
|||
|
5430859e9e
|
|||
|
90434d273b
|
|||
|
80014450fa
|
|||
|
31908f6439
|
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
*.swp
|
||||||
|
*.tar.gz
|
||||||
|
mailman3/charts/*
|
||||||
@@ -1,2 +1,10 @@
|
|||||||
# mailman3-helm-chart
|
# mailman3-helm-chart
|
||||||
Helm chart for Mailman3 deployment
|
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
|
# 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.
|
# to the chart and its templates, including the app version.
|
||||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
# 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
|
# 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
|
# 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.
|
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||||
appVersion: 0.3.10
|
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
|
value: http://{{ include "mailman3.fullname" . }}-web.{{ .Release.Namespace }}.svc.{{ $clusterDomain }}/hyperkitty
|
||||||
- name: MTA
|
- name: MTA
|
||||||
value: postfix
|
value: postfix
|
||||||
|
{{- if .Values.smtp }}
|
||||||
|
- name: SMTP_HOST
|
||||||
|
value: {{ .Values.smtp.host }}
|
||||||
|
- name: SMTP_PORT
|
||||||
|
value: "{{ .Values.smtp.port }}"
|
||||||
|
{{- else }}
|
||||||
- name: SMTP_HOST
|
- name: SMTP_HOST
|
||||||
value: {{ include "mailman3.fullname" . }}-core.{{ .Release.Namespace }}.svc.{{ $clusterDomain }}
|
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
|
- name: DATABASE_CLASS
|
||||||
value: mailman.database.sqlite.SQLiteDatabase
|
value: mailman.database.sqlite.SQLiteDatabase
|
||||||
- name: DATABASE_URL
|
- name: DATABASE_URL
|
||||||
value: "sqlite:////opt/mailman/var/data/mailman.db"
|
value: "sqlite:////opt/mailman/var/data/mailman.db"
|
||||||
|
{{- end }}
|
||||||
ports:
|
ports:
|
||||||
- name: api
|
- name: api
|
||||||
containerPort: 8001
|
containerPort: 8001
|
||||||
@@ -76,6 +90,8 @@ spec:
|
|||||||
mountPath: /opt/mailman
|
mountPath: /opt/mailman
|
||||||
resources:
|
resources:
|
||||||
{{- toYaml .Values.core.resources | nindent 12 }}
|
{{- toYaml .Values.core.resources | nindent 12 }}
|
||||||
|
{{- if .Values.smtp }}
|
||||||
|
{{- else }}
|
||||||
- name: postfix
|
- name: postfix
|
||||||
image: boky/postfix:latest
|
image: boky/postfix:latest
|
||||||
env:
|
env:
|
||||||
@@ -118,6 +134,7 @@ spec:
|
|||||||
- name: core-data
|
- name: core-data
|
||||||
subPath: var/data
|
subPath: var/data
|
||||||
mountPath: /mailman
|
mountPath: /mailman
|
||||||
|
{{- end }}
|
||||||
{{- with .Values.core.nodeSelector }}
|
{{- with .Values.core.nodeSelector }}
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
@@ -158,4 +175,4 @@ spec:
|
|||||||
protocol: TCP
|
protocol: TCP
|
||||||
selector:
|
selector:
|
||||||
{{- include "mailman3.selectorLabels" . | nindent 4 }}
|
{{- include "mailman3.selectorLabels" . | nindent 4 }}
|
||||||
app.kubernetes.io/component: core
|
app.kubernetes.io/component: core
|
||||||
|
|||||||
@@ -1,33 +1,63 @@
|
|||||||
{{- if .Values.ingress.enabled -}}
|
{{- if .Values.ingress.enabled -}}
|
||||||
{{- $fullName := include "mailman3.fullname" . -}}
|
{{- $fullName := include "mailman3.fullname" . -}}
|
||||||
{{- $svcPort := .Values.service.port -}}
|
{{- $httpPort := .Values.service.port -}}
|
||||||
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
|
apiVersion: networking.k8s.io/v1
|
||||||
apiVersion: networking.k8s.io/v1beta1
|
|
||||||
{{- else -}}
|
|
||||||
apiVersion: extensions/v1beta1
|
|
||||||
{{- end }}
|
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ $fullName }}
|
name: {{ $fullName }}
|
||||||
|
namespace: {{ .Values.namespace | default .Release.Namespace }}
|
||||||
labels:
|
labels:
|
||||||
{{- include "mailman3.labels" . | nindent 4 }}
|
{{- include "mailman3.labels" . | nindent 4 }}
|
||||||
{{- with .Values.ingress.annotations }}
|
|
||||||
annotations:
|
annotations:
|
||||||
{{- toYaml . | nindent 4 }}
|
{{- range $key, $value := .Values.ingress.annotations }}
|
||||||
{{- end }}
|
{{ $key }}: {{ $value | quote }}
|
||||||
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
{{- if .Values.ingress.tls }}
|
ingressClassName: {{ tpl .Values.ingress.className . }}
|
||||||
|
{{- if .Values.ingress.tls }}
|
||||||
tls:
|
tls:
|
||||||
|
{{- range .Values.ingress.tls }}
|
||||||
- hosts:
|
- hosts:
|
||||||
- {{ .Values.hostname }}
|
{{- range .hosts }}
|
||||||
secretName: {{ include "mailman3.fullname" . }}-certificate
|
- {{ tpl . $ | quote }}
|
||||||
|
{{- end }}
|
||||||
|
secretName: {{ .secretName }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
rules:
|
|
||||||
- host: {{ .Values.hostname | quote }}
|
|
||||||
http:
|
|
||||||
paths:
|
|
||||||
- path: /
|
|
||||||
backend:
|
|
||||||
serviceName: {{ include "mailman3.fullname" . }}-web
|
|
||||||
servicePort: 80
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
rules:
|
||||||
|
{{- range .Values.ingress.hosts }}
|
||||||
|
- host: {{ tpl .host $ | quote }}
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
{{- if .paths }}
|
||||||
|
{{- range .paths }}
|
||||||
|
{{- if kindIs "string" . }}
|
||||||
|
- path: {{ . }}
|
||||||
|
pathType: {{ default "Prefix" $.Values.ingress.pathType }}
|
||||||
|
backend:
|
||||||
|
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
|
- name: SERVE_FROM_DOMAIN
|
||||||
value: {{ .Values.hostname | quote }}
|
value: {{ .Values.hostname | quote }}
|
||||||
{{- end }}
|
{{- 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
|
- name: DATABASE_URL
|
||||||
value: sqlite://///opt/mailman-web-data/mailmanweb.db
|
value: sqlite://///opt/mailman-web-data/mailmanweb.db
|
||||||
- name: DATABASE_TYPE
|
- name: DATABASE_TYPE
|
||||||
value: sqlite
|
value: sqlite
|
||||||
|
{{- end }}
|
||||||
- name: MAILMAN_ADMIN_USER
|
- name: MAILMAN_ADMIN_USER
|
||||||
value: {{ .Values.admin.username }}
|
value: {{ .Values.admin.username }}
|
||||||
- name: MAILMAN_ADMIN_EMAIL
|
- name: MAILMAN_ADMIN_EMAIL
|
||||||
value: {{ .Values.admin.email }}
|
value: {{ .Values.admin.email }}
|
||||||
{{- if .Values.smtp }}
|
{{- if .Values.smtp }}
|
||||||
- name: SMTP_HOST
|
- 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 }}
|
{{- else }}
|
||||||
- name: SMTP_HOST
|
- name: SMTP_HOST
|
||||||
value: {{ include "mailman3.fullname" . }}-core.{{ .Release.Namespace }}.svc.{{ $clusterDomain }}
|
value: {{ include "mailman3.fullname" . }}-core.{{ .Release.Namespace }}.svc.{{ $clusterDomain }}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
#hyperkittyApiKey: supersecret
|
#hyperkittyApiKey: supersecret
|
||||||
#djangoSecretKey: supersecret
|
#djangoSecretKey: supersecret
|
||||||
|
|
||||||
hostname: lists.example.org
|
hostname: lists.example.com
|
||||||
|
|
||||||
imagePullSecrets: []
|
imagePullSecrets: []
|
||||||
nameOverride: ""
|
nameOverride: ""
|
||||||
@@ -65,14 +65,98 @@ web:
|
|||||||
size: 100Gi
|
size: 100Gi
|
||||||
accessMode: ReadWriteOnce
|
accessMode: ReadWriteOnce
|
||||||
|
|
||||||
|
smtp: null
|
||||||
|
# host: mail.example.com
|
||||||
|
# port: 25
|
||||||
|
# host_user: admin@example.com
|
||||||
|
# host_password: changeme
|
||||||
|
# use_tls: "true"
|
||||||
|
|
||||||
service:
|
service:
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
|
port: 80
|
||||||
|
|
||||||
ingress:
|
ingress:
|
||||||
enabled: false
|
enabled: false
|
||||||
tls: false
|
className: ""
|
||||||
annotations:
|
pathType: Prefix
|
||||||
# use NGINX Ingress Controller
|
annotations: {}
|
||||||
#kubernetes.io/ingress.class: "nginx"
|
hosts:
|
||||||
# use Cert-Manager for LetsEncrypt Certificates
|
- host: lists.example.com
|
||||||
#cert-manager.io/issuer: "letsencrypt-prod"
|
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