Stabilized Consul integration with HTTP api

This commit is contained in:
Ara Sadoyan
2025-04-08 10:20:02 +02:00
parent b2823508b7
commit 788c618a3d
6 changed files with 94 additions and 35 deletions

13
etc/main.yaml Normal file
View File

@@ -0,0 +1,13 @@
version: 1
threads: 8
upstream_keepalive_pool_size: 100
pid_file: /tmp/load_balancer.pid
error_log: /tmp/load_balancer_err.log
upgrade_sock: /tmp/load_balancer.sock
proxy_address_http: 0.0.0.0:6193
proxy_address_tls: 0.0.0.0:6194
config_address: 0.0.0.0:3000
upstreams_conf: etc/upstreams.yaml
#idle_timeout: 1000
log_level: info # info, warn, error, debug, trace, off

View File

@@ -1,18 +1,27 @@
provider: "file"
provider: "consul"
globals:
headers:
- "Access-Control-Allow-Origin:*"
- "Access-Control-Allow-Methods:POST, GET, OPTIONS"
- "Access-Control-Max-Age:86400"
- "Hujukulu-Header-HoHoHo:Me No Ho Ho Ho"
consul:
servers:
- "http://master1:8500"
- "http://192.168.22.1:8500"
- "http://master1.digitai.local:8500"
whitelist:
- "frontend-dev-frontend-srv"
- "gateway-test-gateway-srv"
- "gateway-stage-gateway-srv"
services:
- proxy: "proxy-frontend-dev-frontend-srv"
real: "frontend-dev-frontend-srv"
- proxy: "proxy-gateway-test-gateway-srv"
real: "gateway-test-gateway-srv"
- proxy: "proxy-backoffice-dev-backoffice-srv"
real: "backoffice-dev-backoffice-srv"
token: "8e2db809-845b-45e1-8b47-2c8356a09da0-a4370955-18c2-4d6e-a8f8-ffcc0b47be81"
# whitelist:
# - "frontend-dev-frontend-srv"
# - "gateway-test-gateway-srv"
# - "gateway-stage-gateway-srv"
upstreams:
myip.netangels.net:
paths: