fix paper and traeffik

This commit is contained in:
un-oeil 2026-10-11 21:37:30 +02:00
parent 5f8ee80cf3
commit fca3c066db
21 changed files with 89 additions and 16 deletions

View file

@ -182,17 +182,9 @@ kubectl apply --server-side -k argocd-install/
kubectl -n argocd rollout status deploy/argocd-server kubectl -n argocd rollout status deploy/argocd-server
kubectl apply -f bootstrap/root.yaml kubectl apply -f bootstrap/root.yaml
``` ```
Argo CD UI: https://argocd.un-oeil.fr, admin laptop only. The Caddy vhost Argo CD UI: https://argocd.un-oeil.fr through Caddy, behind Argo's own login.
allows `10.10.10.2` and answers 403 to every other WireGuard peer: Caddy can't restrict it to the admin laptop: the WireGuard hub masquerades
``` every peer as `10.0.0.250`, so `remote_ip` never sees `10.10.10.2`.
argocd.un-oeil.fr {
@admin remote_ip 10.10.10.2
handle @admin {
reverse_proxy 10.0.0.141:80 10.0.0.142:80 10.0.0.143:80
}
respond 403
}
```
Without Caddy: `kubectl -n argocd port-forward svc/argocd-server 8080:80`. Without Caddy: `kubectl -n argocd port-forward svc/argocd-server 8080:80`.
Longhorn UI: `kubectl -n longhorn-system port-forward svc/longhorn-frontend 8081:80` Longhorn UI: `kubectl -n longhorn-system port-forward svc/longhorn-frontend 8081:80`
(or the same Caddy pattern with a `longhorn.un-oeil.fr` Ingress). (or the same Caddy pattern with a `longhorn.un-oeil.fr` Ingress).

View file

@ -14,6 +14,9 @@ spec:
labels: labels:
app: firefly app: firefly
spec: spec:
# No <SERVICE>_PORT=tcp://... env vars: apps like Paperless read
# PAPERLESS_PORT as their own setting and crash.
enableServiceLinks: false
securityContext: securityContext:
# The image runs as www-data (33). # The image runs as www-data (33).
fsGroup: 33 fsGroup: 33

View file

@ -14,6 +14,9 @@ spec:
labels: labels:
app: freshrss app: freshrss
spec: spec:
# No <SERVICE>_PORT=tcp://... env vars: apps like Paperless read
# PAPERLESS_PORT as their own setting and crash.
enableServiceLinks: false
containers: containers:
- name: freshrss - name: freshrss
image: freshrss/freshrss:1.30.1 image: freshrss/freshrss:1.30.1

View file

@ -14,6 +14,9 @@ spec:
labels: labels:
app: hedgedoc app: hedgedoc
spec: spec:
# No <SERVICE>_PORT=tcp://... env vars: apps like Paperless read
# PAPERLESS_PORT as their own setting and crash.
enableServiceLinks: false
securityContext: securityContext:
fsGroup: 10000 fsGroup: 10000
containers: containers:

View file

@ -13,6 +13,14 @@
type: uptimekuma type: uptimekuma
url: https://status.un-oeil.fr url: https://status.un-oeil.fr
slug: homelab slug: homelab
- Argo CD:
href: https://argocd.un-oeil.fr
siteMonitor: https://argocd.un-oeil.fr/healthz
icon: argo-cd.svg
widget:
type: uptimekuma
url: https://status.un-oeil.fr
slug: k3s
- Pelican: - Pelican:
href: https://pelican.un-oeil.fr href: https://pelican.un-oeil.fr
siteMonitor: https://pelican.un-oeil.fr siteMonitor: https://pelican.un-oeil.fr

View file

@ -12,6 +12,9 @@ spec:
labels: labels:
app: homepage app: homepage
spec: spec:
# No <SERVICE>_PORT=tcp://... env vars: apps like Paperless read
# PAPERLESS_PORT as their own setting and crash.
enableServiceLinks: false
containers: containers:
- name: homepage - name: homepage
image: ghcr.io/gethomepage/homepage:v2.5.0 image: ghcr.io/gethomepage/homepage:v2.5.0

