{{- 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: compatibility-verifier: enabled: false discovery: enabled: false service-registry: auto-registration: enabled: false 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(?.*), /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(?.*), /payment$\{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/order$\{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/payment$\{segment} eureka: client: enabled: false instance: prefer-ip-address: false management: endpoints: web: exposure: include: health,info,metrics metrics: export: prometheus: enabled: true endpoint: health: show-details: when-authorized logging: level: root: INFO com.shop.recycle: DEBUG pattern: console: "%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n" {{- end }}