configmap-gateway.yaml 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. discovery:
  21. enabled: false
  22. service-registry:
  23. auto-registration:
  24. enabled: false
  25. gateway:
  26. routes:
  27. - id: order-service
  28. uri: http://{{ include "shop-recycle.fullname" . }}-order-service:{{ .Values.orderService.service.port }}
  29. predicates:
  30. - Path=/api/order/**
  31. filters:
  32. - RewritePath=/api/order(?<segment>.*), /order$\{segment}
  33. - id: payment-service
  34. uri: http://{{ include "shop-recycle.fullname" . }}-payment-service:{{ .Values.paymentService.service.port }}
  35. predicates:
  36. - Path=/api/payment/**
  37. filters:
  38. - RewritePath=/api/payment(?<segment>.*), /payment$\{segment}
  39. - id: test-order
  40. uri: http://{{ include "shop-recycle.fullname" . }}-order-service:{{ .Values.orderService.service.port }}
  41. predicates:
  42. - Path=/api/test/order/**
  43. filters:
  44. - RewritePath=/api/test/order(?<segment>.*), /test/order$\{segment}
  45. - id: test-payment
  46. uri: http://{{ include "shop-recycle.fullname" . }}-payment-service:{{ .Values.paymentService.service.port }}
  47. predicates:
  48. - Path=/api/test/payment/**
  49. filters:
  50. - RewritePath=/api/test/payment(?<segment>.*), /test/payment$\{segment}
  51. eureka:
  52. client:
  53. enabled: false
  54. instance:
  55. prefer-ip-address: false
  56. management:
  57. endpoints:
  58. web:
  59. exposure:
  60. include: health,info,metrics
  61. metrics:
  62. export:
  63. prometheus:
  64. enabled: true
  65. endpoint:
  66. health:
  67. show-details: when-authorized
  68. logging:
  69. level:
  70. root: INFO
  71. com.shop.recycle: DEBUG
  72. pattern:
  73. console: "%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n"
  74. {{- end }}