values.yaml 7.4 KB

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