mirror of
https://github.com/Alkatrazz24/Funk-lab.git
synced 2026-07-08 23:54:43 +02:00
feat(infra): domaine public funklab.online + HTTPS Let's Encrypt (fondation)
- traefik : values.yaml versionné (réplique existant + certResolver ACME HTTP-01 + acme.json persistant) — appliqué par helm upgrade (hors ArgoCD). Redirect HTTP→HTTPS scopée funklab.online (ne casse pas *.lab.local). - gateway : DNAT 80/443 → Traefik + rate-limit - dnsmasq : split-horizon *.funklab.online → Traefik (var public_domain) - doc : admin/k8s/public-domain.md (archi, OVH/Freebox, helm, ajout d'app) Appliqué et vérifié : helm upgrade OK (services *.lab.local intacts), resolver ACME chargé, DNAT/dnsmasq en place. En attente DNS OVH + Freebox pour l'émission des certificats. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
f9a916988b
commit
f34956f569
6 changed files with 202 additions and 0 deletions
29
k8s/infra/traefik/redirect.yaml
Normal file
29
k8s/infra/traefik/redirect.yaml
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
# Redirection HTTP→HTTPS scopée à funklab.online (ne touche pas *.lab.local).
|
||||
# Appliqué normalement (kubectl apply / ArgoCD infra) — CRD Traefik.
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: redirect-https
|
||||
namespace: infra
|
||||
spec:
|
||||
redirectScheme:
|
||||
scheme: https
|
||||
permanent: true
|
||||
---
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: funklab-http-redirect
|
||||
namespace: infra
|
||||
spec:
|
||||
entryPoints:
|
||||
- web
|
||||
routes:
|
||||
- match: HostRegexp(`^.+\.funklab\.online$`)
|
||||
kind: Rule
|
||||
middlewares:
|
||||
- name: redirect-https
|
||||
services:
|
||||
# Service factice requis par le schéma ; la middleware redirige avant d'y aller
|
||||
- name: noop@internal
|
||||
kind: TraefikService
|
||||
53
k8s/infra/traefik/values.yaml
Normal file
53
k8s/infra/traefik/values.yaml
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
# Traefik (ingress cluster) — valeurs Helm
|
||||
# ⚠️ Traefik est installé/mis à jour HORS ArgoCD (helm au bootstrap, cf.
|
||||
# admin/k8s/talos.md). Ce fichier versionne la config ; l'appliquer avec :
|
||||
# helm upgrade traefik traefik/traefik -n infra -f k8s/infra/traefik/values.yaml
|
||||
# Chart traefik-40.1.0 (Traefik v3.7.1).
|
||||
|
||||
# --- Réplique de la config existante (helm get values) ---
|
||||
service:
|
||||
type: LoadBalancer
|
||||
loadBalancerIP: 192.168.10.200 # VIP MetalLB — NE PAS changer
|
||||
ingressRoute:
|
||||
dashboard:
|
||||
enabled: true
|
||||
logs:
|
||||
general:
|
||||
level: INFO
|
||||
ports:
|
||||
web:
|
||||
port: 80
|
||||
websecure:
|
||||
port: 443
|
||||
|
||||
# --- Let's Encrypt (HTTP-01, un certificat par sous-domaine) ---
|
||||
# Pas de redirection HTTP→HTTPS globale : les services internes en *.lab.local
|
||||
# resteraient sinon cassés (Let's Encrypt ne certifie pas .lab.local). La redirection
|
||||
# est scopée à funklab.online via une IngressRoute dédiée (k8s/infra/traefik/redirect.yaml).
|
||||
certificatesResolvers:
|
||||
letsencrypt:
|
||||
acme:
|
||||
email: aliyesilkaya93@gmail.com
|
||||
storage: /data/acme.json
|
||||
httpChallenge:
|
||||
entryPoint: web
|
||||
|
||||
# Stockage persistant de acme.json (sinon ré-émission à chaque redémarrage →
|
||||
# risque de rate-limit Let's Encrypt)
|
||||
persistence:
|
||||
enabled: true
|
||||
name: data
|
||||
accessMode: ReadWriteOnce
|
||||
size: 128Mi
|
||||
storageClass: nfs
|
||||
path: /data
|
||||
|
||||
# acme.json doit être en 0600, sinon Traefik refuse de l'utiliser
|
||||
deployment:
|
||||
initContainers:
|
||||
- name: volume-permissions
|
||||
image: busybox:1.36
|
||||
command: ["sh", "-c", "touch /data/acme.json && chmod 600 /data/acme.json"]
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
Loading…
Add table
Add a link
Reference in a new issue