configmap.yaml 1.28 KB
apiVersion: v1
kind: ConfigMap
metadata:
  name: product-service-config
  namespace: ecommerce
  labels:
    app: product-service
data:
  application.yml: |
    server:
      port: 8080
      servlet:
        context-path: /api/products
    spring:
      application:
        name: product-service
      data:
        mongodb:
          uri: mongodb://admin:${MONGO_PASSWORD}@mongodb-service:27017/ecommerce?authSource=admin
          database: ecommerce
          auto-index-creation: true
      redis:
        host: redis-service
        port: 6379
        password: ${REDIS_PASSWORD}
        timeout: 2000
        lettuce:
          pool:
            max-active: 10
            max-idle: 5
            min-idle: 2
            max-wait: 1000
      cache:
        type: redis
        redis:
          time-to-live: 3600000
          cache-null-values: false
    logging:
      level:
        com.ecommerce.productservice: DEBUG
        org.springframework.data.mongodb.core: WARN
    management:
      endpoints:
        web:
          exposure:
            include: health,info,metrics,prometheus
      endpoint:
        health:
          show-details: always
    elasticsearch:
      host: elasticsearch-service
      port: 9200
    feature:
      flags:
        cache-enabled: true
        search-enabled: true