Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ceeb5474a9 |
No files matched your search
@@ -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.18
|
version: 1.0.3
|
||||||
appVersion: "1.0.18"
|
appVersion: "1.0.1"
|
||||||
@@ -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.18
|
version: 1.0.1
|
||||||
appVersion: "1.0.18"
|
appVersion: "1.0.1"
|
||||||
@@ -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.18
|
version: 1.0.1
|
||||||
appVersion: "1.0.18"
|
appVersion: "1.0.1"
|
||||||
@@ -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.18
|
version: 1.0.1
|
||||||
appVersion: "1.0.18"
|
appVersion: "1.0.1"
|
||||||
@@ -33,4 +33,34 @@ roleRef:
|
|||||||
subjects:
|
subjects:
|
||||||
- kind: ServiceAccount
|
- kind: ServiceAccount
|
||||||
name: gateway-sa
|
name: gateway-sa
|
||||||
|
---
|
||||||
|
# 更新中心(ADR-0074 决策 7):预拉取 DaemonSet 编排——镜像提前铺到各节点,
|
||||||
|
# 客户点更新时新 Pod 命中本地缓存秒级切换。权限只有 daemonsets 增删查 + pods 只读。
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: Role
|
||||||
|
metadata:
|
||||||
|
name: gateway-prepull-manager
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/component: gateway
|
||||||
|
rules:
|
||||||
|
- apiGroups: ["apps"]
|
||||||
|
resources: ["daemonsets"]
|
||||||
|
verbs: ["create", "get", "list", "delete"]
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["pods"]
|
||||||
|
verbs: ["get", "list"]
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
name: gateway-prepull-manager-binding
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/component: gateway
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: Role
|
||||||
|
name: gateway-prepull-manager
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: gateway-sa
|
||||||
{{- end }}
|
{{- end }}
|
||||||
@@ -52,6 +52,20 @@ spec:
|
|||||||
fieldRef:
|
fieldRef:
|
||||||
fieldPath: metadata.namespace
|
fieldPath: metadata.namespace
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- /* 更新中心(ADR-0074):ArgoCD 只读访问(镜像清单);缺省不注入 = 清单功能 503 降级 */}}
|
||||||
|
{{- with .Values.gateway.updateCenter }}
|
||||||
|
{{- with .argocdUrl }}
|
||||||
|
- name: Update__ArgoCd__BaseUrl
|
||||||
|
value: {{ . | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .argocdTokenSecret }}
|
||||||
|
- name: Update__ArgoCd__Token
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ .name | quote }}
|
||||||
|
key: {{ .key | default "token" | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /health
|
path: /health
|
||||||
|
|||||||
@@ -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.18
|
version: 1.0.1
|
||||||
appVersion: "1.0.18"
|
appVersion: "1.0.1"
|
||||||
@@ -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.18
|
version: 1.0.1
|
||||||
appVersion: "1.0.18"
|
appVersion: "1.0.1"
|
||||||
@@ -2,5 +2,5 @@ apiVersion: v2
|
|||||||
name: mixingx-network-agent
|
name: mixingx-network-agent
|
||||||
description: "MixingX network console agent: 每节点常驻,提供主机网口(IP/掩码/网关/DNS)与 WiFi 的可视化配置 API。"
|
description: "MixingX network console agent: 每节点常驻,提供主机网口(IP/掩码/网关/DNS)与 WiFi 的可视化配置 API。"
|
||||||
type: application
|
type: application
|
||||||
version: 1.0.18
|
version: 0.1.0
|
||||||
appVersion: "1.0.18"
|
appVersion: "1.0.1"
|
||||||
@@ -28,10 +28,6 @@ spec:
|
|||||||
{{- else if .Values.nodeSelector }}
|
{{- else if .Values.nodeSelector }}
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
{{ toYaml .Values.nodeSelector | indent 8 }}
|
{{ toYaml .Values.nodeSelector | indent 8 }}
|
||||||
{{- end }}
|
|
||||||
{{- with .Values.imagePullSecrets }}
|
|
||||||
imagePullSecrets:
|
|
||||||
{{- toYaml . | nindent 8 }}
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
containers:
|
containers:
|
||||||
- name: network-agent
|
- name: network-agent
|
||||||
@@ -55,10 +51,13 @@ spec:
|
|||||||
- name: K3S_RESTART_ON_IP_CHANGE
|
- name: K3S_RESTART_ON_IP_CHANGE
|
||||||
value: {{ .Values.k3sRestartOnIpChange | quote }}
|
value: {{ .Values.k3sRestartOnIpChange | quote }}
|
||||||
securityContext:
|
securityContext:
|
||||||
# 只需 root + D-Bus socket,无需 privileged 与额外 capability:
|
# 只需 root + D-Bus socket,无需 privileged
|
||||||
# nmcli 经 D-Bus 操作主机 NM,特权动作(改 IP/路由)全部由 NM 进程执行
|
# NET_ADMIN: 清除切换静态后残留的动态地址(ip addr del 需要此能力)
|
||||||
runAsUser: 0
|
runAsUser: 0
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
|
capabilities:
|
||||||
|
add:
|
||||||
|
- NET_ADMIN
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /api/network/health
|
path: /api/network/health
|
||||||
@@ -81,15 +80,15 @@ spec:
|
|||||||
# 主机 system bus: nmcli 与 systemd 重启都走它
|
# 主机 system bus: nmcli 与 systemd 重启都走它
|
||||||
- name: dbus
|
- name: dbus
|
||||||
mountPath: /run/dbus/system_bus_socket
|
mountPath: /run/dbus/system_bus_socket
|
||||||
# 网卡别名持久化: aliases.json 落宿主机,重启/重建 Pod 均保留
|
- name: nm-run
|
||||||
- name: alias-store
|
mountPath: /run/NetworkManager
|
||||||
mountPath: /var/lib/mixingx/network-agent
|
readOnly: true
|
||||||
volumes:
|
volumes:
|
||||||
- name: dbus
|
- name: dbus
|
||||||
hostPath:
|
hostPath:
|
||||||
path: /run/dbus/system_bus_socket
|
path: /run/dbus/system_bus_socket
|
||||||
type: Socket
|
type: Socket
|
||||||
- name: alias-store
|
- name: nm-run
|
||||||
hostPath:
|
hostPath:
|
||||||
path: /var/lib/mixingx/network-agent
|
path: /run/NetworkManager
|
||||||
type: DirectoryOrCreate
|
type: DirectoryOrCreate
|
||||||
@@ -1,8 +1,6 @@
|
|||||||
# Headless 诊断服务: DNS network-agent 返回各节点 agent 的全部地址。
|
# Headless 诊断服务: DNS network-agent 返回各节点 agent 的全部地址。
|
||||||
# 注意: 每个 agent 只管理自己所在节点,不要用普通 ClusterIP Service 访问
|
# 注意: 每个 agent 只管理自己所在节点,不要用普通 ClusterIP Service 访问
|
||||||
# (会在节点间随机负载均衡导致操作到错误的主机)。前端弹窗始终直连节点 IP。
|
# (会在节点间随机负载均衡导致操作到错误的主机)。前端弹窗始终直连节点 IP。
|
||||||
# mixingx.io/role 标签让 Gateway 发现该服务并生成 /api/network/** 透传路由,
|
|
||||||
# 前端网络设置弹窗经 Gateway 同源转发访问(消除跨域)。
|
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
@@ -10,8 +8,6 @@ metadata:
|
|||||||
labels:
|
labels:
|
||||||
app.kubernetes.io/name: mixingx
|
app.kubernetes.io/name: mixingx
|
||||||
app.kubernetes.io/component: network-agent
|
app.kubernetes.io/component: network-agent
|
||||||
mixingx.io/role: network-agent
|
|
||||||
mixingx.io/node-id: network-agent
|
|
||||||
spec:
|
spec:
|
||||||
clusterIP: None
|
clusterIP: None
|
||||||
selector:
|
selector:
|
||||||
|
|||||||
@@ -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.18
|
version: 1.0.1
|
||||||
appVersion: "1.0.18"
|
appVersion: "1.0.1"
|
||||||
@@ -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.18
|
version: 1.0.1
|
||||||
appVersion: "1.0.18"
|
appVersion: "1.0.1"
|
||||||
@@ -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.18
|
version: 1.0.1
|
||||||
appVersion: "1.0.18"
|
appVersion: "1.0.1"
|
||||||
@@ -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.18
|
version: 1.0.1
|
||||||
appVersion: "1.0.18"
|
appVersion: "1.0.1"
|
||||||
@@ -9,8 +9,6 @@
|
|||||||
# 4. 禁用 cloud-init 网络管理,netplan renderer 切换为 NetworkManager
|
# 4. 禁用 cloud-init 网络管理,netplan renderer 切换为 NetworkManager
|
||||||
# 5. rfkill 解锁无线网卡
|
# 5. rfkill 解锁无线网卡
|
||||||
# 6. 安装 polkit 放行规则(容器内 root 调用 NM/systemd D-Bus)
|
# 6. 安装 polkit 放行规则(容器内 root 调用 NM/systemd D-Bus)
|
||||||
# 7. 禁止 NM 开机收编 initramfs 抢配的连接(keep-configuration=no),
|
|
||||||
# 确保开机按 autoconnect-priority 选路,静态档案不被绕过
|
|
||||||
#
|
#
|
||||||
# 用法: sudo bash provision-host.sh
|
# 用法: sudo bash provision-host.sh
|
||||||
# 回滚: sudo bash rollback-host.sh
|
# 回滚: sudo bash rollback-host.sh
|
||||||
@@ -43,16 +41,6 @@ cat > /etc/NetworkManager/conf.d/99-mixingx.conf <<'EOF'
|
|||||||
no-auto-default=*
|
no-auto-default=*
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# 禁止 NM 开机收编 initramfs 阶段(dracut 遗留 DHCP 配置)抢配的现状:
|
|
||||||
# 默认 keep-configuration 走 connection-assumed,autoconnect-priority 选路不执行,
|
|
||||||
# 静态档案开机被绕过(表现为"重启后静态 IP 变回 DHCP")。
|
|
||||||
# 设为 no 后 NM 开机总是按最高 autoconnect-priority 激活持久档案;
|
|
||||||
# initrd 抢到的 DHCP 租约会以副地址共存(双 IP:静态主 + DHCP 副兜底)。
|
|
||||||
cat > /etc/NetworkManager/conf.d/98-keep-configuration.conf <<'EOF'
|
|
||||||
[device]
|
|
||||||
keep-configuration=no
|
|
||||||
EOF
|
|
||||||
|
|
||||||
systemctl enable --now NetworkManager >/dev/null 2>&1 || true
|
systemctl enable --now NetworkManager >/dev/null 2>&1 || true
|
||||||
|
|
||||||
# ── 2. 识别主网口并读取当前参数 ───────────────────────────────────────────
|
# ── 2. 识别主网口并读取当前参数 ───────────────────────────────────────────
|
||||||
|
|||||||
@@ -42,7 +42,6 @@ systemctl disable --now NetworkManager >/dev/null 2>&1 || true
|
|||||||
# ── 4. 移除 polkit 规则 / NM 覆盖配置 ─────────────────────────────────────
|
# ── 4. 移除 polkit 规则 / NM 覆盖配置 ─────────────────────────────────────
|
||||||
rm -f /etc/polkit-1/localauthority/50-local.d/49-mixingx-network-agent.pkla
|
rm -f /etc/polkit-1/localauthority/50-local.d/49-mixingx-network-agent.pkla
|
||||||
rm -f /etc/NetworkManager/conf.d/99-mixingx.conf
|
rm -f /etc/NetworkManager/conf.d/99-mixingx.conf
|
||||||
rm -f /etc/NetworkManager/conf.d/98-keep-configuration.conf
|
|
||||||
|
|
||||||
sleep 3
|
sleep 3
|
||||||
ip -4 addr show | awk '/inet /{print " " $2 " @ " $NF}'
|
ip -4 addr show | awk '/inet /{print " " $2 " @ " $NF}'
|
||||||
|
|||||||
Reference in new issue
Block a user