Files
ximenchuifeng e3552039d6 feat(gitops): Edge 实例 ADS Router 身份透传(demo/dev 契约同步)
environments/{demo,dev}/edges.yaml 实例条目增 adsRouter 身份:demo=10.200.0.17.1.1 /
demo-2=10.200.0.18.1.1(前 4 字节互异,第 4 位对齐 idWorkerId 便于记忆;publicAddress=
192.168.1.173 为运维占位,同出口=多 Edge 同出口验收场景,YAML 注释已标)。ApplicationSet
values 模板 hasKey 守卫透传 adsRouter 块;实例缺身份时经 chart 渲染守卫显式失败
(no shared default identity)。dev 停用模板契约同步,未启用。远端清单仍由 Edge
SQLite/UI 管理,部署 values 不回写覆盖。渲染证据 hub docs/research/evidence/
2026-10-10-ads-router-impl/W9-*.md
2026-10-11 14:49:19 +08:00

63 lines
2.1 KiB
YAML

apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: mixingx-dev-edges
namespace: argocd
spec:
goTemplate: true
goTemplateOptions:
- missingkey=error
generators:
- matrix:
generators:
- git:
repoURL: https://gitee.com/mixing-tech/mixingx.deploy.git
revision: master
files:
- path: environments/dev/edges.yaml
- list:
elementsYaml: '{{ .edges | toJson }}'
template:
metadata:
name: 'mixingx-dev-edge-{{ .id }}'
spec:
project: default
sources:
- repoURL: https://gitee.com/mixing-tech/mixingx.hub.chart.git
targetRevision: master
path: release-charts/mixingx-edge-unit
helm:
releaseName: 'mixingx-dev-edge-{{ .id }}'
valueFiles:
- $values/environments/dev/image-version.yaml
- $values/environments/dev/edge-common-values.yaml
values: |
site: "{{ .id }}"
idWorkerId: {{ .idWorkerId }}
description: "{{ .description }}"
{{- if hasKey . "nodeLabel" }}
nodeSelector:
mixingx.io/edge-node: "{{ .nodeLabel }}"
{{- end }}
{{- /* ADS Router 逐实例身份透传,契约同 demo(本模板保持停用)。 */ -}}
{{- if hasKey . "adsRouter" }}
adsRouter:
localNetId: "{{ .adsRouter.localNetId }}"
publicAddress: "{{ .adsRouter.publicAddress }}"
{{- if hasKey .adsRouter "clientEndPoint" }}
clientEndPoint: "{{ .adsRouter.clientEndPoint }}"
{{- end }}
{{- if hasKey .adsRouter "externalPort" }}
externalPort: {{ .adsRouter.externalPort }}
{{- end }}
{{- end }}
- repoURL: https://gitee.com/mixing-tech/mixingx.deploy.git
targetRevision: master
ref: values
destination:
server: https://kubernetes.default.svc
namespace: mixingx-dev
syncPolicy:
syncOptions:
- CreateNamespace=true