chore: fix
ci-api / test (push) Successful in 21m58s

This commit is contained in:
Xor290
2026-08-02 14:41:45 +02:00
parent 641b06f615
commit 38e367e241
2 changed files with 28 additions and 18 deletions
@@ -20,6 +20,7 @@ type Config struct {
Kubeconfig string Kubeconfig string
FrontendImage string FrontendImage string
BackendImage string BackendImage string
LBTelegramImage string
} }
// Load lit la config. Fail-secure : secret JWT obligatoire ; en prod base + Redis aussi. // Load lit la config. Fail-secure : secret JWT obligatoire ; en prod base + Redis aussi.
@@ -43,6 +44,7 @@ func Load() (Config, error) {
Kubeconfig: os.Getenv("KUBECONFIG"), Kubeconfig: os.Getenv("KUBECONFIG"),
FrontendImage: os.Getenv("FRONTEND_IMAGE_APP"), FrontendImage: os.Getenv("FRONTEND_IMAGE_APP"),
BackendImage: os.Getenv("BACKEND_IMAGE_APP"), BackendImage: os.Getenv("BACKEND_IMAGE_APP"),
LBTelegramImage: os.Getenv("LBTELEGRAM_IMAGE_APP"),
} }
if cfg.Env == "prod" { if cfg.Env == "prod" {
@@ -37,6 +37,7 @@ type HelmProvisioner struct {
chartsDir string // chemin vers le dossier des charts (ex: /charts) chartsDir string // chemin vers le dossier des charts (ex: /charts)
frontendImage string frontendImage string
backendImage string backendImage string
lbtelegramImage string
baseDomain string baseDomain string
helmPath string // chemin vers l'exécutable helm (default: "helm") helmPath string // chemin vers l'exécutable helm (default: "helm")
} }
@@ -73,6 +74,7 @@ func NewHelmProvisioner(
chartsDir: chartsDir, chartsDir: chartsDir,
frontendImage: cfg.FrontendImage, frontendImage: cfg.FrontendImage,
backendImage: cfg.BackendImage, backendImage: cfg.BackendImage,
lbtelegramImage: cfg.LBTelegramImage,
baseDomain: cfg.DemoDomain, baseDomain: cfg.DemoDomain,
helmPath: helmPath, helmPath: helmPath,
}, nil }, nil
@@ -617,8 +619,14 @@ func (h *HelmProvisioner) buildLBTelegramValues(d Demo, cfg ProvisionConfig, bac
backendURL := fmt.Sprintf("http://%s-backend-gestion-backend.%s.svc.cluster.local:8080", d.Namespace, d.Namespace) backendURL := fmt.Sprintf("http://%s-backend-gestion-backend.%s.svc.cluster.local:8080", d.Namespace, d.Namespace)
dbURL := fmt.Sprintf("postgres://postgres:demo-postgres-pass@%s-postgresql-postgresql:5432/demo_db?sslmode=disable", d.Namespace) dbURL := fmt.Sprintf("postgres://postgres:demo-postgres-pass@%s-postgresql-postgresql:5432/demo_db?sslmode=disable", d.Namespace)
redisURL := fmt.Sprintf("redis://:demo-redis-pass@%s-redis-redis:6379/0", d.Namespace) redisURL := fmt.Sprintf("redis://:demo-redis-pass@%s-redis-redis:6379/0", d.Namespace)
lbRepo, lbTag := parseImage(h.lbtelegramImage)
return map[string]interface{}{ return map[string]interface{}{
"image": map[string]interface{}{
"repository": lbRepo,
"tag": lbTag,
"pullPolicy": "Always",
},
"env": map[string]string{ "env": map[string]string{
"PORT": "8081", "PORT": "8081",
"ENV": "production", "ENV": "production",