Initial listmonk role: eom.dev newsletter on Kubernetes
listmonk v6.2.0 with PostgreSQL 17, Dex login for listed admins, delivery through postfix.eom.dev, Catppuccin public pages, Altcha captcha and a double opt-in "eom.dev" list. Database-held settings are converged by an idempotent SQL script, tested against v6.2.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,90 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ listmonk_name }}-db
|
||||
namespace: {{ listmonk_namespace }}
|
||||
labels:
|
||||
app.kubernetes.io/name: listmonk
|
||||
app.kubernetes.io/instance: {{ listmonk_name }}
|
||||
app.kubernetes.io/component: database
|
||||
spec:
|
||||
clusterIP: None
|
||||
selector:
|
||||
app.kubernetes.io/instance: {{ listmonk_name }}
|
||||
app.kubernetes.io/component: database
|
||||
ports:
|
||||
- name: postgres
|
||||
port: 5432
|
||||
targetPort: postgres
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: {{ listmonk_name }}-db
|
||||
namespace: {{ listmonk_namespace }}
|
||||
labels:
|
||||
app.kubernetes.io/name: listmonk
|
||||
app.kubernetes.io/instance: {{ listmonk_name }}
|
||||
app.kubernetes.io/component: database
|
||||
spec:
|
||||
serviceName: {{ listmonk_name }}-db
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/instance: {{ listmonk_name }}
|
||||
app.kubernetes.io/component: database
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: listmonk
|
||||
app.kubernetes.io/instance: {{ listmonk_name }}
|
||||
app.kubernetes.io/component: database
|
||||
spec:
|
||||
# postgres:*-alpine runs as uid/gid 70. Running unprivileged skips the
|
||||
# entrypoint's chown, which NFS with root_squash would refuse.
|
||||
securityContext:
|
||||
runAsUser: 70
|
||||
runAsGroup: 70
|
||||
fsGroup: 70
|
||||
affinity: {{ listmonk_affinity | to_json }}
|
||||
containers:
|
||||
- name: postgres
|
||||
image: {{ listmonk_postgres_image }}
|
||||
imagePullPolicy: {{ listmonk_image_pull_policy }}
|
||||
env:
|
||||
- name: POSTGRES_USER
|
||||
value: listmonk
|
||||
- name: POSTGRES_DB
|
||||
value: listmonk
|
||||
- name: PGDATA
|
||||
value: /var/lib/postgresql/data/pgdata
|
||||
- name: POSTGRES_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ listmonk_name }}
|
||||
key: POSTGRES_PASSWORD
|
||||
ports:
|
||||
- name: postgres
|
||||
containerPort: 5432
|
||||
readinessProbe:
|
||||
exec:
|
||||
command: [pg_isready, -U, listmonk, -d, listmonk]
|
||||
periodSeconds: 10
|
||||
livenessProbe:
|
||||
exec:
|
||||
command: [pg_isready, -U, listmonk, -d, listmonk]
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 30
|
||||
resources: {{ listmonk_postgres_resources | to_json }}
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /var/lib/postgresql/data
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: data
|
||||
spec:
|
||||
accessModes: [ReadWriteOnce]
|
||||
storageClassName: {{ listmonk_storage_class }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ listmonk_db_storage_size }}
|
||||
Reference in New Issue
Block a user