| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396 |
- # ==========================================
- # Helm Values - shop-recycle
- # 全局配置(所有环境共享)
- # ==========================================
- # 全局配置
- global:
- # 镜像仓库认证(若启用,Helm 自动生成 imagePullSecret)
- registry:
- createSecret: true # 设为 false 则不创建 secret,使用已有的
- username: "admin" # harbor.stardance 用户名
- password: "Harbor12345" # harbor.stardance 密码
- email: "ops@example.com"
-
- # 若 registry.createSecret=false,则指定已有的 secret 名称
- imagePullSecrets: []
- # - name: reg-cred
-
- # 副本数
- replicaCount: 1
- # 镜像配置
- image:
- registry: harbor.stardance
- namespace: shoprecycle
- pullPolicy: IfNotPresent
- tag: "3.0.0"
- # tag由Jenkins Pipeline动态注入(--set image.tag=xxx)
- # 环境名称(由Pipeline动态注入)
- environment: dev
- # ==========================================
- # Gateway (API网关)
- # ==========================================
- gateway:
- enabled: true
- replicaCount: 1
-
- image:
- name: shop-recycle-gateway
- tag: "3.0.6"
-
- port: 8080
- containerPort: 8080
- protocol: TCP
-
- resources:
- requests:
- memory: "256Mi"
- cpu: "250m"
- limits:
- memory: "512Mi"
- cpu: "500m"
-
- # JVM参数
- javaOpts: "-Xms256m -Xmx512m -XX:+UseG1GC"
-
- # Spring Profiles
- springProfiles: "kubernetes"
-
- # 健康检查
- livenessProbe:
- httpGet:
- path: /health
- port: 8080
- initialDelaySeconds: 30
- periodSeconds: 10
- timeoutSeconds: 5
- failureThreshold: 3
-
- readinessProbe:
- httpGet:
- path: /health
- port: 8080
- initialDelaySeconds: 20
- periodSeconds: 5
- timeoutSeconds: 3
- failureThreshold: 3
-
- # 服务配置
- # 启动探针 - 给 Java 应用充分的启动时间(5分钟才开始检查)
- startupProbe:
- httpGet:
- path: /health
- port: 8080
- initialDelaySeconds: 300
- periodSeconds: 10
- timeoutSeconds: 5
- failureThreshold: 60
- service:
- type: ClusterIP
- port: 8080
- targetPort: 8080
- annotations: {}
-
- # 入口配置
- ingress:
- enabled: false
- className: "nginx"
- annotations:
- cert-manager.io/cluster-issuer: "letsencrypt-prod"
- hosts:
- - host: "dev.jxfxtd.com"
- paths:
- - path: /
- pathType: Prefix
- tls:
- - secretName: gateway-tls
- hosts:
- - "dev.jxfxtd.com"
-
- # 环境变量
- env:
- SPRING_CLOUD_CONFIG_ENABLED: "true"
- LOGGING_LEVEL_ROOT: "INFO"
-
- # ConfigMap数据
- configMap:
- application.yml: |
- spring:
- cloud:
- gateway:
- routes:
- - id: order-service
- uri: http://shop-recycle-order-service:8081
- predicates:
- - Path=/api/order/**
- - id: payment-service
- uri: http://shop-recycle-payment-service:8082
- predicates:
- - Path=/api/payment/**
- - id: test-order
- uri: http://shop-recycle-order-service:8081
- predicates:
- - Path=/api/test/**
- - id: test-payment
- uri: http://shop-recycle-payment-service:8082
- predicates:
- - Path=/api/test/**
- management:
- endpoints:
- web:
- exposure:
- include: health,info
- # ==========================================
- # Order Service (订单服务)
- # ==========================================
- orderService:
- enabled: true
- replicaCount: 1
-
- image:
- name: shop-recycle-order-service
- tag: "3.0.6"
-
- port: 8081
- containerPort: 8081
- protocol: TCP
-
- resources:
- requests:
- memory: "256Mi"
- cpu: "250m"
- limits:
- memory: "512Mi"
- cpu: "500m"
-
- javaOpts: "-Xms256m -Xmx512m -XX:+UseG1GC"
- springProfiles: "kubernetes"
- # 环境变量
- env:
- SPRING_CONFIG_LOCATION: "file:///etc/config/application.yml"
- SPRING_MAIN_WEB_APPLICATION_TYPE: "reactive"
-
- livenessProbe:
- httpGet:
- path: /health
- port: 8081
- initialDelaySeconds: 30
- periodSeconds: 10
- timeoutSeconds: 5
- failureThreshold: 3
-
- readinessProbe:
- httpGet:
- path: /health
- port: 8081
- initialDelaySeconds: 20
- periodSeconds: 5
- timeoutSeconds: 3
- failureThreshold: 3
-
- # 启动探针 - 给 Java 应用充分的启动时间(5分钟才开始检查)
- startupProbe:
- httpGet:
- path: /health
- port: 8081
- initialDelaySeconds: 300
- periodSeconds: 10
- timeoutSeconds: 5
- failureThreshold: 60
- service:
- type: ClusterIP
- port: 8081
- targetPort: 8081
- annotations: {}
-
- env:
- SPRING_CLOUD_CONFIG_ENABLED: "true"
- LOGGING_LEVEL_ROOT: "INFO"
- # ==========================================
- # Payment Service (支付服务)
- # ==========================================
- paymentService:
- enabled: true
- replicaCount: 1
-
- image:
- name: shop-recycle-payment-service
- tag: "3.0.6"
-
- port: 8082
- containerPort: 8082
- protocol: TCP
-
- resources:
- requests:
- memory: "256Mi"
- cpu: "250m"
- limits:
- memory: "512Mi"
- cpu: "500m"
-
- javaOpts: "-Xms256m -Xmx512m -XX:+UseG1GC"
- springProfiles: "kubernetes"
- # 环境变量
- env:
- SPRING_CONFIG_LOCATION: "file:///etc/config/application.yml"
- SPRING_MAIN_WEB_APPLICATION_TYPE: "reactive"
-
- livenessProbe:
- httpGet:
- path: /health
- port: 8082
- initialDelaySeconds: 30
- periodSeconds: 10
- timeoutSeconds: 5
- failureThreshold: 3
-
- readinessProbe:
- httpGet:
- path: /health
- port: 8082
- initialDelaySeconds: 20
- periodSeconds: 5
- timeoutSeconds: 3
- failureThreshold: 3
- # 启动探针 - 给 Java 应用充分的启动时间(5分钟才开始检查)
- startupProbe:
- httpGet:
- path: /health
- port: 8082
- initialDelaySeconds: 300
- periodSeconds: 10
- timeoutSeconds: 5
- failureThreshold: 60
-
- service:
- type: ClusterIP
- port: 8082
- targetPort: 8082
- annotations: {}
-
- env:
- SPRING_CLOUD_CONFIG_ENABLED: "true"
- LOGGING_LEVEL_ROOT: "INFO"
- # ==========================================
- # Web Frontend (前端应用)
- # ==========================================
- webFrontend:
- enabled: true
- replicaCount: 1
-
- image:
- name: shop-recycle-web
- tag: "3.0.0"
-
- port: 80
- containerPort: 80
- protocol: TCP
-
- resources:
- requests:
- memory: "128Mi"
- cpu: "100m"
- limits:
- memory: "256Mi"
- cpu: "500m"
-
- livenessProbe:
- httpGet:
- path: /health
- port: 80
- initialDelaySeconds: 10
- periodSeconds: 10
- timeoutSeconds: 5
- failureThreshold: 3
-
- readinessProbe:
- httpGet:
- path: /
- port: 80
- initialDelaySeconds: 5
- periodSeconds: 5
- timeoutSeconds: 3
- failureThreshold: 3
-
- service:
- type: ClusterIP
- port: 80
- targetPort: 80
- annotations: {}
-
- ingress:
- enabled: true
- className: "nginx"
- annotations:
- cert-manager.io/cluster-issuer: "letsencrypt-prod"
- hosts:
- - host: "dev.jxfxtd.com"
- paths:
- - path: /
- pathType: Prefix
- tls:
- - secretName: web-tls
- hosts:
- - "dev.jxfxtd.com"
-
- env:
- VUE_APP_API_BASE: "http://shop-recycle-gateway:8080"
- LOGGING_LEVEL: "info"
- # ==========================================
- # 网络策略
- # ==========================================
- networkPolicy:
- enabled: false
- policyTypes:
- - Ingress
- - Egress
- # ==========================================
- # Pod安全策略
- # ==========================================
- podSecurityPolicy:
- enabled: false
- # ==========================================
- # RBAC配置
- # ==========================================
- rbac:
- create: true
- # 指定已有的ServiceAccount
- serviceAccountName: ""
- # ==========================================
- # 节点亲和性与污点容限
- # ==========================================
- affinity: {}
- tolerations: []
- # ==========================================
- # 监控和日志
- # ==========================================
- monitoring:
- enabled: false
- # Prometheus ServiceMonitor
- serviceMonitor:
- enabled: false
- interval: 30s
- logging:
- # 日志级别
- level: INFO
- # 日志输出格式
- format: json
|