| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- {{- if .Values.gateway.enabled }}
- apiVersion: v1
- kind: ConfigMap
- metadata:
- name: {{ include "shop-recycle.fullname" . }}-gateway-config
- labels:
- app: {{ include "shop-recycle.fullname" . }}-gateway
- {{- include "shop-recycle.labels" . | nindent 4 }}
- namespace: {{ .Release.Namespace }}
- data:
- application.yml: |
- spring:
- application:
- name: shop-recycle-gateway
- cloud:
- gateway:
- routes:
- - id: order-service
- uri: http://{{ include "shop-recycle.fullname" . }}-order-service:{{ .Values.orderService.service.port }}
- predicates:
- - Path=/api/order/**
- filters:
- - RewritePath=/api/order(?<segment>.*), /api$\{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}
-
- - id: test-order
- uri: http://{{ include "shop-recycle.fullname" . }}-order-service:{{ .Values.orderService.service.port }}
- predicates:
- - Path=/api/test/order/**
- filters:
- - RewritePath=/api/test/order(?<segment>.*), /test$\{segment}
-
- - id: test-payment
- uri: http://{{ include "shop-recycle.fullname" . }}-payment-service:{{ .Values.paymentService.service.port }}
- predicates:
- - Path=/api/test/payment/**
- filters:
- - RewritePath=/api/test/payment(?<segment>.*), /test$\{segment}
-
- management:
- endpoints:
- web:
- exposure:
- include: health,info,metrics
- metrics:
- export:
- prometheus:
- enabled: true
- endpoint:
- health:
- show-details: when-authorized
-
- logging:
- level:
- root: {{ .Values.logging.level }}
- com.shop.recycle: DEBUG
- pattern:
- console: "%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n"
- {{- end }}
|