# unionflow-server-impl-quarkus-k1 Repo de déploiement pour **UnionFlow Server** (backend Quarkus) sur le cluster **k1**. ## Qu'est-ce que ce repo ? Ce repo contient **uniquement la configuration de déploiement** (Helm values) pour UnionFlow Server sur le cluster k1. Le code source de l'application est dans un autre repo : [`unionflow-server-impl-quarkus`](https://git.lions.dev/lionsdev/unionflow-server-impl-quarkus). Ce repo consomme le chart parent [`helm-chart-lions-app`](https://git.lions.dev/lionsdev/helm-chart-lions-app) et fournit juste les overrides spécifiques à UnionFlow. ``` ┌────────────────────────────────────┐ │ unionflow-server-impl-quarkus │ ← Code source (Maven, Java 21, Quarkus) │ (le repo du code) │ └────────────────────────────────────┘ │ lionsctl pipeline │ build + docker push ▼ ┌────────────────────────────────────┐ │ registry.lions.dev/lionsdev/ │ │ unionflow-server-impl-quarkus │ ← Image Docker buildée │ :1.0.5-20260418-081420 │ └────────────────────────────────────┘ │ lionsctl pipeline │ update values.yaml tag │ commit + push ▼ ┌────────────────────────────────────┐ │ unionflow-server-impl-quarkus-k1 │ ← CE REPO (deploy config) │ ├── Chart.yaml │ │ └── values.yaml │ └────────────────────────────────────┘ │ helm upgrade --install ▼ ┌────────────────────────────────────┐ │ K8s cluster k1 (namespace │ │ applications) │ └────────────────────────────────────┘ ``` ## Déploiement manuel ```bash # Depuis le répertoire du repo helm dependency update . helm upgrade --install unionflow-server-impl-quarkus . \ --namespace applications \ --create-namespace \ --wait \ --timeout 5m ``` ## Déploiement via lionsctl (attendu) ```bash lionsctl pipeline \ -u https://git.lions.dev/lionsdev/unionflow-server-impl-quarkus \ -b main -j 21 -e production -c k1 -p prod \ -m admin@lions.dev ``` Sous le capot, lionsctl : 1. Clone le repo du code source 2. `mvn package` (Dagger container) 3. `docker build` + push → `registry.lions.dev/lionsdev/unionflow-server-impl-quarkus:` 4. Clone CE REPO (`-k1` dérivé du nom de l'app + cluster) 5. Update `values.yaml` : `lions-app.image.tag: ` 6. Commit + push avec le compte `lionsctl-bot` 7. `helm upgrade --install ...` 8. Health check + email ## Validation locale ```bash # Lint helm lint . # Dry-run rendu des manifests helm template test . \ --namespace applications \ --debug # Diff avec l'état live (requires helm-diff plugin) helm diff upgrade unionflow-server-impl-quarkus . \ --namespace applications ``` ## Secrets attendus dans Vault Avant le premier déploiement, peupler Vault : ```bash # Credentials DB (partagés avec lions-shared-db-secret actuel) vault kv put lions/applications/unionflow-server/db \ username=lionsuser \ password= # Credentials Keycloak OIDC vault kv put lions/applications/unionflow-server/oidc \ client-secret= \ admin-service-secret= ``` L'ExternalSecret synchronisera ces valeurs vers le K8s Secret `unionflow-server-impl-quarkus-secrets` toutes les 1h (configurable via `refreshInterval`). ## Environnement - **Cluster** : k1 (176.57.150.2) - **Namespace** : `applications` - **Hostname** : `api.lions.dev/unionflow` - **Image** : `registry.lions.dev/lionsdev/unionflow-server-impl-quarkus` - **Ingress** : TLS Let's Encrypt, path-strip `/unionflow` → backend - **Secrets** : Vault `lions/applications/unionflow-server/*` - **DB** : PostgreSQL `unionflow-server-impl-quarkus` sur `postgresql-service.postgresql` - **Messaging** : Kafka `kafka-service.kafka` port 9092 ## Conventions - Le nom du Helm release = `unionflow-server-impl-quarkus` (correspond au nom de l'app et de l'image) - Le namespace = environnement (`applications` pour prod) - L'image tag est **automatiquement mis à jour** par lionsctl pipeline à chaque déploiement - **Ne jamais mettre de secrets en clair** dans `values.yaml` — toujours via ExternalSecret + Vault ## Lien vers les docs - [Chart parent helm-chart-lions-app](https://git.lions.dev/lionsdev/helm-chart-lions-app) - [UnionFlow source code](https://git.lions.dev/lionsdev/unionflow-server-impl-quarkus) - [Lions Infrastructure](https://git.lions.dev/lionsdev/lions-infrastructure-2025)