values.yaml 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386
  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. livenessProbe:
  151. httpGet:
  152. path: /health
  153. port: 8081
  154. initialDelaySeconds: 30
  155. periodSeconds: 10
  156. timeoutSeconds: 5
  157. failureThreshold: 3
  158. readinessProbe:
  159. httpGet:
  160. path: /health
  161. port: 8081
  162. initialDelaySeconds: 20
  163. periodSeconds: 5
  164. timeoutSeconds: 3
  165. failureThreshold: 3
  166. # 启动探针 - 给 Java 应用充分的启动时间(5分钟才开始检查)
  167. startupProbe:
  168. httpGet:
  169. path: /health
  170. port: 8081
  171. initialDelaySeconds: 300
  172. periodSeconds: 10
  173. timeoutSeconds: 5
  174. failureThreshold: 60
  175. service:
  176. type: ClusterIP
  177. port: 8081
  178. targetPort: 8081
  179. annotations: {}
  180. env:
  181. SPRING_CLOUD_CONFIG_ENABLED: "true"
  182. LOGGING_LEVEL_ROOT: "INFO"
  183. # ==========================================
  184. # Payment Service (支付服务)
  185. # ==========================================
  186. paymentService:
  187. enabled: true
  188. replicaCount: 1
  189. image:
  190. name: shop-recycle-payment-service
  191. tag: "3.0.6"
  192. port: 8082
  193. containerPort: 8082
  194. protocol: TCP
  195. resources:
  196. requests:
  197. memory: "256Mi"
  198. cpu: "250m"
  199. limits:
  200. memory: "512Mi"
  201. cpu: "500m"
  202. javaOpts: "-Xms256m -Xmx512m -XX:+UseG1GC"
  203. springProfiles: "kubernetes"
  204. livenessProbe:
  205. httpGet:
  206. path: /health
  207. port: 8082
  208. initialDelaySeconds: 30
  209. periodSeconds: 10
  210. timeoutSeconds: 5
  211. failureThreshold: 3
  212. readinessProbe:
  213. httpGet:
  214. path: /health
  215. port: 8082
  216. initialDelaySeconds: 20
  217. periodSeconds: 5
  218. timeoutSeconds: 3
  219. failureThreshold: 3
  220. # 启动探针 - 给 Java 应用充分的启动时间(5分钟才开始检查)
  221. startupProbe:
  222. httpGet:
  223. path: /health
  224. port: 8082
  225. initialDelaySeconds: 300
  226. periodSeconds: 10
  227. timeoutSeconds: 5
  228. failureThreshold: 60
  229. service:
  230. type: ClusterIP
  231. port: 8082
  232. targetPort: 8082
  233. annotations: {}
  234. env:
  235. SPRING_CLOUD_CONFIG_ENABLED: "true"
  236. LOGGING_LEVEL_ROOT: "INFO"
  237. # ==========================================
  238. # Web Frontend (前端应用)
  239. # ==========================================
  240. webFrontend:
  241. enabled: true
  242. replicaCount: 1
  243. image:
  244. name: shop-recycle-web
  245. tag: "3.0.0"
  246. port: 80
  247. containerPort: 80
  248. protocol: TCP
  249. resources:
  250. requests:
  251. memory: "128Mi"
  252. cpu: "100m"
  253. limits:
  254. memory: "256Mi"
  255. cpu: "500m"
  256. livenessProbe:
  257. httpGet:
  258. path: /health
  259. port: 80
  260. initialDelaySeconds: 10
  261. periodSeconds: 10
  262. timeoutSeconds: 5
  263. failureThreshold: 3
  264. readinessProbe:
  265. httpGet:
  266. path: /
  267. port: 80
  268. initialDelaySeconds: 5
  269. periodSeconds: 5
  270. timeoutSeconds: 3
  271. failureThreshold: 3
  272. service:
  273. type: ClusterIP
  274. port: 80
  275. targetPort: 80
  276. annotations: {}
  277. ingress:
  278. enabled: true
  279. className: "nginx"
  280. annotations:
  281. cert-manager.io/cluster-issuer: "letsencrypt-prod"
  282. hosts:
  283. - host: "dev.jxfxtd.com"
  284. paths:
  285. - path: /
  286. pathType: Prefix
  287. tls:
  288. - secretName: web-tls
  289. hosts:
  290. - "dev.jxfxtd.com"
  291. env:
  292. VUE_APP_API_BASE: "http://shop-recycle-gateway:8080"
  293. LOGGING_LEVEL: "info"
  294. # ==========================================
  295. # 网络策略
  296. # ==========================================
  297. networkPolicy:
  298. enabled: false
  299. policyTypes:
  300. - Ingress
  301. - Egress
  302. # ==========================================
  303. # Pod安全策略
  304. # ==========================================
  305. podSecurityPolicy:
  306. enabled: false
  307. # ==========================================
  308. # RBAC配置
  309. # ==========================================
  310. rbac:
  311. create: true
  312. # 指定已有的ServiceAccount
  313. serviceAccountName: ""
  314. # ==========================================
  315. # 节点亲和性与污点容限
  316. # ==========================================
  317. affinity: {}
  318. tolerations: []
  319. # ==========================================
  320. # 监控和日志
  321. # ==========================================
  322. monitoring:
  323. enabled: false
  324. # Prometheus ServiceMonitor
  325. serviceMonitor:
  326. enabled: false
  327. interval: 30s
  328. logging:
  329. # 日志级别
  330. level: INFO
  331. # 日志输出格式
  332. format: json