values.yaml 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396
  1. # ==========================================
  2. # Helm Values - shop-recycle
  3. # 全局配置(所有环境共享)
  4. # ==========================================
  5. # 全局配置
  6. global:
  7. # 镜像仓库认证(若启用,Helm 自动生成 imagePullSecret)
  8. registry:
  9. createSecret: true # 设为 false 则不创建 secret,使用已有的
  10. username: "admin" # harbor.stardance 用户名
  11. password: "Harbor12345" # harbor.stardance 密码
  12. email: "ops@example.com"
  13. # 若 registry.createSecret=false,则指定已有的 secret 名称
  14. imagePullSecrets: []
  15. # - name: reg-cred
  16. # 副本数
  17. replicaCount: 1
  18. # 镜像配置
  19. image:
  20. registry: harbor.stardance
  21. namespace: shoprecycle
  22. pullPolicy: IfNotPresent
  23. tag: "3.0.0"
  24. # tag由Jenkins Pipeline动态注入(--set image.tag=xxx)
  25. # 环境名称(由Pipeline动态注入)
  26. environment: dev
  27. # ==========================================
  28. # Gateway (API网关)
  29. # ==========================================
  30. gateway:
  31. enabled: true
  32. replicaCount: 1
  33. image:
  34. name: shop-recycle-gateway
  35. tag: "3.0.6"
  36. port: 8080
  37. containerPort: 8080
  38. protocol: TCP
  39. resources:
  40. requests:
  41. memory: "256Mi"
  42. cpu: "250m"
  43. limits:
  44. memory: "512Mi"
  45. cpu: "500m"
  46. # JVM参数
  47. javaOpts: "-Xms256m -Xmx512m -XX:+UseG1GC"
  48. # Spring Profiles
  49. springProfiles: "kubernetes"
  50. # 健康检查
  51. livenessProbe:
  52. httpGet:
  53. path: /health
  54. port: 8080
  55. initialDelaySeconds: 30
  56. periodSeconds: 10
  57. timeoutSeconds: 5
  58. failureThreshold: 3
  59. readinessProbe:
  60. httpGet:
  61. path: /health
  62. port: 8080
  63. initialDelaySeconds: 20
  64. periodSeconds: 5
  65. timeoutSeconds: 3
  66. failureThreshold: 3
  67. # 服务配置
  68. # 启动探针 - 给 Java 应用充分的启动时间(5分钟才开始检查)
  69. startupProbe:
  70. httpGet:
  71. path: /health
  72. port: 8080
  73. initialDelaySeconds: 300
  74. periodSeconds: 10
  75. timeoutSeconds: 5
  76. failureThreshold: 60
  77. service:
  78. type: ClusterIP
  79. port: 8080
  80. targetPort: 8080
  81. annotations: {}
  82. # 入口配置
  83. ingress:
  84. enabled: false
  85. className: "nginx"
  86. annotations:
  87. cert-manager.io/cluster-issuer: "letsencrypt-prod"
  88. hosts:
  89. - host: "dev.jxfxtd.com"
  90. paths:
  91. - path: /
  92. pathType: Prefix
  93. tls:
  94. - secretName: gateway-tls
  95. hosts:
  96. - "dev.jxfxtd.com"
  97. # 环境变量
  98. env:
  99. SPRING_CLOUD_CONFIG_ENABLED: "true"
  100. LOGGING_LEVEL_ROOT: "INFO"
  101. # ConfigMap数据
  102. configMap:
  103. application.yml: |
  104. spring:
  105. cloud:
  106. gateway:
  107. routes:
  108. - id: order-service
  109. uri: http://shop-recycle-order-service:8081
  110. predicates:
  111. - Path=/api/order/**
  112. - id: payment-service
  113. uri: http://shop-recycle-payment-service:8082
  114. predicates:
  115. - Path=/api/payment/**
  116. - id: test-order
  117. uri: http://shop-recycle-order-service:8081
  118. predicates:
  119. - Path=/api/test/**
  120. - id: test-payment
  121. uri: http://shop-recycle-payment-service:8082
  122. predicates:
  123. - Path=/api/test/**
  124. management:
  125. endpoints:
  126. web:
  127. exposure:
  128. include: health,info
  129. # ==========================================
  130. # Order Service (订单服务)
  131. # ==========================================
  132. orderService:
  133. enabled: true
  134. replicaCount: 1
  135. image:
  136. name: shop-recycle-order-service
  137. tag: "3.0.6"
  138. port: 8081
  139. containerPort: 8081
  140. protocol: TCP
  141. resources:
  142. requests:
  143. memory: "256Mi"
  144. cpu: "250m"
  145. limits:
  146. memory: "512Mi"
  147. cpu: "500m"
  148. javaOpts: "-Xms256m -Xmx512m -XX:+UseG1GC"
  149. springProfiles: "kubernetes"
  150. # 环境变量
  151. env:
  152. SPRING_CONFIG_LOCATION: "file:///etc/config/application.yml"
  153. SPRING_MAIN_WEB_APPLICATION_TYPE: "reactive"
  154. livenessProbe:
  155. httpGet:
  156. path: /health
  157. port: 8081
  158. initialDelaySeconds: 30
  159. periodSeconds: 10
  160. timeoutSeconds: 5
  161. failureThreshold: 3
  162. readinessProbe:
  163. httpGet:
  164. path: /health
  165. port: 8081
  166. initialDelaySeconds: 20
  167. periodSeconds: 5
  168. timeoutSeconds: 3
  169. failureThreshold: 3
  170. # 启动探针 - 给 Java 应用充分的启动时间(5分钟才开始检查)
  171. startupProbe:
  172. httpGet:
  173. path: /health
  174. port: 8081
  175. initialDelaySeconds: 300
  176. periodSeconds: 10
  177. timeoutSeconds: 5
  178. failureThreshold: 60
  179. service:
  180. type: ClusterIP
  181. port: 8081
  182. targetPort: 8081
  183. annotations: {}
  184. env:
  185. SPRING_CLOUD_CONFIG_ENABLED: "true"
  186. LOGGING_LEVEL_ROOT: "INFO"
  187. # ==========================================
  188. # Payment Service (支付服务)
  189. # ==========================================
  190. paymentService:
  191. enabled: true
  192. replicaCount: 1
  193. image:
  194. name: shop-recycle-payment-service
  195. tag: "3.0.6"
  196. port: 8082
  197. containerPort: 8082
  198. protocol: TCP
  199. resources:
  200. requests:
  201. memory: "256Mi"
  202. cpu: "250m"
  203. limits:
  204. memory: "512Mi"
  205. cpu: "500m"
  206. javaOpts: "-Xms256m -Xmx512m -XX:+UseG1GC"
  207. springProfiles: "kubernetes"
  208. # 环境变量
  209. env:
  210. SPRING_CONFIG_LOCATION: "file:///etc/config/application.yml"
  211. SPRING_MAIN_WEB_APPLICATION_TYPE: "reactive"
  212. livenessProbe:
  213. httpGet:
  214. path: /health
  215. port: 8082
  216. initialDelaySeconds: 30
  217. periodSeconds: 10
  218. timeoutSeconds: 5
  219. failureThreshold: 3
  220. readinessProbe:
  221. httpGet:
  222. path: /health
  223. port: 8082
  224. initialDelaySeconds: 20
  225. periodSeconds: 5
  226. timeoutSeconds: 3
  227. failureThreshold: 3
  228. # 启动探针 - 给 Java 应用充分的启动时间(5分钟才开始检查)
  229. startupProbe:
  230. httpGet:
  231. path: /health
  232. port: 8082
  233. initialDelaySeconds: 300
  234. periodSeconds: 10
  235. timeoutSeconds: 5
  236. failureThreshold: 60
  237. service:
  238. type: ClusterIP
  239. port: 8082
  240. targetPort: 8082
  241. annotations: {}
  242. env:
  243. SPRING_CLOUD_CONFIG_ENABLED: "true"
  244. LOGGING_LEVEL_ROOT: "INFO"
  245. # ==========================================
  246. # Web Frontend (前端应用)
  247. # ==========================================
  248. webFrontend:
  249. enabled: true
  250. replicaCount: 1
  251. image:
  252. name: shop-recycle-web
  253. tag: "3.0.0"
  254. port: 80
  255. containerPort: 80
  256. protocol: TCP
  257. resources:
  258. requests:
  259. memory: "128Mi"
  260. cpu: "100m"
  261. limits:
  262. memory: "256Mi"
  263. cpu: "500m"
  264. livenessProbe:
  265. httpGet:
  266. path: /health
  267. port: 80
  268. initialDelaySeconds: 10
  269. periodSeconds: 10
  270. timeoutSeconds: 5
  271. failureThreshold: 3
  272. readinessProbe:
  273. httpGet:
  274. path: /
  275. port: 80
  276. initialDelaySeconds: 5
  277. periodSeconds: 5
  278. timeoutSeconds: 3
  279. failureThreshold: 3
  280. service:
  281. type: ClusterIP
  282. port: 80
  283. targetPort: 80
  284. annotations: {}
  285. ingress:
  286. enabled: true
  287. className: "nginx"
  288. annotations:
  289. cert-manager.io/cluster-issuer: "letsencrypt-prod"
  290. hosts:
  291. - host: "dev.jxfxtd.com"
  292. paths:
  293. - path: /
  294. pathType: Prefix
  295. tls:
  296. - secretName: web-tls
  297. hosts:
  298. - "dev.jxfxtd.com"
  299. env:
  300. VUE_APP_API_BASE: "http://shop-recycle-gateway:8080"
  301. LOGGING_LEVEL: "info"
  302. # ==========================================
  303. # 网络策略
  304. # ==========================================
  305. networkPolicy:
  306. enabled: false
  307. policyTypes:
  308. - Ingress
  309. - Egress
  310. # ==========================================
  311. # Pod安全策略
  312. # ==========================================
  313. podSecurityPolicy:
  314. enabled: false
  315. # ==========================================
  316. # RBAC配置
  317. # ==========================================
  318. rbac:
  319. create: true
  320. # 指定已有的ServiceAccount
  321. serviceAccountName: ""
  322. # ==========================================
  323. # 节点亲和性与污点容限
  324. # ==========================================
  325. affinity: {}
  326. tolerations: []
  327. # ==========================================
  328. # 监控和日志
  329. # ==========================================
  330. monitoring:
  331. enabled: false
  332. # Prometheus ServiceMonitor
  333. serviceMonitor:
  334. enabled: false
  335. interval: 30s
  336. logging:
  337. # 日志级别
  338. level: INFO
  339. # 日志输出格式
  340. format: json