values.yaml 7.5 KB

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