Migrate Joplin to K3s and add existing k8s manifests
- New k8s/joplin/ deployment for note.expertfab.de (Postgres + Server + Traefik ingress with cert-manager), replicas=2 to match cluster size - coredns-custom.yaml: route note.expertfab.de internally to Traefik LB - Commit previously-built k8s manifests (documenso, erpnext oauth2-proxy, paperless oauth2-proxy) that were running but not in git - docs/access.md: add Joplin section and Documenso/Cloudflare entries Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
112
k8s/documenso/documenso.yaml
Normal file
112
k8s/documenso/documenso.yaml
Normal file
File diff suppressed because one or more lines are too long
37
k8s/documenso/ingress.yaml
Normal file
37
k8s/documenso/ingress.yaml
Normal file
@@ -0,0 +1,37 @@
|
||||
---
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: redirect-https
|
||||
namespace: documenso
|
||||
spec:
|
||||
redirectScheme:
|
||||
scheme: https
|
||||
permanent: true
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: documenso
|
||||
namespace: documenso
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: letsencrypt
|
||||
traefik.ingress.kubernetes.io/router.entrypoints: web,websecure
|
||||
traefik.ingress.kubernetes.io/router.middlewares: documenso-redirect-https@kubernetescrd
|
||||
spec:
|
||||
ingressClassName: traefik
|
||||
rules:
|
||||
- host: signing.expertfab.de
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: documenso
|
||||
port:
|
||||
number: 3000
|
||||
tls:
|
||||
- hosts:
|
||||
- signing.expertfab.de
|
||||
secretName: documenso-tls
|
||||
19
k8s/documenso/namespace.yaml
Normal file
19
k8s/documenso/namespace.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: documenso
|
||||
---
|
||||
apiVersion: storage.k8s.io/v1
|
||||
kind: StorageClass
|
||||
metadata:
|
||||
name: longhorn-documenso
|
||||
provisioner: driver.longhorn.io
|
||||
reclaimPolicy: Retain
|
||||
allowVolumeExpansion: true
|
||||
volumeBindingMode: Immediate
|
||||
parameters:
|
||||
numberOfReplicas: "2"
|
||||
staleReplicaTimeout: "30"
|
||||
fromBackup: ""
|
||||
fsType: "ext4"
|
||||
96
k8s/documenso/postgres.yaml
Normal file
96
k8s/documenso/postgres.yaml
Normal file
@@ -0,0 +1,96 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: documenso-postgres
|
||||
namespace: documenso
|
||||
type: Opaque
|
||||
stringData:
|
||||
POSTGRES_DB: documenso
|
||||
POSTGRES_USER: documenso
|
||||
POSTGRES_PASSWORD: "9QtScsD5IymypPxR2eMNFoMFYVUp7cL"
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: documenso-postgres-data
|
||||
namespace: documenso
|
||||
spec:
|
||||
accessModes: ["ReadWriteOnce"]
|
||||
storageClassName: longhorn-documenso
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: documenso-postgres
|
||||
namespace: documenso
|
||||
spec:
|
||||
replicas: 1
|
||||
strategy:
|
||||
type: Recreate
|
||||
selector:
|
||||
matchLabels:
|
||||
app: documenso-postgres
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: documenso-postgres
|
||||
spec:
|
||||
containers:
|
||||
- name: postgres
|
||||
image: postgres:16-alpine
|
||||
ports:
|
||||
- containerPort: 5432
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: documenso-postgres
|
||||
env:
|
||||
- name: PGDATA
|
||||
value: /var/lib/postgresql/data/pgdata
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /var/lib/postgresql/data
|
||||
startupProbe:
|
||||
exec:
|
||||
command: ["pg_isready", "-U", "documenso", "-d", "documenso"]
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 30
|
||||
readinessProbe:
|
||||
exec:
|
||||
command: ["pg_isready", "-U", "documenso", "-d", "documenso"]
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
livenessProbe:
|
||||
exec:
|
||||
command: ["pg_isready", "-U", "documenso", "-d", "documenso"]
|
||||
periodSeconds: 30
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 5
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: 1000m
|
||||
memory: 1Gi
|
||||
volumes:
|
||||
- name: data
|
||||
persistentVolumeClaim:
|
||||
claimName: documenso-postgres-data
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: documenso-postgres
|
||||
namespace: documenso
|
||||
spec:
|
||||
selector:
|
||||
app: documenso-postgres
|
||||
ports:
|
||||
- port: 5432
|
||||
targetPort: 5432
|
||||
Reference in New Issue
Block a user