configmap.yaml 1.77 KB
apiVersion: v1
kind: ConfigMap
metadata:
  name: user-service-config
  namespace: ecommerce
  labels:
    app: user-service
data:
  application.yml: |
    server:
      port: 8080
      servlet:
        context-path: /api/users
    spring:
      application:
        name: user-service
      datasource:
        url: jdbc:postgresql://postgresql-service:5432/ecommerce
        username: admin
        driver-class-name: org.postgresql.Driver
        hikari:
          maximum-pool-size: 10
          minimum-idle: 2
          connection-timeout: 30000
          idle-timeout: 600000
          max-lifetime: 1800000
      jpa:
        hibernate:
          ddl-auto: validate
          naming:
            physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
        show-sql: false
        properties:
          hibernate:
            dialect: org.hibernate.dialect.PostgreSQLDialect
            format_sql: true
            jdbc:
              batch_size: 20
              order_inserts: true
              order_updates: true
      redis:
        host: redis-service
        port: 6379
        timeout: 2000
        lettuce:
          pool:
            max-active: 10
            max-idle: 5
            min-idle: 2
            max-wait: 1000
    jwt:
      secret: ${JWT_SECRET}
      expiration: 86400000
      refresh-expiration: 2592000000
    logging:
      level:
        com.ecommerce.userservice: DEBUG
        org.hibernate.SQL: WARN
        org.hibernate.type.descriptor.sql.BasicBinder: WARN
    management:
      endpoints:
        web:
          exposure:
            include: health,info,metrics,prometheus
      endpoint:
        health:
          show-details: always
          probes:
            enabled: true
    eureka:
      client:
        enabled: false