Procházet zdrojové kódy

Add Grafana dashboards, HPA configs, and Prometheus alert rules for Shop Recycle monitoring

Builder před 2 měsíci
rodič
revize
648d1e1488

+ 2 - 2
k8s/helm/shop-recycle/templates/configmap-gateway.yaml

@@ -29,14 +29,14 @@ data:
               predicates:
                 - Path=/api/order/**
               filters:
-                - RewritePath=/api/order(?<segment>.*), /api$\{segment}
+                - RewritePath=/api/order(?<segment>.*), /order$\{segment}
 
             - id: payment-service
               uri: http://{{ include "shop-recycle.fullname" . }}-payment-service:{{ .Values.paymentService.service.port }}
               predicates:
                 - Path=/api/payment/**
               filters:
-                - RewritePath=/api/payment(?<segment>.*), /api$\{segment}
+                - RewritePath=/api/payment(?<segment>.*), /payment$\{segment}
 
             - id: test-order
               uri: http://{{ include "shop-recycle.fullname" . }}-order-service:{{ .Values.orderService.service.port }}

+ 2 - 2
k8s/helm/shop-recycle/values.yaml

@@ -275,7 +275,7 @@ webFrontend:
   
   image:
     name: shop-recycle-web
-    tag: "3.0.0"
+    tag: "3.0.6"
   
   port: 80
   containerPort: 80
@@ -308,7 +308,7 @@ webFrontend:
     failureThreshold: 3
   
   service:
-    type: ClusterIP
+    type: LoadBalancer
     port: 80
     targetPort: 80
     annotations: {}

+ 0 - 1
shop-recycle-web/Dockerfile

@@ -19,7 +19,6 @@ RUN npm ci --only=production && \
 
 # Copy source code
 COPY shop-recycle-web/src ./src
-COPY shop-recycle-web/public ./public
 COPY shop-recycle-web/vite.config.js ./
 COPY shop-recycle-web/index.html ./
 

+ 1 - 1
shop-recycle-web/nginx.conf

@@ -28,7 +28,7 @@ server {
 
     # 反向代理到API网关
     location /api/ {
-        proxy_pass http://localhost:8080/api/;
+        proxy_pass http://shop-recycle-gateway:8080/api/;
         proxy_set_header Host $host;
         proxy_set_header X-Real-IP $remote_addr;
         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;