Compare commits

..
Author SHA1 Message Date
王野 d86e9eab9c release: bump chart version to v1.0.91 2026-11-10 14:52:07 +08:00
王野 88ebfd30e1 fix(helm): start PostgreSQL without gosu on K3s 2026-11-10 14:52:07 +08:00
drone 60356c55aa release: bump chart version to v1.0.90 2026-11-03 02:07:13 +00:00
drone 68bccfc092 release: bump chart version to v1.0.89 2026-11-03 01:54:41 +00:00
薛佳帆 e031d656a0 release: bump chart version to v1.0.88 2026-10-30 03:45:53 +00:00
薛佳帆 347180d77b release: bump chart version to v1.0.87 2026-10-30 03:42:15 +00:00
王野 9fdb306601 release: bump chart version to v1.0.86 2026-10-28 07:40:28 +00:00
王野 c3e295494d release: bump chart version to v1.0.85 2026-10-28 02:22:28 +00:00
liulingyun 17a186a9df merge: origin/master(v1.0.84) → master(errorRetentionMonths 同步主线) 2026-10-27 14:32:48 +08:00
薛佳帆 321b602905 release: bump chart version to v1.0.84 2026-10-27 06:24:59 +00:00
liulingyun a1da3f4e42 feat(audit): audit chart 新增 errorRetentionMonths——错误流水独立保留期透传
(openspec 变更 edge-agent-error-audit-retention;配套后端 AUDIT_ERROR_RETENTION_MONTHS)

- values.yaml: audit.errorRetentionMonths 默认 3(操作流水 retentionMonths=6 不变)
- templates/audit.yaml: deployment 透传 AUDIT_ERROR_RETENTION_MONTHS

