Cpte-Boot/k8s/configmap.yaml

144 lines
3.6 KiB
YAML
Raw Normal View History

2026-03-06 15:19:25 +08:00
apiVersion: v1
kind: ConfigMap
metadata:
name: wms-common-config
namespace: wms-system
labels:
app: cpte-wms
data:
APPLICATION_YML: |
# 公共配置
spring:
application:
name: cpte-wms
profiles:
active: k8s
# Jackson 时间格式化
jackson:
date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8
# 文件上传大小限制
servlet:
multipart:
max-file-size: 10MB
max-request-size: 10MB
# Redis 配置(从 Secret 读取)
data:
redis:
host: ${REDIS_HOST:redis-service}
port: ${REDIS_PORT:6379}
password: ${REDIS_PASSWORD:}
database: 0
# 数据源配置(从 Secret 读取)
datasource:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://${MYSQL_HOST:mysql-service}:${MYSQL_PORT:3306}/cpte-wms?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true
username: ${MYSQL_USERNAME:root}
password: ${MYSQL_PASSWORD:}
druid:
initial-size: 5
min-idle: 5
max-active: 20
max-wait: 60000
time-between-eviction-runs-millis: 60000
min-evictable-idle-time-millis: 300000
validation-query: SELECT 1
test-while-idle: true
test-on-borrow: false
test-on-return: false
pool-prepared-statements: true
max-pool-prepared-statement-per-connection-size: 20
filters: stat,slf4j
stat:
slow-sql-millis: 5000
merge-sql: true
# MyBatis Plus 配置
mybatis-plus:
mapper-locations: classpath*:org/jeecg/**/xml/*Mapper.xml,classpath*:org/cpte/**/xml/*Mapper.xml
global-config:
banner: false
db-config:
id-type: ASSIGN_ID
table-underline: true
configuration:
call-setters-on-nulls: true
# Jeecg 配置
jeecg:
signatureSecret: dd05f1c54d63749eda95f9fa6d49v442a
uploadType: local
path:
upload: /data/upload
webapp: /data/webapp
# Knife4j 配置
knife4j:
enable: true
production: false
# 日志配置
logging:
level:
root: INFO
org.jeecg: INFO
org.cpte: INFO
com.alibaba.druid: DEBUG
pattern:
console: "%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n"
# Feign 配置
FEIGN_CONFIG: |
feign:
client:
config:
default:
connectTimeout: 5000
readTimeout: 10000
loggerLevel: BASIC
compression:
request:
enabled: true
response:
enabled: true
httpclient:
enabled: false
okhttp:
enabled: true
# Ribbon 配置(使用 Spring Cloud LoadBalancer
spring:
cloud:
loadbalancer:
retry:
enabled: true
cache:
ttl: 30000
# Actuator 监控配置
ACTUATOR_CONFIG: |
management:
endpoints:
web:
exposure:
include: health,info,metrics,prometheus
endpoint:
health:
show-details: always
probes:
enabled: true
metrics:
export:
prometheus:
enabled: true
health:
livenessState:
enabled: true
readinessState:
enabled: true