View file

@ -12,6 +12,9 @@ spec:
labels: labels:
app: it-tools app: it-tools
spec: spec:
# No <SERVICE>_PORT=tcp://... env vars: apps like Paperless read
# PAPERLESS_PORT as their own setting and crash.
enableServiceLinks: false
containers: containers:
- name: it-tools - name: it-tools
image: corentinth/it-tools:2024.10.22-7ca5933 image: corentinth/it-tools:2024.10.22-7ca5933

View file

@ -14,6 +14,9 @@ spec:
labels: labels:
app: linkwarden app: linkwarden
spec: spec:
# No <SERVICE>_PORT=tcp://... env vars: apps like Paperless read
# PAPERLESS_PORT as their own setting and crash.
enableServiceLinks: false
containers: containers:
- name: linkwarden - name: linkwarden
image: ghcr.io/linkwarden/linkwarden:v2.16.3 image: ghcr.io/linkwarden/linkwarden:v2.16.3

View file

@ -14,6 +14,9 @@ spec:
labels: labels:
app: n8n app: n8n
spec: spec:
# No <SERVICE>_PORT=tcp://... env vars: apps like Paperless read
# PAPERLESS_PORT as their own setting and crash.
enableServiceLinks: false
securityContext: securityContext:
# The image runs as node (1000). # The image runs as node (1000).
fsGroup: 1000 fsGroup: 1000

View file

@ -14,6 +14,9 @@ spec:
labels: labels:
app: ntfy app: ntfy
spec: spec:
# No <SERVICE>_PORT=tcp://... env vars: apps like Paperless read
# PAPERLESS_PORT as their own setting and crash.
enableServiceLinks: false
containers: containers:
- name: ntfy - name: ntfy
image: binwiederhier/ntfy:v2.29.0 image: binwiederhier/ntfy:v2.29.0

View file

@ -14,6 +14,9 @@ spec:
labels: labels:
app: paperless app: paperless
spec: spec:
# The "paperless" Service would inject PAPERLESS_PORT=tcp://..., which
# Paperless reads as its own port setting and crashes on.
enableServiceLinks: false
containers: containers:
- name: paperless - name: paperless
image: ghcr.io/paperless-ngx/paperless-ngx:3.3.0 image: ghcr.io/paperless-ngx/paperless-ngx:3.3.0

View file

@ -13,6 +13,9 @@ spec:
labels: labels:
app: valkey app: valkey
spec: spec:
# No <SERVICE>_PORT=tcp://... env vars: apps like Paperless read
# PAPERLESS_PORT as their own setting and crash.
enableServiceLinks: false
containers: containers:
- name: valkey - name: valkey
image: valkey/valkey:8.1.10-alpine image: valkey/valkey:8.1.10-alpine

View file

@ -13,6 +13,9 @@ spec:
labels: labels:
app: postgres app: postgres
spec: spec:
# No <SERVICE>_PORT=tcp://... env vars: apps like Paperless read
# PAPERLESS_PORT as their own setting and crash.
enableServiceLinks: false
containers: containers:
- name: postgres - name: postgres
image: postgres:17.11-alpine image: postgres:17.11-alpine

View file

@ -14,6 +14,9 @@ spec:
labels: labels:
app: privatebin app: privatebin
spec: spec:
# No <SERVICE>_PORT=tcp://... env vars: apps like Paperless read
# PAPERLESS_PORT as their own setting and crash.
enableServiceLinks: false
securityContext: securityContext:
# The image runs as nobody:www-data (65534:82). # The image runs as nobody:www-data (65534:82).
fsGroup: 82 fsGroup: 82

View file

