values.yaml 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379
  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: /actuator/health
  54. port: 8080
  55. initialDelaySeconds: 30
  56. periodSeconds: 10
  57. timeoutSeconds: 5
  58. failureThreshold: 3
  59. readinessProbe:
  60. httpGet:
  61. path: /actuator/health
  62. port: 8080
  63. initialDelaySeconds: 20
  64. periodSeconds: 5
  65. timeoutSeconds: 3
  66. failureThreshold: 3
  67. # 服务配置
  68. # 启动探针 - 给 Java 应用充分的启动时间(5分钟才开始检查)
  69. startupProbe:
  70. tcpSocket:
  71. port: 8080
  72. initialDelaySeconds: 0
  73. periodSeconds: 5
  74. timeoutSeconds: 2
  75. failureThreshold: 120
  76. service:
  77. type: ClusterIP
  78. port: 8080
  79. targetPort: 8080
  80. annotations: {}
  81. # 入口配置
  82. ingress:
  83. enabled: false
  84. className: "nginx"
  85. annotations:
  86. cert-manager.io/cluster-issuer: "letsencrypt-prod"
  87. hosts:
  88. - host: "dev.jxfxtd.com"
  89. paths:
  90. - path: /
  91. pathType: Prefix
  92. tls:
  93. - secretName: gateway-tls
  94. hosts:
  95. - "dev.jxfxtd.com"
  96. # 环境变量
  97. env:
  98. SPRING_CLOUD_CONFIG_ENABLED: "true"
  99. LOGGING_LEVEL_ROOT: "INFO"
  100. # ConfigMap数据
  101. configMap:
  102. application.yml: |
  103. spring:
  104. cloud:
  105. gateway:
  106. routes:
  107. - id: order-service
  108. uri: http://shop-recycle-order-service:8081
  109. predicates:
  110. - Path=/api/order/**
  111. - id: payment-service
  112. uri: http://shop-recycle-payment-service:8082
  113. predicates:
  114. - Path=/api/payment/**
  115. - id: test-order
  116. uri: http://shop-recycle-order-service:8081
  117. predicates:
  118. - Path=/api/test/**
  119. - id: test-payment
  120. uri: http://shop-recycle-payment-service:8082
  121. predicates:
  122. - Path=/api/test/**
  123. management:
  124. endpoints:
  125. web:
  126. exposure:
  127. include: health,info
  128. # ==========================================
  129. # Order Service (订单服务)
  130. # ==========================================
  131. orderService:
  132. enabled: true
  133. replicaCount: 1
  134. image:
  135. name: shop-recycle-order-service
  136. tag: "3.0.6"
  137. port: 8081
  138. containerPort: 8081
  139. protocol: TCP
  140. resources:
  141. requests:
  142. memory: "256Mi"
  143. cpu: "250m"
  144. limits:
  145. memory: "512Mi"
  146. cpu: "500m"
  147. javaOpts: "-Xms256m -Xmx512m -XX:+UseG1GC"
  148. springProfiles: "kubernetes"
  149. livenessProbe:
  150. httpGet:
  151. path: /actuator/health
  152. port: 8081
  153. initialDelaySeconds: 30
  154. periodSeconds: 10
  155. timeoutSeconds: 5
  156. failureThreshold: 3
  157. readinessProbe:
  158. httpGet:
  159. path: /actuator/health
  160. port: 8081
  161. initialDelaySeconds: 20
  162. periodSeconds: 5
  163. timeoutSeconds: 3
  164. failureThreshold: 3
  165. # 启动探针 - 给 Java 应用充分的启动时间(5分钟才开始检查)
  166. startupProbe:
  167. tcpSocket:
  168. port: 8081
  169. initialDelaySeconds: 0
  170. periodSeconds: 5
  171. timeoutSeconds: 2
  172. failureThreshold: 120
  173. service:
  174. type: ClusterIP
  175. port: 8081
  176. targetPort: 8081
  177. annotations: {}
  178. env:
  179. SPRING_CLOUD_CONFIG_ENABLED: "true"
  180. LOGGING_LEVEL_ROOT: "INFO"
  181. # ==========================================
  182. # Payment Service (支付服务)
  183. # ==========================================
  184. paymentService:
  185. enabled: true
  186. replicaCount: 1
  187. image:
  188. name: shop-recycle-payment-service
  189. tag: "3.0.6"
  190. port: 8082
  191. containerPort: 8082
  192. protocol: TCP
  193. resources:
  194. requests:
  195. memory: "256Mi"
  196. cpu: "250m"
  197. limits:
  198. memory: "512Mi"
  199. cpu: "500m"
  200. javaOpts: "-Xms256m -Xmx512m -XX:+UseG1GC"
  201. springProfiles: "kubernetes"
  202. livenessProbe:
  203. httpGet:
  204. path: /actuator/health
  205. port: 8082
  206. initialDelaySeconds: 30
  207. periodSeconds: 10
  208. timeoutSeconds: 5
  209. failureThreshold: 3
  210. readinessProbe:
  211. httpGet:
  212. path: /actuator/health
  213. port: 8082
  214. initialDelaySeconds: 20
  215. periodSeconds: 5
  216. timeoutSeconds: 3
  217. failureThreshold: 3
  218. # 启动探针 - 给 Java 应用充分的启动时间(5分钟才开始检查)
  219. startupProbe:
  220. tcpSocket:
  221. port: 8082
  222. initialDelaySeconds: 0
  223. periodSeconds: 5
  224. timeoutSeconds: 2
  225. failureThreshold: 120
  226. service:
  227. type: ClusterIP
  228. port: 8082
  229. targetPort: 8082
  230. annotations: {}
  231. env:
  232. SPRING_CLOUD_CONFIG_ENABLED: "true"
  233. LOGGING_LEVEL_ROOT: "INFO"
  234. # ==========================================
  235. # Web Frontend (前端应用)
  236. # ==========================================
  237. webFrontend:
  238. enabled: true
  239. replicaCount: 1
  240. image:
  241. name: shop-recycle-web
  242. tag: "3.0.6"
  243. port: 80
  244. containerPort: 80
  245. protocol: TCP
  246. resources:
  247. requests:
  248. memory: "128Mi"
  249. cpu: "100m"
  250. limits:
  251. memory: "256Mi"
  252. cpu: "500m"
  253. livenessProbe:
  254. httpGet:
  255. path: /actuator/health
  256. port: 80
  257. initialDelaySeconds: 10
  258. periodSeconds: 10
  259. timeoutSeconds: 5
  260. failureThreshold: 3
  261. readinessProbe:
  262. httpGet:
  263. path: /
  264. port: 80
  265. initialDelaySeconds: 5
  266. periodSeconds: 5
  267. timeoutSeconds: 3
  268. failureThreshold: 3
  269. service:
  270. type: LoadBalancer
  271. port: 80
  272. targetPort: 80
  273. annotations: {}
  274. ingress:
  275. enabled: true
  276. className: "nginx"
  277. annotations:
  278. cert-manager.io/cluster-issuer: "letsencrypt-prod"
  279. hosts:
  280. - host: "dev.jxfxtd.com"
  281. paths:
  282. - path: /
  283. pathType: Prefix
  284. tls:
  285. - secretName: web-tls
  286. hosts:
  287. - "dev.jxfxtd.com"
  288. env:
  289. VUE_APP_API_BASE: "http://shop-recycle-gateway:8080"
  290. LOGGING_LEVEL: "info"
  291. # ==========================================
  292. # 网络策略
  293. # ==========================================
  294. networkPolicy:
  295. enabled: false
  296. policyTypes:
  297. - Ingress
  298. - Egress
  299. # ==========================================
  300. # Pod安全策略
  301. # ==========================================
  302. podSecurityPolicy:
  303. enabled: false
  304. # ==========================================
  305. # RBAC配置
  306. # ==========================================
  307. rbac:
  308. create: true
  309. # 指定已有的ServiceAccount
  310. serviceAccountName: ""
  311. # ==========================================
  312. # 节点亲和性与污点容限
  313. # ==========================================
  314. affinity: {}
  315. tolerations: []
  316. # ==========================================
  317. # 监控和日志
  318. # ==========================================
  319. monitoring:
  320. enabled: false
  321. # Prometheus ServiceMonitor
  322. serviceMonitor:
  323. enabled: false
  324. interval: 30s
  325. logging:
  326. # 日志级别
  327. level: INFO
  328. # 日志输出格式
  329. format: json