From 75e10f53242df1137d47171c924b7b85f6aec8f7 Mon Sep 17 00:00:00 2001 From: fanfpy Date: Sun, 22 Jun 2025 23:37:58 +0800 Subject: [PATCH] =?UTF-8?q?refactor(consul):=20=E7=BB=9F=E4=B8=80Traefik?= =?UTF-8?q?=E5=85=83=E6=95=B0=E6=8D=AE=E9=94=AE=E5=90=8D=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将Traefik相关的元数据键名从点分隔符改为下划线分隔符,提高配置一致性 --- consul/config/data-service.hcl | 4 ++-- consul/config/emotion-service.hcl | 4 ++-- consul/config/frontend.hcl | 4 ++-- consul/config/quant-service.hcl | 4 ++-- consul/config/recommend-service.hcl | 4 ++-- consul/config/user-service.hcl | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/consul/config/data-service.hcl b/consul/config/data-service.hcl index a9139a5..a87bccb 100644 --- a/consul/config/data-service.hcl +++ b/consul/config/data-service.hcl @@ -11,7 +11,7 @@ service { } meta = { - "traefik.enable" = "true" - "traefik.http.routers.data-service.rule" = "PathPrefix(`/api/data`)" + traefik_enable = "true" + traefik_http_routers_data_service_rule = "PathPrefix(`/api/data`)" } } \ No newline at end of file diff --git a/consul/config/emotion-service.hcl b/consul/config/emotion-service.hcl index 996e90c..bed3c45 100644 --- a/consul/config/emotion-service.hcl +++ b/consul/config/emotion-service.hcl @@ -11,7 +11,7 @@ service { } meta = { - "traefik.enable" = "true" - "traefik.http.routers.emotion-service.rule" = "PathPrefix(`/api/emotion`)" + traefik_enable = "true" + traefik_http_routers_emotion_service_rule = "PathPrefix(`/api/emotion`)" } } \ No newline at end of file diff --git a/consul/config/frontend.hcl b/consul/config/frontend.hcl index d1d3a99..24dc2aa 100644 --- a/consul/config/frontend.hcl +++ b/consul/config/frontend.hcl @@ -11,7 +11,7 @@ service { } meta = { - "traefik.enable" = "true" - "traefik.http.routers.frontend.rule" = "PathPrefix(`/`)" + traefik_enable = "true" + traefik_http_routers_frontend_rule = "PathPrefix(`/`)" } } \ No newline at end of file diff --git a/consul/config/quant-service.hcl b/consul/config/quant-service.hcl index d71927c..ae1434f 100644 --- a/consul/config/quant-service.hcl +++ b/consul/config/quant-service.hcl @@ -11,7 +11,7 @@ service { } meta = { - "traefik.enable" = "true" - "traefik.http.routers.quant-service.rule" = "PathPrefix(`/api/quant`)" + traefik_enable = "true" + traefik_http_routers_quant_service_rule = "PathPrefix(`/api/quant`)" } } \ No newline at end of file diff --git a/consul/config/recommend-service.hcl b/consul/config/recommend-service.hcl index 5ef6ed1..8b31706 100644 --- a/consul/config/recommend-service.hcl +++ b/consul/config/recommend-service.hcl @@ -11,7 +11,7 @@ service { } meta = { - "traefik.enable" = "true" - "traefik.http.routers.recommend-service.rule" = "PathPrefix(`/api/recommend`)" + traefik_enable = "true" + traefik_http_routers_recommend_service_rule = "PathPrefix(`/api/recommend`)" } } \ No newline at end of file diff --git a/consul/config/user-service.hcl b/consul/config/user-service.hcl index 7269865..e498f3f 100644 --- a/consul/config/user-service.hcl +++ b/consul/config/user-service.hcl @@ -11,7 +11,7 @@ service { } meta = { - "traefik.enable" = "true" - "traefik.http.routers.user-service.rule" = "PathPrefix(`/api/user`)" + traefik_enable = "true" + traefik_http_routers_user_service_rule = "PathPrefix(`/api/user`)" } } \ No newline at end of file