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:
80
k8s/erpnext/ingress-auth.yaml
Normal file
80
k8s/erpnext/ingress-auth.yaml
Normal file
@@ -0,0 +1,80 @@
|
||||
---
|
||||
# /app/* — Zitadel Auth via oauth2-proxy (beide Domains)
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: erpnext-app-auth
|
||||
namespace: erpnext
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: letsencrypt
|
||||
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
||||
traefik.ingress.kubernetes.io/router.tls: "true"
|
||||
traefik.ingress.kubernetes.io/router.priority: "100"
|
||||
spec:
|
||||
ingressClassName: traefik
|
||||
rules:
|
||||
- host: expertfab.de
|
||||
http:
|
||||
paths:
|
||||
- path: /app
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: oauth2-proxy
|
||||
port:
|
||||
number: 4180
|
||||
- host: www.expertfab.de
|
||||
http:
|
||||
paths:
|
||||
- path: /app
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: oauth2-proxy
|
||||
port:
|
||||
number: 4180
|
||||
tls:
|
||||
- hosts:
|
||||
- expertfab.de
|
||||
- www.expertfab.de
|
||||
secretName: expertfab-tls
|
||||
---
|
||||
# /oauth2/* — OIDC Callback-Handling (beide Domains)
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: erpnext-oauth2
|
||||
namespace: erpnext
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: letsencrypt
|
||||
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
||||
traefik.ingress.kubernetes.io/router.tls: "true"
|
||||
traefik.ingress.kubernetes.io/router.priority: "100"
|
||||
spec:
|
||||
ingressClassName: traefik
|
||||
rules:
|
||||
- host: expertfab.de
|
||||
http:
|
||||
paths:
|
||||
- path: /oauth2
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: oauth2-proxy
|
||||
port:
|
||||
number: 4180
|
||||
- host: www.expertfab.de
|
||||
http:
|
||||
paths:
|
||||
- path: /oauth2
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: oauth2-proxy
|
||||
port:
|
||||
number: 4180
|
||||
tls:
|
||||
- hosts:
|
||||
- expertfab.de
|
||||
- www.expertfab.de
|
||||
secretName: expertfab-tls
|
||||
82
k8s/erpnext/oauth2-proxy.yaml
Normal file
82
k8s/erpnext/oauth2-proxy.yaml
Normal file
@@ -0,0 +1,82 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: oauth2-proxy-secrets
|
||||
namespace: erpnext
|
||||
type: Opaque
|
||||
stringData:
|
||||
OAUTH2_PROXY_CLIENT_ID: "371747520893682044"
|
||||
OAUTH2_PROXY_CLIENT_SECRET: "Wka1L8RYFYeKHrzMOadDfQRXWlCnM6x2JKL2QBTmV3WHdaYY2OiodVZgK0MYdiFl"
|
||||
OAUTH2_PROXY_COOKIE_SECRET: "st_biHMwZOrFbrigSmnEdRG5ZCoULrktjAvPGcUrqw0"
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: oauth2-proxy
|
||||
namespace: erpnext
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: oauth2-proxy
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: oauth2-proxy
|
||||
spec:
|
||||
containers:
|
||||
- name: oauth2-proxy
|
||||
image: quay.io/oauth2-proxy/oauth2-proxy:v7.7.1
|
||||
args:
|
||||
- --provider=oidc
|
||||
- --oidc-issuer-url=https://auth.expertfab.de
|
||||
- --upstream=http://erpnext:8080
|
||||
- --http-address=0.0.0.0:4180
|
||||
- --email-domain=*
|
||||
- --scope=openid profile email
|
||||
- --skip-provider-button=true
|
||||
- --cookie-secure=true
|
||||
- --cookie-samesite=lax
|
||||
- --cookie-domain=expertfab.de
|
||||
- --whitelist-domain=expertfab.de
|
||||
- --whitelist-domain=www.expertfab.de
|
||||
- --reverse-proxy=true
|
||||
- --set-xauthrequest=true
|
||||
env:
|
||||
- name: OAUTH2_PROXY_CLIENT_ID
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: oauth2-proxy-secrets
|
||||
key: OAUTH2_PROXY_CLIENT_ID
|
||||
- name: OAUTH2_PROXY_CLIENT_SECRET
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: oauth2-proxy-secrets
|
||||
key: OAUTH2_PROXY_CLIENT_SECRET
|
||||
- name: OAUTH2_PROXY_COOKIE_SECRET
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: oauth2-proxy-secrets
|
||||
key: OAUTH2_PROXY_COOKIE_SECRET
|
||||
ports:
|
||||
- containerPort: 4180
|
||||
resources:
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 64Mi
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: oauth2-proxy
|
||||
namespace: erpnext
|
||||
spec:
|
||||
selector:
|
||||
app: oauth2-proxy
|
||||
ports:
|
||||
- port: 4180
|
||||
targetPort: 4180
|
||||
Reference in New Issue
Block a user