configmap-gateway.yaml 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. {{- if .Values.gateway.enabled }}
  2. apiVersion: v1
  3. kind: ConfigMap
  4. metadata:
  5. name: {{ include "shop-recycle.fullname" . }}-gateway-config
  6. labels:
  7. app: {{ include "shop-recycle.fullname" . }}-gateway
  8. {{- include "shop-recycle.labels" . | nindent 4 }}
  9. namespace: {{ .Release.Namespace }}
  10. data:
  11. application.yml: |
  12. spring:
  13. main:
  14. web-application-type: reactive
  15. application:
  16. name: shop-recycle-gateway
  17. cloud:
  18. compatibility-verifier:
  19. enabled: false
  20. gateway:
  21. routes:
  22. - id: order-service
  23. uri: http://{{ include "shop-recycle.fullname" . }}-order-service:{{ .Values.orderService.service.port }}
  24. predicates:
  25. - Path=/api/order/**
  26. filters:
  27. - RewritePath=/api/order(?<segment>.*), /api$\{segment}
  28. - id: payment-service
  29. uri: http://{{ include "shop-recycle.fullname" . }}-payment-service:{{ .Values.paymentService.service.port }}
  30. predicates:
  31. - Path=/api/payment/**
  32. filters:
  33. - RewritePath=/api/payment(?<segment>.*), /api$\{segment}
  34. - id: test-order
  35. uri: http://{{ include "shop-recycle.fullname" . }}-order-service:{{ .Values.orderService.service.port }}
  36. predicates:
  37. - Path=/api/test/order/**
  38. filters:
  39. - RewritePath=/api/test/order(?<segment>.*), /test$\{segment}
  40. - id: test-payment
  41. uri: http://{{ include "shop-recycle.fullname" . }}-payment-service:{{ .Values.paymentService.service.port }}
  42. predicates:
  43. - Path=/api/test/payment/**
  44. filters:
  45. - RewritePath=/api/test/payment(?<segment>.*), /test$\{segment}
  46. eureka:
  47. client:
  48. enabled: false
  49. management:
  50. endpoints:
  51. web:
  52. exposure:
  53. include: health,info,metrics
  54. metrics:
  55. export:
  56. prometheus:
  57. enabled: true
  58. endpoint:
  59. health:
  60. show-details: when-authorized
  61. logging:
  62. level:
  63. root: INFO
  64. com.shop.recycle: DEBUG
  65. pattern:
  66. console: "%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n"
  67. {{- end }}