Repository navigation
feat(kube): défauts Kubernetes (namespace par projet, Traefik, cloudflared) + test réel k3s - #300
Merged
Merged
Conversation
…lared) + correctifs du test réel k3s Choix par défaut : GHCR + imagePullSecret, Traefik, local-path (Longhorn documenté en multi-nœud), tunnel Cloudflare, un namespace par projet. - kube : AppSpec.project / AppRef ; namespace `devforge-<projet>` créé à la demande (labels PodSecurity, refus d'un namespace existant non géré) ; liste multi-namespaces filtrable par projet ; IngressClass `traefik` par défaut (`none` pour la classe du cluster) ; secret de pull recopié dans les namespaces de projet ; mode `single` conservé. - routes /api/v1/kube/* : `?project=` ; /info expose namespace_mode, préfixe, PodSecurity. - chart : apps.namespaceMode/namespacePrefix, ClusterRole en perProject (Role en single), cloudflared optionnel (Secret token / existingSecret), Traefik par défaut ; deploy/kubernetes/traefik-values.yaml. - docs : wiki/Kubernetes.md et deploy/kubernetes/README.md (choix et comment les changer). Bugs trouvés au test réel (k3s 1.31, Traefik 3.7, local-path) : - chart : init `wait-postgres` bloqué indéfiniment (pg_isready sans -U sous uid 1000 → « no attempt ») ; - rolling update avec coupures (502 / timeouts) : preStop sleep 5 s + grace 35 s ; - serveur : snapshot de bascule pg_dump via Docker lancé en mode Kubernetes (erreur /30 s) ; - valeurs Traefik : `logs` refusé par le schéma, type de Service sous `service.spec`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Choix par défaut pour faire tourner DevForge dans un cluster Kubernetes : GHCR + imagePullSecret, Traefik, local-path (Longhorn documenté en multi-nœud), tunnel Cloudflare (cloudflared → Service Traefik), un namespace par projet (
devforge-<projet>). Docker reste le backend par défaut.Changements
crates/kube:AppSpec.project/AppRef, namespace de projet créé à la demande (labels PodSecurity ; refus d'un namespace existant non étiquetémanaged-by=devforge), liste multi-namespaces filtrable, IngressClasstraefikpar défaut, recopie du secret de pull, modesingleconservé,preStop.sleep./api/v1/kube/*: paramètre?project=;/infoexposenamespace_mode, préfixe, PodSecurity.apps.namespaceMode(ClusterRole en perProject, Role en single),cloudflaredoptionnel, Traefik par défaut ;deploy/kubernetes/traefik-values.yaml.wiki/Kubernetes.md,deploy/kubernetes/README.md, FAQ.Test réel (k3s v1.31.4, mono-nœud, Traefik 3.7.16 via Helm, local-path 0.0.32)
Chart installé, DevForge (binaire de cette branche) dans le cluster, app
nginxinc/nginx-unprivilegeddéployée via l'API : pods Running, Service, Ingresstraefik, HTTP 200 via Traefik, logs, restart, stop/start, rolling update (680/680 requêtes OK pendant update + restart), suppression, garde-fou namespace, copie du secret de pull, mode single.live_cluster.rspasse avec le jeton du ServiceAccount du chart.Bugs corrigés
wait-postgresbloqué (pg_isready sans-Usous uid 1000).preStopsleep 5 s, grace 35 s.logs,service.spec.type).Non testé : Talos réel, Longhorn, vrai tunnel Cloudflare.