apiVersion: v1
kind: ConfigMap
metadata:
  name: cm-common
  namespace: kt-event-marketing
data:
  # Redis Configuration
  REDIS_ENABLED: "true"
  REDIS_HOST: "redis-node-0.redis-headless"
  REDIS_PORT: "6379"
  REDIS_TIMEOUT: "2000ms"
  REDIS_POOL_MAX: "8"
  REDIS_POOL_IDLE: "8"
  REDIS_POOL_MIN: "0"
  REDIS_POOL_WAIT: "-1ms"

  # Kafka Configuration
  KAFKA_BOOTSTRAP_SERVERS: "20.249.182.13:9095,4.217.131.59:9095"
  EXCLUDE_KAFKA: ""
  EXCLUDE_REDIS: ""

  # CORS Configuration
  CORS_ALLOWED_ORIGINS: "http://localhost:8081,http://localhost:8082,http://localhost:8083,http://localhost:8084,http://kt-event-marketing.20.214.196.128.nip.io,http://kt-event-marketing-api.20.214.196.128.nip.io,http://*.20.214.196.128.nip.io,https://kt-event-marketing.20.214.196.128.nip.io,https://kt-event-marketing-api.20.214.196.128.nip.io,https://*.20.214.196.128.nip.io"
  CORS_ALLOWED_METHODS: "GET,POST,PUT,DELETE,OPTIONS,PATCH"
  CORS_ALLOWED_HEADERS: "*"
  CORS_ALLOW_CREDENTIALS: "true"
  CORS_MAX_AGE: "3600"

  # JWT Configuration
  JWT_ACCESS_TOKEN_VALIDITY: "604800000"
  JWT_REFRESH_TOKEN_VALIDITY: "86400000"

  # JPA Configuration
  DDL_AUTO: "update"
  SHOW_SQL: "false"
  JPA_DIALECT: "org.hibernate.dialect.PostgreSQLDialect"
  H2_CONSOLE_ENABLED: "false"

  # Logging Configuration
  LOG_LEVEL_APP: "INFO"
  LOG_LEVEL_WEB: "INFO"
  LOG_LEVEL_SQL: "WARN"
  LOG_LEVEL_SQL_TYPE: "WARN"
  LOG_LEVEL_ROOT: "INFO"
  LOG_FILE_MAX_SIZE: "10MB"
  LOG_FILE_MAX_HISTORY: "7"
  LOG_FILE_TOTAL_CAP: "100MB"