@ -12,6 +12,9 @@ spec:
labels: labels:
app: searxng app: searxng
spec: spec:
# No <SERVICE>_PORT=tcp://... env vars: apps like Paperless read
# PAPERLESS_PORT as their own setting and crash.
enableServiceLinks: false
containers: containers:
- name: searxng - name: searxng
image: searxng/searxng:2026.10.4-d48c4b555 image: searxng/searxng:2026.10.4-d48c4b555

View file

@ -12,6 +12,9 @@ spec:
labels: labels:
app: stirling-pdf app: stirling-pdf
spec: spec:
# No <SERVICE>_PORT=tcp://... env vars: apps like Paperless read
# PAPERLESS_PORT as their own setting and crash.
enableServiceLinks: false
containers: containers:
- name: stirling-pdf - name: stirling-pdf
image: stirlingtools/stirling-pdf:3.1.0 image: stirlingtools/stirling-pdf:3.1.0

View file

@ -14,6 +14,9 @@ spec:
labels: labels:
app: vikunja app: vikunja
spec: spec:
# No <SERVICE>_PORT=tcp://... env vars: apps like Paperless read
# PAPERLESS_PORT as their own setting and crash.
enableServiceLinks: false
securityContext: securityContext:
fsGroup: 1000 fsGroup: 1000
containers: containers:

View file

@ -12,6 +12,9 @@ spec:
labels: labels:
app: whoami app: whoami
spec: spec:
# No <SERVICE>_PORT=tcp://... env vars: apps like Paperless read
# PAPERLESS_PORT as their own setting and crash.
enableServiceLinks: false
containers: containers:
- name: whoami - name: whoami
image: traefik/whoami:v1.11.0 image: traefik/whoami:v1.11.0

View file

@ -12,6 +12,9 @@ spec:
labels: labels:
app: wikijs app: wikijs
spec: spec:
# No <SERVICE>_PORT=tcp://... env vars: apps like Paperless read
# PAPERLESS_PORT as their own setting and crash.
enableServiceLinks: false
containers: containers:
- name: wikijs - name: wikijs
image: ghcr.io/requarks/wiki:2.5.314 image: ghcr.io/requarks/wiki:2.5.314

View file

@ -1,5 +1,5 @@
# https://argocd.un-oeil.fr through Caddy (LXC 100), which only lets the admin # https://argocd.un-oeil.fr through Caddy (LXC 100), over WireGuard only.
# laptop in (remote_ip 10.10.10.2) and answers 403 to everyone else. # Protected by Argo's own login.
apiVersion: networking.k8s.io/v1 apiVersion: networking.k8s.io/v1
kind: Ingress kind: Ingress
metadata: metadata:

View file

@ -1,6 +1,4 @@
# Trust X-Forwarded-For from Caddy (10.0.0.10), so apps see the real client IP # Overrides for the Traefik that k3s bundles (merged over k3s's own values).
# instead of Caddy's. Requests reach Traefik through ServiceLB, which rewrites
# the source to a node or pod address, hence the two ranges.
apiVersion: helm.cattle.io/v1 apiVersion: helm.cattle.io/v1
kind: HelmChartConfig kind: HelmChartConfig
metadata: metadata:
@ -8,6 +6,30 @@ metadata:
namespace: kube-system namespace: kube-system
spec: spec:
valuesContent: |- valuesContent: |-
# Two copies on two different workers, never on the masters (k3s's
# default tolerations would allow them), so one node going down doesn't
# take every app with it.
deployment:
replicas: 2
podDisruptionBudget:
enabled: true
minAvailable: 1
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: node-role.kubernetes.io/control-plane
operator: DoesNotExist
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels:
app.kubernetes.io/name: traefik
topologyKey: kubernetes.io/hostname
# Trust X-Forwarded-For from Caddy (10.0.0.10), so apps see the real client
# IP instead of Caddy's. Requests reach Traefik through ServiceLB, which
# rewrites the source to a node or pod address, hence the two ranges.
ports: ports:
web: web:
forwardedHeaders: forwardedHeaders: