2026-07-01 18:08:31 +00:00
|
|
|
---
|
|
|
|
|
apiVersion: v1
|
|
|
|
|
kind: Namespace
|
|
|
|
|
metadata:
|
|
|
|
|
name: mail
|
|
|
|
|
---
|
|
|
|
|
apiVersion: v1
|
|
|
|
|
kind: PersistentVolumeClaim
|
|
|
|
|
metadata:
|
|
|
|
|
name: stalwart-data
|
|
|
|
|
namespace: mail
|
|
|
|
|
spec:
|
|
|
|
|
accessModes:
|
|
|
|
|
- ReadWriteOnce
|
|
|
|
|
storageClassName: hcloud-volumes-encrypted
|
|
|
|
|
resources:
|
|
|
|
|
requests:
|
|
|
|
|
storage: 20Gi
|
|
|
|
|
---
|
Convert all secrets to SealedSecrets for enhanced security
This commit converts all application secrets to SealedSecrets, preventing
plaintext secrets from being stored in git.
Changes:
- Added .gitignore to prevent future plaintext secret commits
- Created 20 SealedSecret manifests across 8 applications:
* Stalwart (4 secrets): admin credentials, OAuth proxy, OIDC, S3 backup
* Directus (5 secrets): admin, agent token, app secrets, DB, OIDC
* Paperclip (4 secrets): main secrets, auth, OIDC, session
* Forgejo (2 secrets): postgres, backup
* BookStack (2 secrets): OIDC, MySQL
* Passbolt (2 secrets): MariaDB, app secrets
* Pocket ID (1 secret)
- Removed hardcoded secrets from 6 stalwart deployment files
- Replaced plaintext credentials with references to sealed secrets
All sealed secrets have been applied to the cluster and services verified
to be running correctly.
Related: DEV-203
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-01 18:38:27 +00:00
|
|
|
# Secret managed via SealedSecrets
|
|
|
|
|
# See: stalwart-admin-credentials-sealed.yaml
|
2026-07-01 18:08:31 +00:00
|
|
|
---
|
|
|
|
|
apiVersion: v1
|
|
|
|
|
kind: Service
|
|
|
|
|
metadata:
|
|
|
|
|
name: stalwart-smtp
|
|
|
|
|
namespace: mail
|
|
|
|
|
spec:
|
|
|
|
|
type: LoadBalancer
|
|
|
|
|
selector:
|
|
|
|
|
app: stalwart
|
|
|
|
|
ports:
|
|
|
|
|
- name: smtp
|
|
|
|
|
port: 25
|
|
|
|
|
targetPort: 25
|
|
|
|
|
protocol: TCP
|
|
|
|
|
- name: submission
|
|
|
|
|
port: 587
|
|
|
|
|
targetPort: 587
|
|
|
|
|
protocol: TCP
|
|
|
|
|
- name: submissions
|
|
|
|
|
port: 465
|
|
|
|
|
targetPort: 465
|
|
|
|
|
protocol: TCP
|
|
|
|
|
---
|
|
|
|
|
apiVersion: v1
|
|
|
|
|
kind: Service
|
|
|
|
|
metadata:
|
|
|
|
|
name: stalwart-imap
|
|
|
|
|
namespace: mail
|
|
|
|
|
spec:
|
|
|
|
|
type: LoadBalancer
|
|
|
|
|
selector:
|
|
|
|
|
app: stalwart
|
|
|
|
|
ports:
|
|
|
|
|
- name: imap
|
|
|
|
|
port: 143
|
|
|
|
|
targetPort: 143
|
|
|
|
|
protocol: TCP
|
|
|
|
|
- name: imaps
|
|
|
|
|
port: 993
|
|
|
|
|
targetPort: 993
|
|
|
|
|
protocol: TCP
|
|
|
|
|
---
|
|
|
|
|
apiVersion: v1
|
|
|
|
|
kind: Service
|
|
|
|
|
metadata:
|
|
|
|
|
name: stalwart-http
|
|
|
|
|
namespace: mail
|
|
|
|
|
spec:
|
|
|
|
|
type: ClusterIP
|
|
|
|
|
selector:
|
|
|
|
|
app: stalwart
|
|
|
|
|
ports:
|
|
|
|
|
- name: http
|
|
|
|
|
port: 8080
|
|
|
|
|
targetPort: 8080
|
|
|
|
|
protocol: TCP
|
|
|
|
|
---
|
|
|
|
|
apiVersion: apps/v1
|
|
|
|
|
kind: Deployment
|
|
|
|
|
metadata:
|
|
|
|
|
name: stalwart
|
|
|
|
|
namespace: mail
|
|
|
|
|
spec:
|
|
|
|
|
replicas: 1
|
|
|
|
|
strategy:
|
|
|
|
|
type: Recreate
|
|
|
|
|
selector:
|
|
|
|
|
matchLabels:
|
|
|
|
|
app: stalwart
|
|
|
|
|
template:
|
|
|
|
|
metadata:
|
|
|
|
|
labels:
|
|
|
|
|
app: stalwart
|
|
|
|
|
spec:
|
|
|
|
|
initContainers:
|
|
|
|
|
- name: fix-permissions
|
|
|
|
|
image: busybox
|
|
|
|
|
command: ["sh", "-c", "chown -R 2000:2000 /opt/stalwart-mail && chmod -R 755 /opt/stalwart-mail"]
|
|
|
|
|
volumeMounts:
|
|
|
|
|
- name: data
|
|
|
|
|
mountPath: /opt/stalwart-mail
|
|
|
|
|
containers:
|
|
|
|
|
- name: stalwart
|
|
|
|
|
image: stalwartlabs/stalwart:v0.16
|
|
|
|
|
command: ["/usr/local/bin/stalwart"]
|
|
|
|
|
args: ["--config", "/etc/stalwart/config.json"]
|
|
|
|
|
ports:
|
|
|
|
|
- containerPort: 25
|
|
|
|
|
name: smtp
|
|
|
|
|
- containerPort: 587
|
|
|
|
|
name: submission
|
|
|
|
|
- containerPort: 465
|
|
|
|
|
name: submissions
|
|
|
|
|
- containerPort: 143
|
|
|
|
|
name: imap
|
|
|
|
|
- containerPort: 993
|
|
|
|
|
name: imaps
|
|
|
|
|
- containerPort: 8080
|
|
|
|
|
name: http
|
|
|
|
|
env:
|
|
|
|
|
- name: STALWART_RECOVERY_ADMIN
|
Convert all secrets to SealedSecrets for enhanced security
This commit converts all application secrets to SealedSecrets, preventing
plaintext secrets from being stored in git.
Changes:
- Added .gitignore to prevent future plaintext secret commits
- Created 20 SealedSecret manifests across 8 applications:
* Stalwart (4 secrets): admin credentials, OAuth proxy, OIDC, S3 backup
* Directus (5 secrets): admin, agent token, app secrets, DB, OIDC
* Paperclip (4 secrets): main secrets, auth, OIDC, session
* Forgejo (2 secrets): postgres, backup
* BookStack (2 secrets): OIDC, MySQL
* Passbolt (2 secrets): MariaDB, app secrets
* Pocket ID (1 secret)
- Removed hardcoded secrets from 6 stalwart deployment files
- Replaced plaintext credentials with references to sealed secrets
All sealed secrets have been applied to the cluster and services verified
to be running correctly.
Related: DEV-203
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-01 18:38:27 +00:00
|
|
|
valueFrom:
|
|
|
|
|
secretKeyRef:
|
|
|
|
|
name: stalwart-admin-credentials
|
|
|
|
|
key: recovery-admin-password
|
2026-07-01 18:08:31 +00:00
|
|
|
volumeMounts:
|
|
|
|
|
- name: data
|
|
|
|
|
mountPath: /var/lib/stalwart
|
|
|
|
|
- name: data
|
|
|
|
|
mountPath: /etc/stalwart
|
|
|
|
|
subPath: etc
|
|
|
|
|
resources:
|
|
|
|
|
requests:
|
|
|
|
|
memory: "512Mi"
|
|
|
|
|
cpu: "250m"
|
|
|
|
|
limits:
|
|
|
|
|
memory: "1Gi"
|
|
|
|
|
cpu: "1000m"
|
|
|
|
|
volumes:
|
|
|
|
|
- name: data
|
|
|
|
|
persistentVolumeClaim:
|
|
|
|
|
claimName: stalwart-data
|
|
|
|
|
---
|
|
|
|
|
apiVersion: networking.k8s.io/v1
|
|
|
|
|
kind: Ingress
|
|
|
|
|
metadata:
|
|
|
|
|
name: stalwart-web
|
|
|
|
|
namespace: mail
|
|
|
|
|
annotations:
|
|
|
|
|
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
|
|
|
|
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
|
|
|
|
spec:
|
|
|
|
|
ingressClassName: traefik
|
|
|
|
|
tls:
|
|
|
|
|
- hosts:
|
|
|
|
|
- mail.basicstack.de
|
|
|
|
|
secretName: stalwart-tls
|
|
|
|
|
rules:
|
|
|
|
|
- host: mail.basicstack.de
|
|
|
|
|
http:
|
|
|
|
|
paths:
|
|
|
|
|
- path: /
|
|
|
|
|
pathType: Prefix
|
|
|
|
|
backend:
|
|
|
|
|
service:
|
|
|
|
|
name: stalwart-http
|
|
|
|
|
port:
|
|
|
|
|
number: 8080
|