{{/* 四胞胎实例(agent/edge)— 遍历 values.instances 数组 每个实例生成:后端 Deployment + 前端 Deployment + 独立 postgres StatefulSet(三者 podAffinity 同节点) 加/删点位:只改 values.yaml 的 instances 数组,helm upgrade 自动生效。 */}} {{- range $inst := .Values.instances }} {{- $root := $ }} # ═══ 实例: {{ $inst.name }} ({{ $inst.description }}) ═══ # 1. 后端 {{ include "mixingx.backend" (dict "name" $inst.name "image" $inst.image "role" $inst.role "serviceId" $inst.serviceId "database" $inst.database "description" $inst.description "root" $root) }} # 2. 前端(亲和到后端同节点) {{ include "mixingx.frontend" (dict "name" $inst.webName "image" $inst.webImage "basePath" $inst.webBasePath "affinity" $inst.name "root" $root) }} # 3. 独立 postgres(亲和到后端同节点) {{ include "mixingx.postgres" (dict "name" $inst.name "database" $inst.database "pgStorage" $inst.pgStorage "affinity" true "root" $root) }} {{- end }}