注: 版本号 bump 随发布流程另行执行。
2026-10-26 15:39:36 +08:00
薛佳帆 8733595824 release: bump chart version to v1.0.83 2026-10-26 05:29:55 +00:00
薛佳帆 ff5ecf710e release: bump chart version to v1.0.82 2026-10-23 01:18:36 +00:00
薛佳帆 c2b78f8ff0 release: bump chart version to v1.0.81 2026-10-23 01:17:47 +00:00
薛佳帆 b0e1dcd4f0 release: bump chart version to v1.0.80 2026-10-23 00:57:04 +00:00
薛佳帆 e7f4b71cd0 release: bump chart version to v1.0.79 2026-10-22 05:10:33 +00:00
薛佳帆 4bcf4fe0a3 release: bump chart version to v1.0.78 2026-10-22 02:44:25 +00:00
薛佳帆 33de837556 release: bump chart version to v1.0.77 2026-10-22 01:36:57 +00:00
薛佳帆 b1d65fab30 release: bump chart version to v1.0.76 2026-10-22 01:35:03 +00:00
王野 25a9385751 release: bump chart version to v1.0.75 2026-10-16 09:00:53 +00:00
王野 0c8effe321 release: bump chart version to v1.0.74 2026-10-16 06:44:35 +00:00
ximenchuifeng 0aeb301be5 release: bump chart version to v1.0.73 2026-10-14 08:51:32 +00:00
ximenchuifeng 2892f80bd1 release: bump chart version to v1.0.72 2026-10-14 08:07:35 +00:00
ximenchuifeng 2b3bcbcfa8 release: bump chart version to v1.0.71 2026-10-14 04:58:12 +00:00
ximenchuifeng cd3635643b release: bump chart version to v1.0.70 2026-10-13 08:09:51 +00:00
ximenchuifeng 326236b5e6 release: bump chart version to v1.0.69 2026-10-13 08:09:09 +00:00
薛佳帆 133c032144 release: bump chart version to v1.0.68 2026-10-13 05:46:43 +00:00
ximenchuifeng 373c020fc4 release: bump chart version to v1.0.67 2026-10-12 07:25:11 +00:00
ximenchuifeng 5d54a3ef92 release: bump chart version to v1.0.66 2026-10-12 05:16:20 +00:00
ximenchuifeng ff458a86be release: bump chart version to v1.0.65 2026-10-12 02:13:08 +00:00
王野 3345c257c4 release: bump chart version to v1.0.64 2026-10-11 08:49:15 +00:00
ximenchuifeng 869cc95c8b release: bump chart version to v1.0.63 2026-10-11 08:39:48 +00:00
ximenchuifeng 58ae4560a7 release: bump chart version to v1.0.62 2026-10-11 07:22:08 +00:00
ximenchuifeng 6dd26e9549 release: bump chart version to v1.0.61(含 ADS Router 显式身份参数) 2026-10-11 14:49:03 +08:00
ximenchuifeng c39195c610 feat(edge-unit): ADS Router 部署参数——显式身份注入+缺身份渲染拒绝
adsRouter values 块:enabled 缺省 true(每 Edge 出厂自带本地 Router);localNetId/
publicAddress 必填(启用时)——缺任一即 {{ fail }} 拒绝渲染,不用共同默认身份兜底
(身份必须显式分配且重启保持,绝不运行时从 Pod IP 推导);clientEndPoint/externalPort
可选(缺省 127.0.0.1:48898/48898,Pod 独立网络命名空间自洽)。unit.yaml 注入
Ads__Router__* env(ClientEndPoint/ExternalPort 空则省略)。README 补值文档与示例。
渲染证据:demo 两实例(不同 NetId/正确 publicAddress)exit=0+缺身份负例 fail+enabled=false
零 Ads env;见 hub docs/research/evidence/2026-10-10-ads-router-impl/W9-*.md
2026-10-11 14:48:55 +08:00
ximenchuifeng 52622e8fea release: bump chart version to v1.0.60 2026-10-10 07:12:20 +00:00
ximenchuifeng 9cb242aff8 release: bump chart version to v1.0.59 2026-10-10 05:16:12 +00:00
ximenchuifeng 77a743cd6c release: bump chart version to v1.0.58 2026-10-10 03:05:31 +00:00
ximenchuifeng 443ada9f4a release: bump chart version to v1.0.57 2026-10-10 01:47:44 +00:00
王野 d0c054acc8 release: bump chart version to v1.0.56 2026-10-10 01:35:02 +00:00
ximenchuifeng 0e5bd063cc release: bump chart version to v1.0.55 2026-10-09 11:20:37 +00:00
ximenchuifeng ec7a42ccc5 release: bump chart version to v1.0.54 2026-10-09 10:39:09 +00:00
ximenchuifeng 5f70e78927 release: bump chart version to v1.0.53 2026-10-09 09:42:25 +00:00
ximenchuifeng bac3af555e release: bump chart version to v1.0.52 2026-10-09 09:39:56 +00:00
ximenchuifeng e16a64439b feat(gateway): ingress domain 留空渲染无 host 规则——现场 PC 可直接用节点 IP 访问(如 http://192.168.137.117/),不留空时行为不变;values 注释说明缺省域名与留空语义 2026-10-09 10:23:22 +08:00
王野 673ac6aa6f release: bump chart version to v1.0.51 2026-09-30 07:26:06 +00:00
薛佳帆 7bd4d58a6d release: bump chart version to v1.0.50 2026-09-29 11:19:27 +00:00
ximenchuifeng 7944c98fdb release: bump chart version to v1.0.49 2026-09-29 07:52:24 +00:00
ximenchuifeng 50b47a556a feat: 新增 mixingx-codeserver chart——浏览器版 VS Code 测试 IDE(code-server 4.139.1 锁版镜像,预装 GitLens/EditorConfig/Prettier/C#/OPC UA Browser;工作区 PVC keep;Recreate 单副本;traefik ingress) 2026-09-29 15:14:14 +08:00
薛佳帆 60c8b4d90e release: bump chart version to v1.0.48 2026-09-29 05:37:56 +00:00
薛佳帆 22fd52f20f release: bump chart version to v1.0.47 2026-09-29 03:08:53 +00:00
薛佳帆 7d1bc2d90c release: bump chart version to v1.0.46 2026-09-29 02:33:26 +00:00
薛佳帆 ada89158fa release: bump chart version to v1.0.45 2026-09-29 02:32:30 +00:00
薛佳帆 c3f27ee62b Revert "feat(agent-unit): 特征值预警 Redis 近端窗口开关 env(FeatureValueWarningCache__*,AgentUnit 默认取单元名)"
This reverts commit b8659270e6.
2026-09-29 09:24:43 +08:00
薛佳帆 b8659270e6 feat(agent-unit): 特征值预警 Redis 近端窗口开关 env(FeatureValueWarningCache__*,AgentUnit 默认取单元名) 2026-09-29 09:06:59 +08:00
王野 bd0f20af0b release: bump chart version to v1.0.44 2026-09-28 07:11:28 +00:00
王野 ef0e2b5ce1 release: bump chart version to v1.0.43 2026-09-28 05:44:36 +00:00
ximenchuifeng e6ada86374 release: bump chart version to v1.0.42 2026-09-24 06:39:09 +00:00
ximenchuifeng 33908b6955 release: bump chart version to v1.0.41 2026-09-24 03:22:55 +00:00
ximenchuifeng f623c56853 release: bump chart version to v1.0.40 2026-09-24 02:57:06 +00:00
ximenchuifeng 1a1847ba7e release: bump chart version to v1.0.39 2026-09-24 02:04:52 +00:00
薛佳帆 c698fe14cc release: bump chart version to v1.0.38 2026-09-23 07:15:32 +00:00
薛佳帆 ee378168c0 release: bump chart version to v1.0.37 2026-09-23 01:56:11 +00:00
薛佳帆 41ccb587a9 release: bump chart version to v1.0.36 2026-09-23 01:55:39 +00:00
王野 84ddff1776 release: bump chart version to v1.0.35 2026-09-22 01:47:43 +00:00
王野 02583981cb release: bump chart version to v1.0.34 2026-09-22 01:46:49 +00:00
薛佳帆 bfec34fc70 release: bump chart version to v1.0.33 2026-09-21 11:32:03 +00:00
薛佳帆 b42271b704 release: bump chart version to v1.0.32 2026-09-21 11:30:49 +00:00
王野 3decc0f1a2 release: bump chart version to v1.0.31 2026-09-21 08:49:40 +00:00
王野 3bc2c6a1b4 release: bump chart version to v1.0.30 2026-09-21 06:35:25 +00:00
王野 1632267279 release: bump chart version to v1.0.29 2026-09-21 06:32:55 +00:00
薛佳帆 51123401a1 release: bump chart version to v1.0.28 2026-09-20 08:28:10 +00:00
王野 04e0105b91 release: bump chart version to v1.0.27 2026-09-20 02:37:24 +00:00
ximenchuifeng 3c5dff3857 release: bump chart version to v1.0.26 2026-09-18 05:49:34 +00:00
ximenchuifeng cf0cf6080f release: bump chart version to v1.0.25 2026-09-18 05:42:39 +00:00
薛佳帆 e5bf7090b4 release: bump chart version to v1.0.24 2026-09-17 09:00:20 +00:00
ximenchuifeng 943b045cad release: bump chart version to v1.0.23 2026-09-15 10:51:15 +00:00
薛佳帆 e988974374 release: bump chart version to v1.0.22 2026-09-15 09:54:26 +00:00
ximenchuifeng 224afb71f1 release: bump chart version to v1.0.21 2026-09-15 09:36:52 +00:00
王野 981be3e23f release: bump chart version to v1.0.20 2026-09-15 08:01:20 +00:00
薛佳帆 4613388d0c chore: 删除 provision/rollback-host 迁移脚本——主机已全面由 NM 托管且 networkd 已 mask,迁移工具不再需要;rollback 依赖 networkd 接管原配置,mask 状态下执行反而会导致接口失联 2026-09-15 10:09:17 +08:00
ximenchuifeng 2ba8f83f2e release: bump chart version to v1.0.19 2026-09-14 09:52:19 +00:00
ximenchuifeng 0ece6b12b2 release: bump chart version to v1.0.18 2026-09-14 07:00:23 +00:00
薛佳帆 b6c35f28e3 feat(network-agent): headless Service 打 mixingx.io/role=node-id 标签 —— 纳入 Gateway K8s 服务发现,生成 /api/network/** 透传路由;注释说明前端弹窗改经 Gateway 同源转发 2026-09-14 14:37:08 +08:00
mx-ops d4b84bb886 fix(network-agent): daemonset 补渲染 imagePullSecrets
ACR 私仓交付后 DaemonSet 无拉取凭据,匿名拉取报 insufficient_scope。
对齐其余 10 个 chart 的标准写法,消费 _common/registry.yaml 提供的 imagePullSecrets。
2026-09-10 08:43:57 +00:00
薛佳帆 05a476d932 feat: provision 写入 NM keep-configuration=no——禁止开机收编 initramfs(dracut 遗留 DHCP)抢配的连接,强制按 autoconnect-priority 选路激活静态档案;initrd 的 DHCP 租约以副地址共存(双 IP:静态主+DHCP 副兜底);rollback 对称移除 2026-09-10 16:21:42 +08:00
薛佳帆 9035f9eb96 release: bump chart version to v1.0.17 2026-09-10 08:02:26 +00:00
薛佳帆 869754606e release: bump chart version to v1.0.16 2026-09-10 08:01:59 +00:00
薛佳帆 405eef034a feat(network-agent): 挂载宿主机状态目录 /var/lib/mixingx/network-agent(DirectoryOrCreate)——网卡别名 aliases.json 持久化,节点重启/Pod 重建均保留;chart 1.0.16 2026-09-10 09:47:34 +08:00
王野 9b3a61eb49 release: bump chart version to v1.0.15 2026-09-08 11:25:07 +00:00
ximenchuifeng 322411955e release: bump chart version to v1.0.14 2026-09-08 11:08:11 +00:00
ximenchuifeng 4716a40c3a release: bump chart version to v1.0.13 2026-09-08 11:06:21 +00:00
ximenchuifeng 9ab9b5c97e release: bump chart version to v1.0.12 2026-09-08 11:05:17 +00:00
王野 6707dbe28f release: bump chart version to v1.0.11 2026-09-08 10:57:34 +00:00
ximenchuifeng 8b70d43953 release: bump chart version to v1.0.10 2026-09-08 10:48:09 +00:00
ximenchuifeng 70c85011db release: bump chart version to v1.0.9 2026-09-08 10:28:34 +00:00
王野 34e108dbbc release: bump chart version to v1.0.8 2026-09-08 10:05:38 +00:00
薛佳帆 4395e900e9 refactor(network-agent): 移除 NET_ADMIN capability 与 nm-run 挂载——agent 已无 ip addr del 等网络写操作(切静态清残留动态地址逻辑删除,networkd 将在宿主机 mask),特权动作全部经 D-Bus 由主机 NM 执行;/run/NetworkManager 源码未使用一并移除;chart 1.0.7 2026-09-08 16:20:53 +08:00
ximenchuifeng 0aea949b49 release: bump chart version to v1.0.7 2026-09-08 08:07:59 +00:00
王野 798735a0a8 release: bump chart version to v1.0.6 2026-09-08 07:16:08 +00:00
ximenchuifeng 5e9b92f507 release: bump chart version to v1.0.5 2026-09-08 07:02:59 +00:00
ximenchuifeng b21fb1ac92 release: bump chart version to v1.0.4 2026-09-08 06:58:41 +00:00
ximenchuifeng f2e6683a44 release: bump chart version to v1.0.3 2026-09-08 04:55:52 +00:00
ximenchuifeng c4f962d120 release: bump chart version to v1.0.2 2026-09-08 04:53:47 +00:00
薛佳帆 352aa78a8f Merge branch 'develop/v.1.0.1' 2026-09-07 15:48:19 +08:00
薛佳帆 0c105e5224 fix(network-agent): 容器加 NET_ADMIN 能力——agent 清除切换静态后残留的动态地址需要 ip addr del,默认能力集无此权限被静默拒绝 2026-09-07 15:48:16 +08:00
薛佳帆 e5f1ba44c8 Merge branch 'develop/v.1.0.1' 2026-09-07 09:40:13 +08:00
薛佳帆 f0f67afbcb fix(scripts): provision-host 修复——DNS 仅收集 IPv4(原版塞入 IPv6 地址被 nmcli 拒绝导致 set-e 中止);保留原 netplan 配置仅切全局 renderer(原版删配置导致 WiFi 机器断网失联,netplan 自动渲染等值 NM profile 含 SSID/PSK);WiFi 主口跳过 rescue-dhcp 2026-09-07 09:40:10 +08:00
王野 4e517797e1 feat(mixingx-agent-unit): 简化PostgreSQL配置并移除角色预置逻辑
- 将PostgreSQL配置简化为单一用户名和密码模式,移除了管理员用户和应用用户的分离机制
- 移除了复杂的PostgreSQL角色预置SQL文件和相关的initContainer逻辑
- 直接通过连接字符串设置idle_in_transaction_session_timeout参数
- 更新版本号从1.0.2到1.0.3
- 移除了对预创建PostgreSQL凭证Secret的依赖
2026-09-05 15:18:59 +08:00
王野 5bc1b52721 Merge branch 'develop/v.1.0.1'
# Conflicts:
#	release-charts/mixingx-agent-unit/Chart.yaml
#	release-charts/mixingx-agent-unit/templates/unit.yaml
2026-09-04 22:37:59 +08:00
王野 b357808e99 feat(agent-unit): provision dedicated PostgreSQL runtime role 2026-09-04 22:36:19 +08:00
薛佳帆 90d8838e15 Merge branch 'develop/v.1.0.1' 2026-09-04 17:24:13 +08:00
薛佳帆 bcc5e0d4d0 fix(network-agent): 容器加 apparmor=unconfined 注解——Ubuntu dbus-daemon 的 AppArmor 仲裁拦截容器内 nmcli 的 D-Bus 调用(AccessDenied) 2026-09-04 17:24:10 +08:00
薛佳帆 2e7d079f65 Merge branch 'develop/v.1.0.1' 2026-09-04 15:39:35 +08:00
薛佳帆 da7762b0cf feat(network-agent): 新增 mixingx-network-agent chart——DaemonSet(hostNetwork:9750,root 仅挂载 dbus socket,非 privileged)+ Headless 诊断 Service 2026-09-04 14:56:09 +08:00
薛佳帆 61edf87116 feat(scripts): network-agent 主机初始化脚本——装 NM 并等值静态连接切换 netplan renderer(不断网),rescue-dhcp 低优先级兜底,rfkill 解锁无线与 polkit 放行,附 rollback 反向脚本 2026-09-04 14:56:09 +08:00
ximenchuifeng a567579ab2 chore(delivery): busybox/alpine 修正为 ACR 实存 tag 并标 optional(2026-08-38 实盘盘点) 2026-08-22 15:06:18 +08:00
ximenchuifeng 3433a6d945 chore(delivery): mqttx-web 已推 ACR 2026-08-22 14:44:05 +08:00
38 changed files with 598 additions and 29 deletions

No files matched your search

+16
View File
@@ -35,6 +35,22 @@ helm template ci-edge release-charts/mixingx-edge-unit
`mixingx-deploy` 的 ApplicationSet 按 unit chart 逐个发布,每个 edge/agent 一个独立 Helm release。详见 `mixingx-deploy/`。 `mixingx-deploy` 的 ApplicationSet 按 unit chart 逐个发布,每个 edge/agent 一个独立 Helm release。详见 `mixingx-deploy/`。
## PostgreSQL on K3s
PostgreSQL StatefulSets use the Debian image's UID/GID 999 and run the image
entrypoint directly. This skips gosu while preserving database initialization
and startup on the existing data volume. The readiness probe uses
`pg_isready` over TCP so the container is Ready only after PostgreSQL accepts
connections, including after recovery.
Only the PostgreSQL container uses `privileged: true` as a temporary workaround
for checkpoint signal failures observed on affected Ubuntu 26.04 / K3s nodes.
The namespace's admission policy must permit privileged containers. The
[containerd signal-denial report](https://github.com/containerd/containerd/issues/14485)
describes the same checkpoint error with AppArmor. Check the host kernel log
for an AppArmor signal denial and validate initialization and recovery with the
corrected runtime or profile before removing privileged mode.
## 关联文档 ## 关联文档
- hub [AGENTS.md](https://gitee.com/mixing-tech/mixingx.hub) — 全项目指南 - hub [AGENTS.md](https://gitee.com/mixing-tech/mixingx.hub) — 全项目指南
+4 -4
View File
@@ -15,9 +15,9 @@ thirdParty:
- { upstream: docker.io/library/rabbitmq:4.3-management, acr: library/rabbitmq:4.3-management, pushed: true } - { upstream: docker.io/library/rabbitmq:4.3-management, acr: library/rabbitmq:4.3-management, pushed: true }
# ── edge 单元 + audit broker 硬依赖 ── # ── edge 单元 + audit broker 硬依赖 ──
- { upstream: docker.io/emqx/nanomq:0.25.2-2, acr: library/nanomq:0.25.2-2, pushed: true } # D2 已补推(2026-08-22) - { upstream: docker.io/emqx/nanomq:0.25.2-2, acr: library/nanomq:0.25.2-2, pushed: true } # D2 已补推(2026-08-22)
# ── 工具类 ── # ── 工具类(现场无组件直接依赖,备查;tag 以 ACR 实存为准,2026-08-22 盘点) ──
- { upstream: docker.io/library/busybox:latest, acr: library/busybox:latest, pushed: true } - { upstream: docker.io/library/busybox:1.36, acr: library/busybox:1.36, pushed: true, optional: true }
- { upstream: docker.io/library/alpine:3, acr: library/alpine:3, pushed: true } - { upstream: docker.io/library/alpine:3.19, acr: library/alpine:3.19, pushed: true, optional: true }
# ── 可选(客户默认不部署) ── # ── 可选(客户默认不部署) ──
- { upstream: docker.io/emqx/mqttx-web:latest, acr: library/mqttx-web:latest, pushed: false, optional: true } - { upstream: docker.io/emqx/mqttx-web:latest, acr: library/mqttx-web:latest, pushed: true, optional: true } # mxlexus 已部署(2026-08-22)
- { upstream: docker.io/library/mongo:7.0, acr: library/mongo:7.0, pushed: true, optional: true } # v2 audit 已去 mongo,存量备用 - { upstream: docker.io/library/mongo:7.0, acr: library/mongo:7.0, pushed: true, optional: true } # v2 audit 已去 mongo,存量备用
+1
View File
@@ -10,6 +10,7 @@ This directory contains the release-oriented charts for Phase 1 ownership split:
- `mixingx-edge-unit`: one edge site release. - `mixingx-edge-unit`: one edge site release.
- `mixingx-agent-unit`: one agent site release. - `mixingx-agent-unit`: one agent site release.
- `mixingx-protocol-server-unit`: one protocol mock server instance. - `mixingx-protocol-server-unit`: one protocol mock server instance.
- `mixingx-codeserver`: browser VS Code test IDE (code-server, plugins bundled in image).
- `mixingx-platform`: **legacy** central-services chart, kept for compatibility during migration. - `mixingx-platform`: **legacy** central-services chart, kept for compatibility during migration.
The chart at the repository root is kept as a legacy all-in-one chart during migration. The chart at the repository root is kept as a legacy all-in-one chart during migration.
+2 -2
View File
@@ -2,5 +2,5 @@ apiVersion: v2
name: mixingx-agent-unit name: mixingx-agent-unit
description: "One MixingX agent unit release: agent backend, agent web, and agent PostgreSQL." description: "One MixingX agent unit release: agent backend, agent web, and agent PostgreSQL."
type: application type: application
version: 1.0.1 version: 1.0.91
appVersion: "1.0.1" appVersion: "1.0.91"
@@ -6,6 +6,12 @@ Deploys one agent site as one Helm release:
- `agent-web-<site>` frontend - `agent-web-<site>` frontend
- `agent-<site>-postgres` StatefulSet and retained PVC - `agent-<site>-postgres` StatefulSet and retained PVC
Agent PostgreSQL sessions set `idle_in_transaction_session_timeout` through the
connection string. The default is `60s`, configurable with
`sharedInfra.postgres.idleInTransactionSessionTimeout`. This is a database-side
safety net for leaked idle transactions and does not change database users,
passwords, roles, or the PostgreSQL StatefulSet credential model.
Example: Example:
```bash ```bash
@@ -103,7 +103,7 @@ stringData:
ConnectionStrings__redis: "{{ .Values.sharedInfra.redis.host }}:{{ .Values.sharedInfra.redis.port }},password={{ .Values.sharedInfra.redis.password }}" ConnectionStrings__redis: "{{ .Values.sharedInfra.redis.host }}:{{ .Values.sharedInfra.redis.port }},password={{ .Values.sharedInfra.redis.password }}"
REDIS_PASSWORD: "{{ .Values.sharedInfra.redis.password }}" REDIS_PASSWORD: "{{ .Values.sharedInfra.redis.password }}"
REDIS_URI: "redis://:{{ .Values.sharedInfra.redis.password }}@{{ .Values.sharedInfra.redis.host }}:{{ .Values.sharedInfra.redis.port }}" REDIS_URI: "redis://:{{ .Values.sharedInfra.redis.password }}@{{ .Values.sharedInfra.redis.host }}:{{ .Values.sharedInfra.redis.port }}"
ConnectionStrings__PostgreSQL: "Host={{ $pgHost }};Port={{ .Values.sharedInfra.postgres.port }};Username={{ .Values.sharedInfra.postgres.username }};Password={{ .Values.sharedInfra.postgres.password }};Database={{ $database }}" ConnectionStrings__PostgreSQL: "Host={{ $pgHost }};Port={{ .Values.sharedInfra.postgres.port }};Username={{ .Values.sharedInfra.postgres.username }};Password={{ .Values.sharedInfra.postgres.password }};Database={{ $database }};Options=-c idle_in_transaction_session_timeout={{ .Values.sharedInfra.postgres.idleInTransactionSessionTimeout }}"
POSTGRESQL_PASSWORD: "{{ .Values.sharedInfra.postgres.password }}" POSTGRESQL_PASSWORD: "{{ .Values.sharedInfra.postgres.password }}"
POSTGRESQL_URI: "postgresql://{{ .Values.sharedInfra.postgres.username }}:{{ .Values.sharedInfra.postgres.password }}@{{ $pgHost }}:{{ .Values.sharedInfra.postgres.port }}/{{ $database }}" POSTGRESQL_URI: "postgresql://{{ .Values.sharedInfra.postgres.username }}:{{ .Values.sharedInfra.postgres.password }}@{{ $pgHost }}:{{ .Values.sharedInfra.postgres.port }}/{{ $database }}"
POSTGRESQL_DATABASENAME: "{{ $database }}" POSTGRESQL_DATABASENAME: "{{ $database }}"
@@ -207,6 +207,11 @@ spec:
labels: labels:
app.kubernetes.io/component: {{ $name }}-postgres app.kubernetes.io/component: {{ $name }}-postgres
spec: spec:
securityContext:
# Run the image entrypoint as postgres so it does not invoke gosu.
runAsUser: 999
runAsGroup: 999
fsGroup: 999
{{ include "mixingx-unit.followerScheduling" . | nindent 6 }} {{ include "mixingx-unit.followerScheduling" . | nindent 6 }}
{{- with $.Values.imagePullSecrets }} {{- with $.Values.imagePullSecrets }}
imagePullSecrets: imagePullSecrets:
@@ -216,6 +221,10 @@ spec:
- name: postgres - name: postgres
image: {{ .Values.images.postgres.repository }}:{{ .Values.images.postgres.tag | default "latest" }} image: {{ .Values.images.postgres.repository }}:{{ .Values.images.postgres.tag | default "latest" }}
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
command: ["docker-entrypoint.sh", "postgres"]
securityContext:
# Temporary compatibility workaround for checkpoint signal failures on affected k3s nodes.
privileged: true
env: env:
- name: POSTGRES_PASSWORD - name: POSTGRES_PASSWORD
value: "{{ .Values.sharedInfra.postgres.password }}" value: "{{ .Values.sharedInfra.postgres.password }}"
@@ -229,6 +238,15 @@ spec:
- name: tcp - name: tcp
containerPort: {{ .Values.ports.postgres }} containerPort: {{ .Values.ports.postgres }}
protocol: TCP protocol: TCP
readinessProbe:
exec:
command:
- sh
- -ec
- >-
exec pg_isready -q -h 127.0.0.1 -p {{ .Values.ports.postgres }} -U "$POSTGRES_USER" -d "$POSTGRES_DB"
periodSeconds: 5
timeoutSeconds: 3
volumeMounts: volumeMounts:
- name: data - name: data
mountPath: /var/lib/postgresql/data mountPath: /var/lib/postgresql/data
@@ -48,6 +48,7 @@ sharedInfra:
username: postgres username: postgres
password: "Admin12345" password: "Admin12345"
port: 5432 port: 5432
idleInTransactionSessionTimeout: 60s
redis: redis:
host: redis-service host: redis-service
port: 6379 port: 6379
+2 -2
View File
@@ -2,5 +2,5 @@ apiVersion: v2
name: mixingx-audit name: mixingx-audit
description: MixingX audit service. description: MixingX audit service.
type: application type: application
version: 1.0.1 version: 1.0.91
appVersion: "1.0.1" appVersion: "1.0.91"
@@ -31,6 +31,11 @@ spec:
labels: labels:
app.kubernetes.io/component: {{ .Values.audit.database }}-postgres app.kubernetes.io/component: {{ .Values.audit.database }}-postgres
spec: spec:
securityContext:
# Run the image entrypoint as postgres so it does not invoke gosu.
runAsUser: 999
runAsGroup: 999
fsGroup: 999
{{ include "mixingx-audit.tierAffinity" (dict "role" "audit" "root" $root) | nindent 6 }} {{ include "mixingx-audit.tierAffinity" (dict "role" "audit" "root" $root) | nindent 6 }}
{{- with $.Values.imagePullSecrets }} {{- with $.Values.imagePullSecrets }}
imagePullSecrets: imagePullSecrets:
@@ -40,6 +45,10 @@ spec:
- name: postgres - name: postgres
image: {{ $root.Values.sharedInfra.postgres.image | default "docker.io/library/postgres:17" }} image: {{ $root.Values.sharedInfra.postgres.image | default "docker.io/library/postgres:17" }}
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
command: ["docker-entrypoint.sh", "postgres"]
securityContext:
# Temporary compatibility workaround for checkpoint signal failures on affected k3s nodes.
privileged: true
env: env:
- name: POSTGRES_PASSWORD - name: POSTGRES_PASSWORD
value: "{{ $root.Values.sharedInfra.postgres.password }}" value: "{{ $root.Values.sharedInfra.postgres.password }}"
@@ -53,6 +62,15 @@ spec:
- name: tcp - name: tcp
containerPort: {{ $root.Values.sharedInfra.postgres.port }} containerPort: {{ $root.Values.sharedInfra.postgres.port }}
protocol: TCP protocol: TCP
readinessProbe:
exec:
command:
- sh
- -ec
- >-
exec pg_isready -q -h 127.0.0.1 -p {{ $root.Values.sharedInfra.postgres.port }} -U "$POSTGRES_USER" -d "$POSTGRES_DB"
periodSeconds: 5
timeoutSeconds: 3
volumeMounts: volumeMounts:
- name: data - name: data
mountPath: /var/lib/postgresql/data mountPath: /var/lib/postgresql/data
@@ -46,9 +46,12 @@ spec:
key: AUDIT_PG_URI key: AUDIT_PG_URI
- name: AUDIT_PG_TIMEZONE - name: AUDIT_PG_TIMEZONE
value: "{{ $root.Values.timezone | default "Asia/Shanghai" }}" value: "{{ $root.Values.timezone | default "Asia/Shanghai" }}"
# 数据保留月数(按自然月清理分区) # 数据保留月数(按自然月清理分区;operations 表)
- name: AUDIT_RETENTION_MONTHS - name: AUDIT_RETENTION_MONTHS
value: "{{ .Values.audit.retentionMonths | default 6 }}" value: "{{ .Values.audit.retentionMonths | default 6 }}"
# 错误流水独立保留月数(errors 表,分表独立清除)
- name: AUDIT_ERROR_RETENTION_MONTHS
value: "{{ .Values.audit.errorRetentionMonths | default 3 }}"
# MQTT broker # MQTT broker
- name: AUDIT_MQTT_BROKER_URL - name: AUDIT_MQTT_BROKER_URL
value: "mqtt://{{ .Values.audit.mqtt.brokerHost }}:{{ .Values.audit.mqtt.brokerPort }}" value: "mqtt://{{ .Values.audit.mqtt.brokerHost }}:{{ .Values.audit.mqtt.brokerPort }}"
+3 -1
View File
@@ -24,8 +24,10 @@ audit:
replicas: 2 replicas: 2
database: audit-db database: audit-db
pgStorage: 5Gi pgStorage: 5Gi
# 数据保留月数,按完整自然月清理分区(后端 AUDIT_RETENTION_MONTHS) # 操作流水(audit_operations)保留月数,按完整自然月清理分区(后端 AUDIT_RETENTION_MONTHS)
retentionMonths: 6 retentionMonths: 6
# 错误流水(audit_errors)独立保留月数(后端 AUDIT_ERROR_RETENTION_MONTHS,2026-10-26 裁决:分表独立)
errorRetentionMonths: 3
# JWT 鉴权:后端通过 SSO /api/sso/users/info 间接校验 token,这里配置 SSO base URL # JWT 鉴权:后端通过 SSO /api/sso/users/info 间接校验 token,这里配置 SSO base URL
jwt: jwt:
ssoBaseUrl: "http://sso-service:8080" ssoBaseUrl: "http://sso-service:8080"
@@ -0,0 +1,6 @@
apiVersion: v2
name: mixingx-codeserver
description: MixingX code-server — 浏览器版 VS Code 测试 IDE,预装 GitLens/EditorConfig/Prettier/C#/OPC UA Browser 插件。
type: application
version: 1.0.91
appVersion: "1.0.91"
@@ -0,0 +1,12 @@
# mixingx-codeserver
浏览器版 VS Code 测试 IDE(code-server),供各环境在浏览器里临时查看/排查代码。
预装插件随镜像(mixingx/codeserver,mxcicd 构建,基镜像 coder/code-server:4.139.1 锁版):
GitLens 19.2.0 / EditorConfig 0.18.2 / Prettier 12.4.0 / C#(muhammad-sammy 分支 2.145.21,linux-x64)/
.NET Runtime 3.2.0 / OPC UA Browser 1.2.4(微软市场 side-load,MIT)。
- 登录:密码认证,密码在各环境 values `codeserver.password`(明文,家规同 postgres/redis)。
- 持久化:工作区 `/home/coder/project` 落 PVC `<name>-data`(`storage.keep=true`,卸载不回收);
插件/设置烧在镜像层(不落盘,升级镜像即整体更新)。
- 入口:traefik ingress(`*.mixingx.local` DNS 环境),无 DNS 现场改 NodePort(参考 mqttx 注释)。
- 注意:单副本 + RWO 盘,Deployment 策略 Recreate;traefik 原生支持 WebSocket,无需额外注解。
@@ -0,0 +1,13 @@
{{/*
组件名(默认 codeserver,可被 values 覆盖)。
*/}}
{{- define "mixingx-codeserver.name" -}}
{{- .Values.codeserver.name | default "codeserver" -}}
{{- end -}}
{{/*
Secret 数据(登录密码);Deployment 用它的 sha256 做滚动重启锚点。
*/}}
{{- define "mixingx-codeserver.secretData" -}}
PASSWORD: {{ .Values.codeserver.password | default "changeme" | quote }}
{{- end -}}
@@ -0,0 +1,127 @@
{{- $root := . }}
{{- $name := include "mixingx-codeserver.name" . }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ $name }}-secrets
labels:
app.kubernetes.io/name: mixingx
app.kubernetes.io/instance: {{ $root.Release.Name }}
app.kubernetes.io/component: {{ $name }}
type: Opaque
stringData:
{{- include "mixingx-codeserver.secretData" . | nindent 2 }}
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ $name }}-data
{{- if .Values.storage.keep }}
annotations:
helm.sh/resource-policy: keep
{{- end }}
labels:
app.kubernetes.io/name: mixingx
app.kubernetes.io/instance: {{ $root.Release.Name }}
app.kubernetes.io/component: {{ $name }}
spec:
accessModes:
- ReadWriteOnce
storageClassName: {{ .Values.storage.className | default "local-path" }}
resources:
requests:
storage: {{ .Values.storage.size | default "5Gi" }}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ $name }}-deployment
labels:
app.kubernetes.io/name: mixingx
app.kubernetes.io/instance: {{ $root.Release.Name }}
app.kubernetes.io/component: {{ $name }}
spec:
# RWO 工作区数据盘 + 单副本:滚动更新会新旧 Pod 争盘,必须 Recreate
strategy:
type: Recreate
replicas: {{ .Values.codeserver.replicas | default 1 }}
selector:
matchLabels:
app.kubernetes.io/component: {{ $name }}
template:
metadata:
labels:
app.kubernetes.io/component: {{ $name }}
annotations:
# 密码变更 → 校验和变化 → 滚动重启生效
checksum/secret: {{ include "mixingx-codeserver.secretData" . | sha256sum }}
spec:
{{- with $.Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
securityContext:
# 镜像内置用户 coder(uid/gid 1000);fsGroup 使 local-path 数据盘归属 coder
runAsUser: 1000
runAsGroup: 1000
fsGroup: 1000
containers:
- name: {{ $name }}
image: "{{ .Values.codeserver.image.repository }}:{{ .Values.codeserver.image.tag | default "latest" }}"
imagePullPolicy: IfNotPresent
args:
- --auth=password
- --bind-addr=0.0.0.0:8080
- /home/coder/project
ports:
- name: http
containerPort: 8080
protocol: TCP
env:
- name: TZ
value: "{{ $root.Values.timezone | default "Asia/Shanghai" }}"
envFrom:
- secretRef:
name: {{ $name }}-secrets
volumeMounts:
- name: data
mountPath: /home/coder/project
resources:
{{- toYaml .Values.resources | nindent 12 }}
# code-server 未认证 GET / 返回 302(跳登录页),httpGet 判活有歧义,统一 TCP 探针
livenessProbe:
tcpSocket:
port: http
initialDelaySeconds: 15
periodSeconds: 30
readinessProbe:
tcpSocket:
port: http
initialDelaySeconds: 5
periodSeconds: 10
volumes:
- name: data
persistentVolumeClaim:
claimName: {{ $name }}-data
---
apiVersion: v1
kind: Service
metadata:
name: {{ $name }}-service
labels:
app.kubernetes.io/name: mixingx
app.kubernetes.io/component: {{ $name }}
mixingx.io/role: codeserver
mixingx.io/node-id: {{ $name }}
annotations:
mixingx.io/description: {{ .Values.codeserver.description | quote }}
spec:
type: ClusterIP
selector:
app.kubernetes.io/component: {{ $name }}
ports:
- name: http
port: 80
targetPort: http
protocol: TCP
@@ -0,0 +1,25 @@
{{- $name := include "mixingx-codeserver.name" . }}
{{- if .Values.ingress.enabled }}
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ $name }}-ingress
annotations:
{{- range $k, $v := .Values.ingress.annotations }}
{{ $k }}: {{ $v | quote }}
{{- end }}
spec:
ingressClassName: {{ .Values.ingress.className }}
rules:
- host: {{ .Values.ingress.host }}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ $name }}-service
port:
number: 80
{{- end }}
@@ -0,0 +1,40 @@
# code-server(web VS Code)测试版:预装插件随镜像(GitLens/EditorConfig/Prettier/C# 分支/OPC UA Browser)。
# 用途:各环境浏览器内 IDE,临时查看/排查代码;不是开发主力环境。
# 镜像:mixingx/codeserver(mxcicd 构建,基镜像 coder/code-server:4.139.1 锁版,不走 image-version.yaml 的 images 机制)。
# 密码:values 明文(家规同 postgres/redis);登录 http://<ingress host>。
timezone: Asia/Shanghai
# 客户环境由 environments/_common 注入 imagePullSecrets(ADR-66 编号见各仓引用);内网留空=匿名拉取,行为不变
imagePullSecrets: []
codeserver:
name: codeserver
replicas: 1
image:
repository: 192.168.1.119:8888/mixingx/codeserver
tag: v0.1.0
description: "浏览器版 VS Code(测试)"
# 登录密码(各环境 values 必须覆盖;changeme 仅保证 helm template 默认值可渲染)
password: "changeme"
storage:
# 工作区(/home/coder/project)数据盘;keep=true 时 helm uninstall/down 不回收
className: local-path
size: 5Gi
keep: true
resources:
requests:
memory: 512Mi
cpu: 200m
limits:
memory: 2Gi
cpu: "2"
ingress:
enabled: true
className: traefik
host: codeserver.mixingx.local
annotations:
traefik.ingress.kubernetes.io/router.entrypoints: web
+2 -2
View File
@@ -2,5 +2,5 @@ apiVersion: v2
name: mixingx-edge-unit name: mixingx-edge-unit
description: "One MixingX edge unit release with durable local revision storage." description: "One MixingX edge unit release with durable local revision storage."
type: application type: application
version: 1.0.1 version: 1.0.91
appVersion: "1.0.1" appVersion: "1.0.91"
+21 -1
View File
@@ -14,5 +14,25 @@ helm upgrade --install mixingx-edge-workshop-a ./charts/mixingx-edge-unit \
--set site=workshop-a \ --set site=workshop-a \
--set nodeName=edge-node-01 \ --set nodeName=edge-node-01 \
--set storage.className=longhorn \ --set storage.className=longhorn \
--set tag=2026.07.02-abc1234 --set tag=2026.07.02-abc1234 \
--set adsRouter.localNetId=10.200.0.17.1.1 \
--set adsRouter.publicAddress=192.168.1.173
``` ```
## ADS Router(本地 AMS Router)
每个 Edge 默认随包启用本地 ADS Router(`adsRouter.enabled: true`),身份只接受显式部署注入,
没有任何共享默认兜底:`enabled=true` 时 `adsRouter.localNetId` 与 `adsRouter.publicAddress`
必填,缺失/留空会使 helm 渲染(及 ArgoCD 同步)直接失败。NetId 显式分配、重启不变,
运行时绝不从 Pod IP 推导;同 AMS 通信范围内各实例 NetId 前 4 字节必须互异,建议 `.1.1` 结尾。
| Value | 缺省 | 说明 |
|---|---|---|
| `adsRouter.enabled` | `true` | `false` 时不注入任何 `Ads__Router__*` env,Edge 侧本地 Router 禁用(routerState=disabled) |
| `adsRouter.localNetId` | `""`(必填) | 本方固定 AMS NetId,如 `10.200.0.17.1.1` |
| `adsRouter.publicAddress` | `""`(必填) | 对外登记地址,PLC 回程拨入,原样写入登记报文 ComputerName |
| `adsRouter.clientEndPoint` | `""` | 可选;`ip:port`,留空不注入 env(应用缺省 `127.0.0.1:48898`,SDK 本地客户端入口=回环通道绑定端点) |
| `adsRouter.externalPort` | `48898` | 可选;外部 TCP 监听==远端拨号端口(SDK 同一字段不可分离);置 0 不注入 env |
注入 env:`Ads__Router__LocalNetId`、`Ads__Router__PublicAddress`(恒注入),
`Ads__Router__ClientEndPoint`、`Ads__Router__ExternalPort`(仅值非空时注入)。
@@ -3,6 +3,10 @@
{{- $serviceId := include "mixingx-unit.serviceId" . -}} {{- $serviceId := include "mixingx-unit.serviceId" . -}}
{{- $basePath := include "mixingx-unit.basePath" . -}} {{- $basePath := include "mixingx-unit.basePath" . -}}
{{- $brokerSvcName := include "mixingx-unit.mqttBrokerServiceName" . -}} {{- $brokerSvcName := include "mixingx-unit.mqttBrokerServiceName" . -}}
{{- /* ADS Router 身份强制:启用即必须显式给身份,禁止共享默认兜底(空/缺失=渲染失败)。 */ -}}
{{- if and .Values.adsRouter.enabled (or (not .Values.adsRouter.localNetId) (not .Values.adsRouter.publicAddress)) }}
{{- fail "adsRouter.enabled=true requires explicit adsRouter.localNetId and adsRouter.publicAddress (no shared default identity)" }}
{{- end }}
apiVersion: v1 apiVersion: v1
kind: PersistentVolumeClaim kind: PersistentVolumeClaim
metadata: metadata:
@@ -87,6 +91,21 @@ spec:
value: {{ required "idWorkerId is required for an Edge unit" .Values.idWorkerId | quote }} value: {{ required "idWorkerId is required for an Edge unit" .Values.idWorkerId | quote }}
- name: EdgeSecrets__Root - name: EdgeSecrets__Root
value: {{ .Values.edgeSecrets.root | quote }} value: {{ .Values.edgeSecrets.root | quote }}
{{- /* ADS Router 身份注入:必填两项恒注入;可选两项留空/置 0 则省略(应用侧缺省生效)。 */ -}}
{{- if .Values.adsRouter.enabled }}
- name: Ads__Router__LocalNetId
value: {{ .Values.adsRouter.localNetId | quote }}
- name: Ads__Router__PublicAddress
value: {{ .Values.adsRouter.publicAddress | quote }}
{{- with .Values.adsRouter.clientEndPoint }}
- name: Ads__Router__ClientEndPoint
value: {{ . | quote }}
{{- end }}
{{- with .Values.adsRouter.externalPort }}
- name: Ads__Router__ExternalPort
value: "{{ . }}"
{{- end }}
{{- end }}
volumeMounts: volumeMounts:
- name: edge-data - name: edge-data
mountPath: /var/lib/mixingx-edge mountPath: /var/lib/mixingx-edge
@@ -41,6 +41,16 @@ edgeSecrets:
nodeName: "" nodeName: ""
nodeSelector: {} nodeSelector: {}
# ADS Router 本地路由身份(契约 docs/research/2026-10-10-ads-router-impl/CONTRACT.md §2.1):
# 身份只接受显式部署注入,重启保持,运行时绝不从 Pod IP 推导,无共享默认兜底。
# enabled=true 时 localNetId/publicAddress 必填,缺失或留空 → helm 渲染明确失败(fail)。
adsRouter:
enabled: true
localNetId: "" # 本方固定 AMS NetId,如 "10.200.0.17.1.1";同 AMS 通信范围前 4 字节互异,建议 .1.1 结尾
publicAddress: "" # 对外登记地址(PLC 回程拨入的地址串,原样入登记报文 ComputerName)
clientEndPoint: "" # 可选;"ip:port",缺省 127.0.0.1:48898(SDK 本地客户端入口=回环通道绑定端点),留空不注入 env
externalPort: 48898 # 可选;外部 TCP 监听==远端拨号端口(SDK 同一字段不可分离),置 0 不注入 env
# Audit 事件发布(ADR-0048/0049):指向中心 Audit Broker。 # Audit 事件发布(ADR-0048/0049):指向中心 Audit Broker。
# enabled=false 时服务内 AuditMqttPublisher 退化为 NoOp,不发审计事件。 # enabled=false 时服务内 AuditMqttPublisher 退化为 NoOp,不发审计事件。
# instanceId/nodeId 默认取单元名(role-site,如 edge-demo)。 # instanceId/nodeId 默认取单元名(role-site,如 edge-demo)。
+2 -2
View File
@@ -2,5 +2,5 @@ apiVersion: v2
name: mixingx-gateway name: mixingx-gateway
description: MixingX gateway service, RBAC, and root ingress. description: MixingX gateway service, RBAC, and root ingress.
type: application type: application
version: 1.0.1 version: 1.0.91
appVersion: "1.0.1" appVersion: "1.0.91"
@@ -9,7 +9,9 @@ metadata:
spec: spec:
ingressClassName: traefik ingressClassName: traefik
rules: rules:
- host: {{ .Values.ingress.domain }} - {{- if .Values.ingress.domain }}
host: {{ .Values.ingress.domain }}
{{- end }}
http: http:
paths: paths:
- path: / - path: /
@@ -34,6 +34,7 @@ gateway:
ingress: ingress:
enabled: true enabled: true
# domain 留空 = 渲染不带 host 的规则,现场 PC 可直接用节点 IP 访问(如 http://192.168.137.117/)
domain: app.mixingx.local domain: app.mixingx.local
gatewayService: gateway-service gatewayService: gateway-service
gatewayPort: 8080 gatewayPort: 8080
+2 -2
View File
@@ -2,5 +2,5 @@ apiVersion: v2
name: mixingx-infra name: mixingx-infra
description: MixingX shared infrastructure services (Redis, MongoDB, RabbitMQ). description: MixingX shared infrastructure services (Redis, MongoDB, RabbitMQ).
type: application type: application
version: 1.0.1 version: 1.0.91
appVersion: "1.0.1" appVersion: "1.0.91"
+2 -2
View File
@@ -2,5 +2,5 @@ apiVersion: v2
name: mixingx-mqttx name: mixingx-mqttx
description: MixingX MQTTX Web — 浏览器端 MQTT 客户端,用于监控/调试各 Edge 的 NanoMQ broker。 description: MixingX MQTTX Web — 浏览器端 MQTT 客户端,用于监控/调试各 Edge 的 NanoMQ broker。
type: application type: application
version: 1.0.1 version: 1.0.91
appVersion: "1.0.1" appVersion: "1.0.91"
@@ -0,0 +1,6 @@
apiVersion: v2
name: mixingx-network-agent
description: "MixingX network console agent: 每节点常驻,提供主机网口(IP/掩码/网关/DNS)与 WiFi 的可视化配置 API。"
type: application
version: 1.0.91
appVersion: "1.0.91"
@@ -0,0 +1,95 @@
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: network-agent
labels:
app.kubernetes.io/name: mixingx
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: network-agent
spec:
selector:
matchLabels:
app.kubernetes.io/component: network-agent
template:
metadata:
labels:
app.kubernetes.io/component: network-agent
annotations:
# 容器内 nmcli 通过 D-Bus 操作主机 NetworkManager,
# 需要 unconfined 才能通过 dbus-daemon 的 AppArmor 仲裁
container.apparmor.security.beta.kubernetes.io/network-agent: unconfined
spec:
# hostNetwork: IP 变更后 agent 在新 IP 上继续存活,负责回滚与 k3s 自愈;
# 前端弹窗直连 http://<节点IP>:9750 即命中该节点的 agent
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
{{- if .Values.nodeName }}
nodeName: {{ .Values.nodeName }}
{{- else if .Values.nodeSelector }}
nodeSelector:
{{ toYaml .Values.nodeSelector | indent 8 }}
{{- end }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: network-agent
image: {{ .Values.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag | default "latest" }}
imagePullPolicy: IfNotPresent
ports:
- name: http
containerPort: {{ .Values.ports.http }}
protocol: TCP
env:
- name: TZ
value: {{ .Values.timezone | default "Asia/Shanghai" | quote }}
- name: ASPNETCORE_URLS
value: "http://0.0.0.0:{{ .Values.ports.http }}"
- name: AUTH_TOKEN
value: {{ .Values.authToken | quote }}
- name: CORS_ORIGINS
value: {{ .Values.corsOrigins | quote }}
- name: ROLLBACK_TIMEOUT_SECONDS
value: {{ .Values.rollbackTimeoutSeconds | quote }}
- name: K3S_RESTART_ON_IP_CHANGE
value: {{ .Values.k3sRestartOnIpChange | quote }}
securityContext:
# 只需 root + D-Bus socket,无需 privileged 与额外 capability:
# nmcli 经 D-Bus 操作主机 NM,特权动作(改 IP/路由)全部由 NM 进程执行
runAsUser: 0
allowPrivilegeEscalation: false
livenessProbe:
httpGet:
path: /api/network/health
port: {{ .Values.ports.http }}
initialDelaySeconds: 15
periodSeconds: 30
timeoutSeconds: 5
failureThreshold: 6
readinessProbe:
httpGet:
path: /api/network/health
port: {{ .Values.ports.http }}
initialDelaySeconds: 5
periodSeconds: 15
timeoutSeconds: 5
failureThreshold: 6
resources:
{{ toYaml .Values.resources | indent 12 }}
volumeMounts:
# 主机 system bus: nmcli 与 systemd 重启都走它
- name: dbus
mountPath: /run/dbus/system_bus_socket
# 网卡别名持久化: aliases.json 落宿主机,重启/重建 Pod 均保留
- name: alias-store
mountPath: /var/lib/mixingx/network-agent
volumes:
- name: dbus
hostPath:
path: /run/dbus/system_bus_socket
type: Socket
- name: alias-store
hostPath:
path: /var/lib/mixingx/network-agent
type: DirectoryOrCreate
@@ -0,0 +1,22 @@
# Headless 诊断服务: DNS network-agent 返回各节点 agent 的全部地址。
# 注意: 每个 agent 只管理自己所在节点,不要用普通 ClusterIP Service 访问
# (会在节点间随机负载均衡导致操作到错误的主机)。前端弹窗始终直连节点 IP。
# mixingx.io/role 标签让 Gateway 发现该服务并生成 /api/network/** 透传路由,
# 前端网络设置弹窗经 Gateway 同源转发访问(消除跨域)。
apiVersion: v1
kind: Service
metadata:
name: network-agent
labels:
app.kubernetes.io/name: mixingx
app.kubernetes.io/component: network-agent
mixingx.io/role: network-agent
mixingx.io/node-id: network-agent
spec:
clusterIP: None
selector:
app.kubernetes.io/component: network-agent
ports:
- name: http
port: {{ .Values.ports.http }}
targetPort: http
@@ -0,0 +1,34 @@
registry: 192.168.1.105:8888/mixingx
timezone: Asia/Shanghai
image:
repository: network-agent
tag: latest
ports:
http: 9750
# 鉴权令牌:为空则不启用(仅限内网联调);生产环境必须配置,
# 前端弹窗请求头 Authorization: Bearer <token>
authToken: ""
# 前端弹窗的跨域来源,逗号分隔;* = 任意(联调)
corsOrigins: "*"
# 改静态 IP 后未确认自动回滚的窗口(秒)
rollbackTimeoutSeconds: 60
# 确认 IP 变更后自动重启本机 k3s/k3s-agent(flannel 重绑新 IP)
k3sRestartOnIpChange: true
# 只在指定节点部署(为空 = 每个节点一个,推荐)
nodeName: ""
nodeSelector: {}
resources:
requests:
cpu: 50m
memory: 128Mi
limits:
cpu: 500m
memory: 256Mi
+2 -2
View File
@@ -2,5 +2,5 @@ apiVersion: v2
name: mixingx-platform name: mixingx-platform
description: MixingX central platform services without customer edge/agent instances. description: MixingX central platform services without customer edge/agent instances.
type: application type: application
version: 1.0.1 version: 1.0.91
appVersion: "1.0.1" appVersion: "1.0.91"
@@ -231,6 +231,11 @@ spec:
labels: labels:
app.kubernetes.io/component: {{ .name }}-postgres app.kubernetes.io/component: {{ .name }}-postgres
spec: spec:
securityContext:
# Run the image entrypoint as postgres so it does not invoke gosu.
runAsUser: 999
runAsGroup: 999
fsGroup: 999
{{ include "mixingx-platform.tierAffinity" (dict "role" .tierRole "root" $root) | nindent 6 }} {{ include "mixingx-platform.tierAffinity" (dict "role" .tierRole "root" $root) | nindent 6 }}
{{- with $root.Values.imagePullSecrets }} {{- with $root.Values.imagePullSecrets }}
imagePullSecrets: imagePullSecrets:
@@ -240,6 +245,10 @@ spec:
- name: postgres - name: postgres
image: {{ $root.Values.sharedInfra.postgres.image | default "docker.io/library/postgres:17" }} image: {{ $root.Values.sharedInfra.postgres.image | default "docker.io/library/postgres:17" }}
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
command: ["docker-entrypoint.sh", "postgres"]
securityContext:
# Temporary compatibility workaround for checkpoint signal failures on affected k3s nodes.
privileged: true
env: env:
- name: POSTGRES_PASSWORD - name: POSTGRES_PASSWORD
value: "{{ $root.Values.sharedInfra.postgres.password }}" value: "{{ $root.Values.sharedInfra.postgres.password }}"
@@ -253,6 +262,15 @@ spec:
- name: tcp - name: tcp
containerPort: {{ $root.Values.sharedInfra.postgres.port }} containerPort: {{ $root.Values.sharedInfra.postgres.port }}
protocol: TCP protocol: TCP
readinessProbe:
exec:
command:
- sh
- -ec
- >-
exec pg_isready -q -h 127.0.0.1 -p {{ $root.Values.sharedInfra.postgres.port }} -U "$POSTGRES_USER" -d "$POSTGRES_DB"
periodSeconds: 5
timeoutSeconds: 3
volumeMounts: volumeMounts:
- name: data - name: data
mountPath: /var/lib/postgresql/data mountPath: /var/lib/postgresql/data
@@ -213,6 +213,11 @@ spec:
labels: labels:
app.kubernetes.io/component: {{ .Values.audit.database }}-postgres app.kubernetes.io/component: {{ .Values.audit.database }}-postgres
spec: spec:
securityContext:
# Run the image entrypoint as postgres so it does not invoke gosu.
runAsUser: 999
runAsGroup: 999
fsGroup: 999
{{ include "mixingx-platform.tierAffinity" (dict "role" "audit" "root" $root) | nindent 6 }} {{ include "mixingx-platform.tierAffinity" (dict "role" "audit" "root" $root) | nindent 6 }}
{{- with $.Values.imagePullSecrets }} {{- with $.Values.imagePullSecrets }}
imagePullSecrets: imagePullSecrets:
@@ -222,6 +227,10 @@ spec:
- name: postgres - name: postgres
image: {{ $root.Values.sharedInfra.postgres.image | default "docker.io/library/postgres:17" }} image: {{ $root.Values.sharedInfra.postgres.image | default "docker.io/library/postgres:17" }}
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
command: ["docker-entrypoint.sh", "postgres"]
securityContext:
# Temporary compatibility workaround for checkpoint signal failures on affected k3s nodes.
privileged: true
env: env:
- name: POSTGRES_PASSWORD - name: POSTGRES_PASSWORD
value: "{{ $root.Values.sharedInfra.postgres.password }}" value: "{{ $root.Values.sharedInfra.postgres.password }}"
@@ -235,6 +244,15 @@ spec:
- name: tcp - name: tcp
containerPort: {{ $root.Values.sharedInfra.postgres.port }} containerPort: {{ $root.Values.sharedInfra.postgres.port }}
protocol: TCP protocol: TCP
readinessProbe:
exec:
command:
- sh
- -ec
- >-
exec pg_isready -q -h 127.0.0.1 -p {{ $root.Values.sharedInfra.postgres.port }} -U "$POSTGRES_USER" -d "$POSTGRES_DB"
periodSeconds: 5
timeoutSeconds: 3
volumeMounts: volumeMounts:
- name: data - name: data
mountPath: /var/lib/postgresql/data mountPath: /var/lib/postgresql/data
@@ -2,5 +2,5 @@ apiVersion: v2
name: mixingx-protocol-server-unit name: mixingx-protocol-server-unit
description: Deploy one MixingX edge protocol test server instance. description: Deploy one MixingX edge protocol test server instance.
type: application type: application
version: 1.0.1 version: 1.0.91
appVersion: "1.0.1" appVersion: "1.0.91"
+2 -2
View File
@@ -2,5 +2,5 @@ apiVersion: v2
name: mixingx-sso name: mixingx-sso
description: MixingX SSO standalone release (backend, web, and PostgreSQL). description: MixingX SSO standalone release (backend, web, and PostgreSQL).
type: application type: application
version: 1.0.1 version: 1.0.91
appVersion: "1.0.1" appVersion: "1.0.91"
@@ -197,6 +197,11 @@ spec:
labels: labels:
app.kubernetes.io/component: {{ $name }}-postgres app.kubernetes.io/component: {{ $name }}-postgres
spec: spec:
securityContext:
# Run the image entrypoint as postgres so it does not invoke gosu.
runAsUser: 999
runAsGroup: 999
fsGroup: 999
{{ include "mixingx-sso.tierAffinity" (dict "role" $role "root" $root) | nindent 6 }} {{ include "mixingx-sso.tierAffinity" (dict "role" $role "root" $root) | nindent 6 }}
{{- with $.Values.imagePullSecrets }} {{- with $.Values.imagePullSecrets }}
imagePullSecrets: imagePullSecrets:
@@ -206,6 +211,10 @@ spec:
- name: postgres - name: postgres
image: {{ $root.Values.sharedInfra.postgres.image | default "docker.io/library/postgres:17" }} image: {{ $root.Values.sharedInfra.postgres.image | default "docker.io/library/postgres:17" }}
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
command: ["docker-entrypoint.sh", "postgres"]
securityContext:
# Temporary compatibility workaround for checkpoint signal failures on affected k3s nodes.
privileged: true
env: env:
- name: POSTGRES_PASSWORD - name: POSTGRES_PASSWORD
value: "{{ $root.Values.sharedInfra.postgres.password }}" value: "{{ $root.Values.sharedInfra.postgres.password }}"
@@ -219,6 +228,15 @@ spec:
- name: tcp - name: tcp
containerPort: {{ $root.Values.sharedInfra.postgres.port }} containerPort: {{ $root.Values.sharedInfra.postgres.port }}
protocol: TCP protocol: TCP
readinessProbe:
exec:
command:
- sh
- -ec
- >-
exec pg_isready -q -h 127.0.0.1 -p {{ $root.Values.sharedInfra.postgres.port }} -U "$POSTGRES_USER" -d "$POSTGRES_DB"
periodSeconds: 5
timeoutSeconds: 3
volumeMounts: volumeMounts:
- name: data - name: data
mountPath: /var/lib/postgresql/data mountPath: /var/lib/postgresql/data
+2 -2
View File
@@ -2,5 +2,5 @@ apiVersion: v2
name: mixingx-ultra name: mixingx-ultra
description: "MixingX Ultra dashboard standalone release: ultra backend, ultra web, and ultra PostgreSQL." description: "MixingX Ultra dashboard standalone release: ultra backend, ultra web, and ultra PostgreSQL."
type: application type: application
version: 1.0.1 version: 1.0.91
appVersion: "1.0.1" appVersion: "1.0.91"
@@ -200,6 +200,11 @@ spec:
labels: labels:
app.kubernetes.io/component: {{ $name }}-postgres app.kubernetes.io/component: {{ $name }}-postgres
spec: spec:
securityContext:
# Run the image entrypoint as postgres so it does not invoke gosu.
runAsUser: 999
runAsGroup: 999
fsGroup: 999
{{ include "mixingx-ultra.tierAffinity" (dict "role" $role "root" $root) | nindent 6 }} {{ include "mixingx-ultra.tierAffinity" (dict "role" $role "root" $root) | nindent 6 }}
{{- with $.Values.imagePullSecrets }} {{- with $.Values.imagePullSecrets }}
imagePullSecrets: imagePullSecrets:
@@ -209,6 +214,10 @@ spec:
- name: postgres - name: postgres
image: {{ $root.Values.sharedInfra.postgres.image | default "docker.io/library/postgres:17" }} image: {{ $root.Values.sharedInfra.postgres.image | default "docker.io/library/postgres:17" }}
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
command: ["docker-entrypoint.sh", "postgres"]
securityContext:
# Temporary compatibility workaround for checkpoint signal failures on affected k3s nodes.
privileged: true
env: env:
- name: POSTGRES_PASSWORD - name: POSTGRES_PASSWORD
value: "{{ $root.Values.sharedInfra.postgres.password }}" value: "{{ $root.Values.sharedInfra.postgres.password }}"
@@ -222,6 +231,15 @@ spec:
- name: tcp - name: tcp
containerPort: {{ $root.Values.sharedInfra.postgres.port }} containerPort: {{ $root.Values.sharedInfra.postgres.port }}
protocol: TCP protocol: TCP
readinessProbe:
exec:
command:
- sh
- -ec
- >-
exec pg_isready -q -h 127.0.0.1 -p {{ $root.Values.sharedInfra.postgres.port }} -U "$POSTGRES_USER" -d "$POSTGRES_DB"
periodSeconds: 5
timeoutSeconds: 3
volumeMounts: volumeMounts:
- name: data - name: data
mountPath: /var/lib/postgresql/data mountPath: /var/lib/postgresql/data