177 lines
6.9 KiB
YAML
177 lines
6.9 KiB
YAML
# ═══════════════════════════════════════════════════════════════
|
||
# MixingX Helm Chart — values
|
||
# 架构:独立 DB + 四胞胎(agent/edge podAffinity) + 共享基础设施
|
||
# ═══════════════════════════════════════════════════════════════
|
||
|
||
# ── 全局 ──
|
||
registry: 192.168.1.105:8888/mixingx
|
||
tag: latest
|
||
|
||
# 时区(部署地域覆盖):中国 Asia/Shanghai,海外按需改如 America/New_York
|
||
# 注入所有容器的 TZ env,覆盖镜像内默认时区(镜像内置 Asia/Shanghai 兜底)
|
||
timezone: Asia/Shanghai
|
||
|
||
# ── 共享基础设施(所有服务连同一个) ──
|
||
sharedInfra:
|
||
postgres: # postgres 连接参数(每个独立 postgres 共用)
|
||
username: postgres
|
||
password: "Admin12345"
|
||
port: 5432
|
||
redis:
|
||
host: redis-service
|
||
port: 6379
|
||
password: "Admin12345"
|
||
rabbitmq:
|
||
host: messaging-service
|
||
port: 5672
|
||
username: guest
|
||
password: guest
|
||
mongo:
|
||
host: mongo-service
|
||
port: 27017
|
||
username: admin
|
||
password: "Admin12345"
|
||
database: mixingx_audit
|
||
otlp:
|
||
endpoint: http://k8s-dashboard-service:18889
|
||
protocol: grpc
|
||
|
||
# ═══════════════════════════════════════════════════════════════
|
||
# 类型 A:点位单元(agent/edge)— Agent 带独立 DB;Edge 带本地配置修订 PVC
|
||
# Agent 实例生成后端、前端与独立 PostgreSQL;Edge 实例仅生成后端与前端。
|
||
# 默认各 1 个,以后按需加(加一行 values + helm upgrade)
|
||
# ═══════════════════════════════════════════════════════════════
|
||
# ═══════════════════════════════════════════════════════════════
|
||
# 点位配置 — 只写名字,模板自动推导其余字段
|
||
# 格式: agents/edges 元素可为字符串(老格式 "0")或对象(新格式 {site, nodeAffinity, nodeName})
|
||
# 生成规则:
|
||
# 后端: {role}-{site} 如 agent-0, agent-beijing
|
||
# 前端: {role}-web-{site} 如 agent-web-0, agent-web-beijing
|
||
# 数据库: 仅 Agent 生成 {role}-db-{site}
|
||
# basePath: /{role}-{site} 如 /agent-0, /agent-beijing
|
||
# ═══════════════════════════════════════════════════════════════
|
||
|
||
agents:
|
||
- "0"
|
||
# - beijing
|
||
# - shanghai
|
||
|
||
edges:
|
||
- "0"
|
||
# - guangzhou
|
||
|
||
# Edge SecretRef { name, key } resolves to <root>/<name>/<key>.
|
||
# Each entry mounts one existing Kubernetes Secret read-only into every Edge unit.
|
||
edgeSecrets:
|
||
root: /var/run/secrets/mixingx-edge
|
||
mounts: []
|
||
# - name: plc-main
|
||
# secretName: edge-plc-main
|
||
|
||
# ═══════════════════════════════════════════════════════════════
|
||
# 节点档位调度(可选)— 按硬件能力把服务分配到相应 node
|
||
# 前提:给集群节点打 label kubectl label node <name> mixingx.io/tier=<infra|perf|edge>
|
||
# infra=基础设施级(最强) perf=性能级(中等) edge=边缘级(最弱)
|
||
# enabled=false 时完全不渲染调度(默认,向后兼容)
|
||
# 点位级覆盖:agents/edges 元素可用对象格式 {site, nodeName?, nodeAffinity?} 覆盖
|
||
# ═══════════════════════════════════════════════════════════════
|
||
tier:
|
||
enabled: false
|
||
nodeLabel: mixingx.io/tier
|
||
services:
|
||
gateway: { mode: required, tiers: [infra] }
|
||
sso: { mode: required, tiers: [infra] }
|
||
ultra: { mode: required, tiers: [infra] }
|
||
audit: { mode: required, tiers: [infra] }
|
||
sharedDatastores: { mode: required, tiers: [infra] }
|
||
agent: { mode: preferred, tiers: [perf, infra] }
|
||
edge: { mode: preferred, tiers: [edge, perf, infra] }
|
||
|
||
# ═══════════════════════════════════════════════════════════════
|
||
# 类型 B:独立不亲和(sso/ultra)— 后端+前端+独立DB,无亲和,多副本
|
||
# 固定数量,不动态添加
|
||
# ═══════════════════════════════════════════════════════════════
|
||
standalones:
|
||
- name: sso
|
||
image: sso
|
||
role: sso
|
||
webName: sso-web
|
||
webImage: sso-web
|
||
webBasePath: /sso/
|
||
serviceId: sso
|
||
database: sso-db
|
||
pgStorage: 10Gi
|
||
description: "统一登录"
|
||
replicas: 2
|
||
affinity: false
|
||
|
||
- name: ultra
|
||
image: ultra
|
||
role: ultra
|
||
webName: ultra-web
|
||
webImage: ultra-web
|
||
webBasePath: /ultra/
|
||
database: ultra-db
|
||
pgStorage: 10Gi
|
||
description: "Ultra 看板"
|
||
replicas: 2
|
||
affinity: false
|
||
|
||
# ═══════════════════════════════════════════════════════════════
|
||
# 类型 C/D:无独立 DB 的服务
|
||
# ═══════════════════════════════════════════════════════════════
|
||
gateway:
|
||
image: gateway
|
||
port: 8080
|
||
replicas: 2
|
||
rbac: true # serviceAccountName: gateway-sa
|
||
|
||
audit:
|
||
enabled: true
|
||
image: audit
|
||
port: 5600
|
||
replicas: 2
|
||
|
||
# ── 共享数据层(非 postgres) ──
|
||
sharedDatastores:
|
||
- name: redis
|
||
image: docker.io/library/redis:8.6
|
||
port: 6379
|
||
storage: 2Gi
|
||
mountPath: /data
|
||
- name: mongo
|
||
image: docker.io/library/mongo:8.3
|
||
port: 27017
|
||
storage: 5Gi
|
||
mountPath: /data/db
|
||
- name: messaging
|
||
image: docker.io/library/rabbitmq:4.3-management
|
||
port: 5672
|
||
storage: 2Gi
|
||
mountPath: /var/lib/rabbitmq
|
||
|
||
# ── 协议模拟器(测试环境) ──
|
||
mocks:
|
||
- name: opcua-peripheral
|
||
image: opcua
|
||
port: 25006
|
||
scene: /scenes/opcua/peripheral-plc.json
|
||
- name: opcua-trimming
|
||
image: opcua
|
||
port: 25008
|
||
scene: /scenes/opcua/trimming-machine.json
|
||
- name: opcua-meter
|
||
image: opcua
|
||
port: 25010
|
||
scene: /scenes/opcua/meter.json
|
||
- name: s7-diecast
|
||
image: s7-diecast
|
||
port: 11021
|
||
|
||
# ── Ingress ──
|
||
ingress:
|
||
enabled: true
|
||
domain: app.mixingx.local
|
||
gatewayService: gateway-service # 所有流量 → gateway,由 gateway 动态路由
|
||
gatewayPort: 8080
|