{{- 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: main: web-application-type: reactive 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(?.*), /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(?.*), /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(?.*), /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(?.*), /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 }}