chore: update
This commit is contained in:
@@ -16,8 +16,9 @@ const (
|
||||
PoolSizePerService = 5 // slots par service externe poolé
|
||||
)
|
||||
|
||||
// Services externes gérés par pool pré-provisionné (non auto-créables par API).
|
||||
// TomTom n'y figure pas : ses clés sont créées à la volée par le worker.
|
||||
// Services externes gérés par pool pré-provisionné (non auto-créables par
|
||||
// API). TomTom n'y figure pas : ses clés sont saisies directement par
|
||||
// l'admin au moment du déploiement (voir ProvisionConfig.TomTomAPIKey*).
|
||||
const (
|
||||
ServiceTelegram = "telegram"
|
||||
ServiceNowPayments = "nowpayments"
|
||||
@@ -75,6 +76,16 @@ type ProvisionConfig struct {
|
||||
S3Bucket string
|
||||
S3Endpoint string
|
||||
|
||||
// TomTom (GPS livreur : géocodage, itinéraire, ETA — voir
|
||||
// services/tomtom_keys.go côté gestion). Jusqu'à 4 clés, utilisées en
|
||||
// rotation automatique par le backend si l'une atteint son quota
|
||||
// (403/429) ; seule TomTomAPIKey est requise, les 3 suivantes sont des
|
||||
// clés de secours optionnelles.
|
||||
TomTomAPIKey string
|
||||
TomTomAPIKey1 string
|
||||
TomTomAPIKey2 string
|
||||
TomTomAPIKey3 string
|
||||
|
||||
// Load-balancer Telegram (chart lbtelegram) : installé seulement si au
|
||||
// moins un bot est renseigné. GATEWAY_URL (URL publique de la démo) et
|
||||
// les DSN/secrets sont générés par le provisioner. Les 3 réglages
|
||||
|
||||
@@ -30,6 +30,13 @@ type createRequest struct {
|
||||
S3Bucket string `json:"s3_bucket" binding:"omitempty,max=63"`
|
||||
S3Endpoint string `json:"s3_endpoint" binding:"omitempty,max=255"`
|
||||
|
||||
// TomTom : jusqu'à 4 clés (1 principale + 3 de secours, rotation
|
||||
// automatique côté backend en cas de quota atteint).
|
||||
TomTomAPIKey string `json:"tomtom_api_key" binding:"omitempty"`
|
||||
TomTomAPIKey1 string `json:"tomtom_api_key_1" binding:"omitempty"`
|
||||
TomTomAPIKey2 string `json:"tomtom_api_key_2" binding:"omitempty"`
|
||||
TomTomAPIKey3 string `json:"tomtom_api_key_3" binding:"omitempty"`
|
||||
|
||||
LBBot1Username string `json:"lb_bot1_username" binding:"omitempty,max=64"`
|
||||
LBBot1Token string `json:"lb_bot1_token" binding:"omitempty"`
|
||||
LBBot2Username string `json:"lb_bot2_username" binding:"omitempty,max=64"`
|
||||
@@ -74,6 +81,10 @@ func (h *Handler) Create(c *gin.Context) {
|
||||
StorageDriver: req.StorageDriver,
|
||||
S3Bucket: req.S3Bucket,
|
||||
S3Endpoint: req.S3Endpoint,
|
||||
TomTomAPIKey: req.TomTomAPIKey,
|
||||
TomTomAPIKey1: req.TomTomAPIKey1,
|
||||
TomTomAPIKey2: req.TomTomAPIKey2,
|
||||
TomTomAPIKey3: req.TomTomAPIKey3,
|
||||
LBBot1Username: req.LBBot1Username,
|
||||
LBBot1Token: req.LBBot1Token,
|
||||
LBBot2Username: req.LBBot2Username,
|
||||
|
||||
@@ -835,6 +835,21 @@ func (h *HelmProvisioner) buildBackendValues(d Demo, resources []ExternalResourc
|
||||
// marchand NowPayments, pas à une valeur générée par le pool.
|
||||
secrets["NOWPAYMENTS_IPN_SECRET"] = cfg.NowPaymentsIPNSecret
|
||||
}
|
||||
// TomTom : seule la première clé est requise, les 3 suivantes sont des
|
||||
// clés de secours optionnelles (rotation automatique côté backend, voir
|
||||
// services/tomtom_keys.go côté gestion).
|
||||
if cfg.TomTomAPIKey != "" {
|
||||
secrets["TOMTOM_API_KEY"] = cfg.TomTomAPIKey
|
||||
}
|
||||
if cfg.TomTomAPIKey1 != "" {
|
||||
secrets["TOMTOM_API_KEY_1"] = cfg.TomTomAPIKey1
|
||||
}
|
||||
if cfg.TomTomAPIKey2 != "" {
|
||||
secrets["TOMTOM_API_KEY_2"] = cfg.TomTomAPIKey2
|
||||
}
|
||||
if cfg.TomTomAPIKey3 != "" {
|
||||
secrets["TOMTOM_API_KEY_3"] = cfg.TomTomAPIKey3
|
||||
}
|
||||
if cfg.LBTelegramEnabled() {
|
||||
env["LBTELEGRAM_URL"] = fmt.Sprintf("http://%s-lbtelegram-lbtelegram.%s.svc.cluster.local:8081", d.Namespace, d.Namespace)
|
||||
env["LBTELEGRAM_BOT1_USERNAME"] = cfg.LBBot1Username
|
||||
|
||||
Reference in New Issue
Block a user