build: migrate ingresses for Traefik v3 (k3s upgrade)
k3s update bumped Traefik chart 37 → 39, dropping v2 support. Replace the v2-only `whitelist.sourcerange` annotation on the gitea ingress with an `ipAllowList` Middleware (resources/gitea-middleware.yaml), referenced via `router.middlewares`. Switch the default-ns ingresses (kube-plex, radarr, sonarr, lidarr) from the deprecated `kubernetes.io/ingress.class` annotation to `spec.ingressClassName`. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -21,8 +21,8 @@ ingress:
|
|||||||
className: traefik
|
className: traefik
|
||||||
pathType: Prefix
|
pathType: Prefix
|
||||||
annotations:
|
annotations:
|
||||||
# Restrict to LAN access (matching your existing pattern)
|
# Restrict to LAN access via Traefik v3 Middleware (resources/gitea-middleware.yaml)
|
||||||
traefik.ingress.kubernetes.io/whitelist.sourcerange: "192.168.0.0/16,10.0.0.0/8,172.16.0.0/12"
|
traefik.ingress.kubernetes.io/router.middlewares: "gitea-lan-only@kubernetescrd"
|
||||||
cert-manager.io/cluster-issuer: "letsencrypt-production"
|
cert-manager.io/cluster-issuer: "letsencrypt-production"
|
||||||
hosts:
|
hosts:
|
||||||
- host: gitea.gilgamezh.me
|
- host: gitea.gilgamezh.me
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
apiVersion: traefik.io/v1alpha1
|
||||||
|
kind: Middleware
|
||||||
|
metadata:
|
||||||
|
name: lan-only
|
||||||
|
namespace: gitea
|
||||||
|
spec:
|
||||||
|
ipAllowList:
|
||||||
|
sourceRange:
|
||||||
|
- 192.168.0.0/16
|
||||||
|
- 10.0.0.0/8
|
||||||
|
- 172.16.0.0/12
|
||||||
@@ -4,12 +4,12 @@ kind: Ingress
|
|||||||
metadata:
|
metadata:
|
||||||
annotations:
|
annotations:
|
||||||
cert-manager.io/cluster-issuer: letsencrypt-production
|
cert-manager.io/cluster-issuer: letsencrypt-production
|
||||||
kubernetes.io/ingress.class: traefik
|
|
||||||
labels:
|
labels:
|
||||||
app: kube-plex
|
app: kube-plex
|
||||||
name: kube-plex
|
name: kube-plex
|
||||||
namespace: default
|
namespace: default
|
||||||
spec:
|
spec:
|
||||||
|
ingressClassName: traefik
|
||||||
rules:
|
rules:
|
||||||
- host: tp2.gilgamezh.me
|
- host: tp2.gilgamezh.me
|
||||||
http:
|
http:
|
||||||
@@ -31,12 +31,12 @@ kind: Ingress
|
|||||||
metadata:
|
metadata:
|
||||||
annotations:
|
annotations:
|
||||||
cert-manager.io/cluster-issuer: letsencrypt-production
|
cert-manager.io/cluster-issuer: letsencrypt-production
|
||||||
kubernetes.io/ingress.class: traefik
|
|
||||||
labels:
|
labels:
|
||||||
app: radarr
|
app: radarr
|
||||||
name: radarr
|
name: radarr
|
||||||
namespace: default
|
namespace: default
|
||||||
spec:
|
spec:
|
||||||
|
ingressClassName: traefik
|
||||||
rules:
|
rules:
|
||||||
- host: radarr.gilgamezh.me
|
- host: radarr.gilgamezh.me
|
||||||
http:
|
http:
|
||||||
@@ -58,12 +58,12 @@ kind: Ingress
|
|||||||
metadata:
|
metadata:
|
||||||
annotations:
|
annotations:
|
||||||
cert-manager.io/cluster-issuer: letsencrypt-production
|
cert-manager.io/cluster-issuer: letsencrypt-production
|
||||||
kubernetes.io/ingress.class: traefik
|
|
||||||
labels:
|
labels:
|
||||||
app: sonarr
|
app: sonarr
|
||||||
name: sonarr
|
name: sonarr
|
||||||
namespace: default
|
namespace: default
|
||||||
spec:
|
spec:
|
||||||
|
ingressClassName: traefik
|
||||||
rules:
|
rules:
|
||||||
- host: sonarr.gilgamezh.me
|
- host: sonarr.gilgamezh.me
|
||||||
http:
|
http:
|
||||||
@@ -85,12 +85,12 @@ kind: Ingress
|
|||||||
metadata:
|
metadata:
|
||||||
annotations:
|
annotations:
|
||||||
cert-manager.io/cluster-issuer: letsencrypt-production
|
cert-manager.io/cluster-issuer: letsencrypt-production
|
||||||
kubernetes.io/ingress.class: traefik
|
|
||||||
labels:
|
labels:
|
||||||
app: lidarr
|
app: lidarr
|
||||||
name: lidarr
|
name: lidarr
|
||||||
namespace: default
|
namespace: default
|
||||||
spec:
|
spec:
|
||||||
|
ingressClassName: traefik
|
||||||
rules:
|
rules:
|
||||||
- host: lidarr.gilgamezh.me
|
- host: lidarr.gilgamezh.me
|
||||||
http:
|
http:
|
||||||
|
|||||||
Reference in New Issue
Block a user