Compare commits

...
Author SHA1 Message Date
薛佳帆 0a451f6070 fix(dotnet): 全部 .NET 主容器加 appArmorProfile Unconfined——AppArmor 拒线程定向信号致 GC abort
根因(dotnet/runtime#136603,已由同事在 sciveda 现场实测验证):Ubuntu 26.04 新内核
配套 AppArmor 行为禁止容器内进程向自身线程发信号(pthread_kill/tgkill → EACCES),
CoreCLR GC 挂起线程失败 → 运行时 abort → dmesg 表现为 'general protection fault
in libc.so.6[+0x289a2]'(.NET BGC/Server GC/TP Worker 线程),容器 exit 139
CrashLoop,负载越高崩得越频,且 journalctl 无 apparmor=DENIED 记录。
同机制亦解释此前 postgres 'could not signal for checkpoint: Permission denied'
(privileged 之所以有效 = privileged 容器不受 AppArmor 约束)。
修复:agent/sso/ultra/edge/gateway/platform 六处 .NET 主容器
securityContext.appArmorProfile.type: Unconfined。
2026-11-11 16:38:39 +08:00
薛佳帆 407aef89e1 fix(postgres): 全部 postgres StatefulSet 三件套修复——绕过镜像内 gosu 直跑 + 特权容器
根因:官方 postgres:17 镜像(2026-08 构建)内 gosu 在新内核(Ubuntu 26.04 kernel 7.0.0-39+)上
用户态死循环,容器假活(Running 但 5432 无服务、PGDATA 空、零日志);绕过 gosu 后 PG17 恢复期
signal checkpoint 再遇权限死循环,故三件缺一不可:
- pod securityContext: runAsUser/runAsGroup/fsGroup=999(以 postgres 用户直跑,跳过 gosu)
- container command: docker-entrypoint.sh postgres(非 root 下 entrypoint 自动跳过 gosu)
- container securityContext: privileged(否则恢复期 'could not signal for checkpoint: Permission denied')

涉及 5 个模板:sso/ultra/audit(audit-db)/platform(audit)/agent-unit 各自内嵌的 postgres。
实测:xjf1641(Xeon+kernel43)与 wytest(i5+kernel42)原始定义必死、打补丁后稳定运行;
kernel 7.0.0-38 老机(如 184)暂未触发但同机制不免疫,升级内核前必须先吃本修复。
2026-11-10 16:19:50 +08:00
王野 d7366869ed feat(helm): 统一镜像地址配置规范并更新CI示例
- 添加global.imageRegistry作为统一镜像仓库地址配置项
- 创建通用image模板函数处理镜像地址拼接逻辑
- 更新所有chart使用新的镜像配置结构
- 在README中添加镜像地址约定说明
- 修改CI命令示例以包含必要的镜像配置参数
- 将硬编码的镜像地址改为通过values动态配置
2026-11-03 09:52:35 +08:00
37 changed files with 263 additions and 121 deletions

No files matched your search

+20 -2
View File
@@ -27,14 +27,32 @@
CI 只对 `release-charts/` 做 lint/template(见 hub `.drone.yml`):
```bash
helm lint release-charts/mixingx-edge-unit
helm template ci-edge release-charts/mixingx-edge-unit
helm lint release-charts/mixingx-edge-unit \
--set global.imageRegistry=registry.invalid/mixingx \
--set images.edge.tag=ci \
--set images.edgeWeb.tag=ci
helm template ci-edge release-charts/mixingx-edge-unit \
--set global.imageRegistry=registry.invalid/mixingx \
--set images.edge.tag=ci \
--set images.edgeWeb.tag=ci
```
### ArgoCD 部署
`mixingx-deploy` 的 ApplicationSet 按 unit chart 逐个发布,每个 edge/agent 一个独立 Helm release。详见 `mixingx-deploy/`。
## 镜像地址约定
所有部署到 K3s 的运行镜像统一按下面的结构拼接:
```text
<global.imageRegistry>/<images.*.repository>:<images.*.tag>
```
`global.imageRegistry` 必须由 `mixingx-deploy` 的环境 values 提供,Chart 不保存 AL ACR、Harbor、内网 IP 或公网镜像仓库地址。业务镜像和 PostgreSQL、Redis、RabbitMQ、MongoDB、NanoMQ 等基础镜像遵守同一规则。
生产环境必须传入明确且不可变的 tag,不使用 `latest`。AL ACR 与现场 Harbor 必须保持相同的 repository/tag,只切换 `global.imageRegistry`。
## 关联文档
- hub [AGENTS.md](https://gitee.com/mixing-tech/mixingx.hub) — 全项目指南
@@ -22,6 +22,13 @@
{{- printf "/%s-%s" .Values.role (.Values.site | toString) -}}
{{- end -}}
{{- define "mixingx-agent-unit.image" -}}
{{- $registry := required "global.imageRegistry is required" .registry -}}
{{- $repository := required "image.repository is required" .image.repository -}}
{{- $tag := required "image.tag is required" .image.tag -}}
{{- printf "%s/%s:%s" (trimSuffix "/" $registry) (trimPrefix "/" $repository) ($tag | toString) -}}
{{- end -}}
{{- define "mixingx-unit.storageClassName" -}}
{{- .Values.storage.className | default "local-path" -}}
{{- end -}}
@@ -79,12 +79,11 @@ spec:
readOnly: true
containers:
- name: {{ $name }}
{{ $backendImg := .Values.images.backend }}
{{ $agentImg := .Values.images.agent | default dict }}
{{ $backendRepo := $agentImg.repository | default $backendImg.repository }}
{{ $backendTag := $agentImg.tag | default $backendImg.tag | default .Values.tag | default "latest" }}
image: {{ .Values.registry }}/{{ $backendRepo }}:{{ $backendTag }}
image: {{ include "mixingx-agent-unit.image" (dict "registry" .Values.global.imageRegistry "image" .Values.images.agent) | quote }}
imagePullPolicy: IfNotPresent
securityContext:
appArmorProfile:
type: Unconfined
ports:
- name: http
containerPort: {{ .Values.ports.backend }}
@@ -193,11 +192,7 @@ spec:
{{ include "mixingx-unit.followerScheduling" . | nindent 6 }}
containers:
- name: {{ $webName }}
{{ $frontendImg := .Values.images.frontend }}
{{ $agentWebImg := .Values.images.agentWeb | default dict }}
{{ $frontendRepo := $agentWebImg.repository | default $frontendImg.repository }}
{{ $frontendTag := $agentWebImg.tag | default $frontendImg.tag | default .Values.tag | default "latest" }}
image: {{ .Values.registry }}/{{ $frontendRepo }}:{{ $frontendTag }}
image: {{ include "mixingx-agent-unit.image" (dict "registry" .Values.global.imageRegistry "image" .Values.images.agentWeb) | quote }}
imagePullPolicy: IfNotPresent
ports:
- name: http
@@ -261,9 +256,18 @@ spec:
app.kubernetes.io/component: {{ $name }}-postgres
spec:
{{ include "mixingx-unit.followerScheduling" . | nindent 6 }}
# postgres 以专用用户直跑,绕过镜像内 gosu(新内核下 gosu 用户态死循环,
# 见 ADR/工单:kernel 7.0.0-39+ × gosu 兼容 bug;三件套缺一不可)
securityContext:
runAsUser: 999
runAsGroup: 999
fsGroup: 999
containers:
- name: postgres
image: {{ .Values.images.postgres.repository }}:{{ .Values.images.postgres.tag | default "latest" }}
command: ["docker-entrypoint.sh", "postgres"]
securityContext:
privileged: true
image: {{ include "mixingx-agent-unit.image" (dict "registry" .Values.global.imageRegistry "image" .Values.images.postgres) | quote }}
imagePullPolicy: IfNotPresent
env:
- name: POSTGRES_PASSWORD
+6 -13
View File
@@ -1,5 +1,6 @@
registry: 192.168.1.105:8888/mixingx
tag: latest
global:
imageRegistry: ""
timezone: Asia/Shanghai
role: agent
@@ -10,17 +11,9 @@ phaseType: "" # 工序类型(对应 apphost 的 AGENT_PHASE_TYPE,如 DieC
database: ""
images:
backend:
repository: agent
tag: ""
frontend:
repository: agent-web
tag: ""
postgres:
repository: docker.io/library/postgres
tag: "17"
agent: {}
agentWeb: {}
agent: { repository: agent, tag: "" }
agentWeb: { repository: agent-web, tag: "" }
postgres: { repository: postgres, tag: "17" }
ports:
backend: 8080
@@ -2,6 +2,13 @@
{{- .Values.storage.className | default "local-path" -}}
{{- end -}}
{{- define "mixingx-audit.image" -}}
{{- $registry := required "global.imageRegistry is required" .registry -}}
{{- $repository := required "image.repository is required" .image.repository -}}
{{- $tag := required "image.tag is required" .image.tag -}}
{{- printf "%s/%s:%s" (trimSuffix "/" $registry) (trimPrefix "/" $repository) ($tag | toString) -}}
{{- end -}}
{{- define "mixingx-audit.tierAffinity" -}}
{{- $root := .root -}}
{{- $role := .role -}}
@@ -32,9 +32,18 @@ spec:
app.kubernetes.io/component: {{ .Values.audit.database }}-postgres
spec:
{{ include "mixingx-audit.tierAffinity" (dict "role" "audit" "root" $root) | nindent 6 }}
# postgres 以专用用户直跑,绕过镜像内 gosu(新内核下 gosu 用户态死循环,
# 见 ADR/工单:kernel 7.0.0-39+ × gosu 兼容 bug;三件套缺一不可)
securityContext:
runAsUser: 999
runAsGroup: 999
fsGroup: 999
containers:
- name: postgres
image: {{ $root.Values.sharedInfra.postgres.image | default "docker.io/library/postgres:17" }}
command: ["docker-entrypoint.sh", "postgres"]
securityContext:
privileged: true
image: {{ include "mixingx-audit.image" (dict "registry" $root.Values.global.imageRegistry "image" $root.Values.images.postgres) | quote }}
imagePullPolicy: IfNotPresent
env:
- name: POSTGRES_PASSWORD
@@ -24,7 +24,7 @@ spec:
{{ include "mixingx-audit.tierAffinity" (dict "role" "audit" "root" $root) | nindent 6 }}
containers:
- name: nanomq
image: {{ .Values.audit.mqtt.image | default "emqx/nanomq:0.25.2-2" }}
image: {{ include "mixingx-audit.image" (dict "registry" .Values.global.imageRegistry "image" .Values.images.nanomq) | quote }}
imagePullPolicy: IfNotPresent
command: ["/bin/sh"]
args:
@@ -22,7 +22,7 @@ spec:
{{ include "mixingx-audit.tierAffinity" (dict "role" "audit" "root" $root) | nindent 6 }}
containers:
- name: audit-web
image: "{{ .Values.registry }}/{{ .Values.images.auditWeb.repository | default "audit-web" }}:{{ .Values.images.auditWeb.tag | default .Values.tag | default "latest" }}"
image: {{ include "mixingx-audit.image" (dict "registry" .Values.global.imageRegistry "image" .Values.images.auditWeb) | quote }}
imagePullPolicy: IfNotPresent
ports:
- name: http
@@ -21,7 +21,7 @@ spec:
{{ include "mixingx-audit.tierAffinity" (dict "role" "audit" "root" $root) | nindent 6 }}
containers:
- name: audit
image: "{{ .Values.registry }}/{{ .Values.images.audit.repository | default "audit" }}:{{ .Values.images.audit.tag | default .Values.tag | default "latest" }}"
image: {{ include "mixingx-audit.image" (dict "registry" .Values.global.imageRegistry "image" .Values.images.audit) | quote }}
imagePullPolicy: IfNotPresent
ports:
- name: http
+7 -10
View File
@@ -1,5 +1,6 @@
registry: 192.168.1.105:8888/mixingx
tag: latest
global:
imageRegistry: ""
timezone: Asia/Shanghai
storage:
@@ -7,7 +8,6 @@ storage:
sharedInfra:
postgres:
image: docker.io/library/postgres:17
username: postgres
password: "Admin12345"
port: 5432
@@ -28,7 +28,6 @@ audit:
ssoBaseUrl: "http://sso-service:8080"
# 中心 Audit Broker(ADR-0048)与 audit 专属 PostgreSQL 随本 chart 发布(ADR-0065)
mqtt:
image: "emqx/nanomq:0.25.2-2"
brokerHost: "audit-nanomq-service"
brokerPort: 1883
managementPort: 8081
@@ -42,12 +41,10 @@ audit:
concurrency: 4
images:
audit:
repository: audit
tag: ""
auditWeb:
repository: audit-web
tag: ""
audit: { repository: audit, tag: "" }
auditWeb: { repository: audit-web, tag: "" }
postgres: { repository: postgres, tag: "17" }
nanomq: { repository: nanomq, tag: "0.25.2-2" }
tier:
enabled: false
@@ -43,6 +43,13 @@ AuditMqttPublisher__NodeId: "{{ .Values.audit.publisher.nodeId | default $name }
{{- printf "/%s-%s" .Values.role (.Values.site | toString) -}}
{{- end -}}
{{- define "mixingx-edge-unit.image" -}}
{{- $registry := required "global.imageRegistry is required" .registry -}}
{{- $repository := required "image.repository is required" .image.repository -}}
{{- $tag := required "image.tag is required" .image.tag -}}
{{- printf "%s/%s:%s" (trimSuffix "/" $registry) (trimPrefix "/" $repository) ($tag | toString) -}}
{{- end -}}
{{- define "mixingx-unit.storageClassName" -}}
{{- .Values.storage.className | default "local-path" -}}
{{- end -}}
@@ -25,7 +25,7 @@ spec:
{{ include "mixingx-unit.backendScheduling" . | nindent 6 }}
containers:
- name: nanomq
image: "{{ .Values.mqtt.image.repository }}:{{ .Values.mqtt.image.tag }}"
image: {{ include "mixingx-edge-unit.image" (dict "registry" .Values.global.imageRegistry "image" .Values.images.nanomq) | quote }}
imagePullPolicy: IfNotPresent
ports:
- name: mqtt
@@ -57,12 +57,11 @@ spec:
{{- end }}
containers:
- name: {{ $name }}
{{ $backendImg := .Values.images.backend }}
{{ $edgeImg := .Values.images.edge | default dict }}
{{ $backendRepo := $edgeImg.repository | default $backendImg.repository }}
{{ $backendTag := $edgeImg.tag | default $backendImg.tag | default .Values.tag | default "latest" }}
image: {{ .Values.registry }}/{{ $backendRepo }}:{{ $backendTag }}
image: {{ include "mixingx-edge-unit.image" (dict "registry" .Values.global.imageRegistry "image" .Values.images.edge) | quote }}
imagePullPolicy: IfNotPresent
securityContext:
appArmorProfile:
type: Unconfined
ports:
- name: http
containerPort: {{ .Values.ports.backend }}
@@ -169,11 +168,7 @@ spec:
{{ include "mixingx-unit.followerScheduling" . | nindent 6 }}
containers:
- name: {{ $webName }}
{{ $frontendImg := .Values.images.frontend }}
{{ $edgeWebImg := .Values.images.edgeWeb | default dict }}
{{ $frontendRepo := $edgeWebImg.repository | default $frontendImg.repository }}
{{ $frontendTag := $edgeWebImg.tag | default $frontendImg.tag | default .Values.tag | default "latest" }}
image: {{ .Values.registry }}/{{ $frontendRepo }}:{{ $frontendTag }}
image: {{ include "mixingx-edge-unit.image" (dict "registry" .Values.global.imageRegistry "image" .Values.images.edgeWeb) | quote }}
imagePullPolicy: IfNotPresent
ports:
- name: http
+6 -13
View File
@@ -1,5 +1,6 @@
registry: 192.168.1.105:8888/mixingx
tag: latest
global:
imageRegistry: ""
timezone: Asia/Shanghai
role: edge
@@ -9,14 +10,9 @@ serviceId: ""
idWorkerId: 17
images:
backend:
repository: edge
tag: ""
frontend:
repository: edge-web
tag: ""
edge: {}
edgeWeb: {}
edge: { repository: edge, tag: "" }
edgeWeb: { repository: edge-web, tag: "" }
nanomq: { repository: nanomq, tag: "0.25.2-2" }
ports:
backend: 8080
@@ -62,9 +58,6 @@ sharedInfra:
mqtt:
enabled: true
image:
repository: emqx/nanomq
tag: 0.25.2-2
port: 1883
wsPort: 8083 # WebSocket listener(NanoMQ 镜像默认开启,路径 /mqtt),供 MQTTX Web 连接
credentialRef: "" # 默认空,模板内 default 为 {name}-mqtt
@@ -2,6 +2,13 @@
{{- .Values.storage.className | default "local-path" -}}
{{- end -}}
{{- define "mixingx-gateway.image" -}}
{{- $registry := required "global.imageRegistry is required" .registry -}}
{{- $repository := required "image.repository is required" .image.repository -}}
{{- $tag := required "image.tag is required" .image.tag -}}
{{- printf "%s/%s:%s" (trimSuffix "/" $registry) (trimPrefix "/" $repository) ($tag | toString) -}}
{{- end -}}
{{- define "mixingx-gateway.tierAffinity" -}}
{{- $root := .root -}}
{{- $role := .role -}}
@@ -28,8 +28,11 @@ spec:
{{ include "mixingx-gateway.tierAffinity" (dict "role" "gateway" "root" $) | nindent 6 }}
containers:
- name: gateway
image: {{ .Values.registry }}/{{ $gatewayImage.repository | default "gateway" }}:{{ $gatewayImage.tag | default .Values.tag | default "latest" }}
image: {{ include "mixingx-gateway.image" (dict "registry" .Values.global.imageRegistry "image" $gatewayImage) | quote }}
imagePullPolicy: IfNotPresent
securityContext:
appArmorProfile:
type: Unconfined
ports:
- name: http
containerPort: {{ .Values.gateway.port | default 8080 }}
+3 -2
View File
@@ -1,5 +1,6 @@
registry: 192.168.1.119:8888/mixingx
tag: latest
global:
imageRegistry: ""
timezone: Asia/Shanghai
storage:
@@ -2,6 +2,13 @@
{{- .Values.storage.className | default "local-path" -}}
{{- end -}}
{{- define "mixingx-infra.image" -}}
{{- $registry := required "global.imageRegistry is required" .registry -}}
{{- $repository := required "image.repository is required" .image.repository -}}
{{- $tag := required "image.tag is required" .image.tag -}}
{{- printf "%s/%s:%s" (trimSuffix "/" $registry) (trimPrefix "/" $repository) ($tag | toString) -}}
{{- end -}}
{{- define "mixingx-infra.tierAffinity" -}}
{{- $root := .root -}}
{{- $role := .role -}}
@@ -33,7 +33,8 @@ spec:
{{ include "mixingx-infra.tierAffinity" (dict "role" "sharedDatastores" "root" $root) | nindent 6 }}
containers:
- name: {{ .name }}
image: {{ .image }}
{{ $image := index $root.Values.images .image }}
image: {{ include "mixingx-infra.image" (dict "registry" $root.Values.global.imageRegistry "image" $image) | quote }}
imagePullPolicy: IfNotPresent
ports:
- name: tcp
+12 -6
View File
@@ -1,5 +1,6 @@
registry: 192.168.1.105:8888/mixingx
tag: latest
global:
imageRegistry: ""
timezone: Asia/Shanghai
storage:
@@ -7,7 +8,6 @@ storage:
sharedInfra:
postgres:
image: docker.io/library/postgres:17
username: postgres
password: "Admin12345"
port: 5432
@@ -36,19 +36,25 @@ tier:
services:
sharedDatastores: { mode: required, tiers: [infra] }
images:
postgres: { repository: postgres, tag: "17" }
redis: { repository: redis, tag: "8.6" }
mongo: { repository: mongo, tag: "8.3" }
rabbitmq: { repository: rabbitmq, tag: "4.3-management" }
sharedDatastores:
- name: redis
image: docker.io/library/redis:8.6
image: redis
port: 6379
storage: 2Gi
mountPath: /data
- name: mongo
image: docker.io/library/mongo:8.3
image: mongo
port: 27017
storage: 5Gi
mountPath: /data/db
- name: messaging
image: docker.io/library/rabbitmq:4.3-management
image: rabbitmq
port: 5672
storage: 2Gi
mountPath: /var/lib/rabbitmq
@@ -4,3 +4,10 @@
{{- define "mixingx-mqttx.name" -}}
{{- .Values.mqttx.name | default "mqttx" -}}
{{- end -}}
{{- define "mixingx-mqttx.image" -}}
{{- $registry := required "global.imageRegistry is required" .registry -}}
{{- $repository := required "image.repository is required" .image.repository -}}
{{- $tag := required "image.tag is required" .image.tag -}}
{{- printf "%s/%s:%s" (trimSuffix "/" $registry) (trimPrefix "/" $repository) ($tag | toString) -}}
{{- end -}}
@@ -21,7 +21,7 @@ spec:
spec:
containers:
- name: {{ $name }}
image: "{{ .Values.mqttx.image.repository }}:{{ .Values.mqttx.image.tag | default "latest" }}"
image: {{ include "mixingx-mqttx.image" (dict "registry" .Values.global.imageRegistry "image" .Values.mqttx.image) | quote }}
imagePullPolicy: IfNotPresent
# emqx/mqttx-web 镜像默认 http-server 未显式绑 0.0.0.0,导致只听 loopback、
# Service/Pod IP 进不来。显式覆盖启动参数,强制监听所有接口。
+5 -2
View File
@@ -9,14 +9,17 @@
#
# Ingress:demo 环境有 *.mixingx.local DNS,用 host 暴露;无 DNS 的现场改用 NodePort。
global:
imageRegistry: ""
timezone: Asia/Shanghai
mqttx:
name: mqttx
replicas: 1
image:
repository: emqx/mqttx-web
tag: latest
repository: mqttx-web
tag: ""
description: "MQTT 监控客户端"
ingress:
@@ -2,6 +2,13 @@
{{- .Values.storage.className | default "local-path" -}}
{{- end -}}
{{- define "mixingx-platform.image" -}}
{{- $registry := required "global.imageRegistry is required" .registry -}}
{{- $repository := required "image.repository is required" .image.repository -}}
{{- $tag := required "image.tag is required" .image.tag -}}
{{- printf "%s/%s:%s" (trimSuffix "/" $registry) (trimPrefix "/" $repository) ($tag | toString) -}}
{{- end -}}
{{- define "mixingx-platform.tierAffinity" -}}
{{- $root := .root -}}
{{- $role := .role -}}
@@ -27,8 +27,12 @@ spec:
{{ include "mixingx-platform.tierAffinity" (dict "role" .role "root" $root) | nindent 6 }}
containers:
- name: {{ .name }}
image: {{ $root.Values.registry }}/{{ .image }}:{{ $root.Values.tag | default "latest" }}
{{ $image := index $root.Values.images .image }}
image: {{ include "mixingx-platform.image" (dict "registry" $root.Values.global.imageRegistry "image" $image) | quote }}
imagePullPolicy: IfNotPresent
securityContext:
appArmorProfile:
type: Unconfined
ports:
- name: http
containerPort: {{ $port }}
@@ -158,7 +162,8 @@ spec:
{{ include "mixingx-platform.tierAffinity" (dict "role" .tierRole "root" $root) | nindent 6 }}
containers:
- name: {{ .name }}
image: {{ $root.Values.registry }}/{{ .image }}:{{ $root.Values.tag | default "latest" }}
{{ $image := index $root.Values.images .image }}
image: {{ include "mixingx-platform.image" (dict "registry" $root.Values.global.imageRegistry "image" $image) | quote }}
imagePullPolicy: IfNotPresent
ports:
- name: http
@@ -226,7 +231,7 @@ spec:
{{ include "mixingx-platform.tierAffinity" (dict "role" .tierRole "root" $root) | nindent 6 }}
containers:
- name: postgres
image: {{ $root.Values.sharedInfra.postgres.image | default "docker.io/library/postgres:17" }}
image: {{ include "mixingx-platform.image" (dict "registry" $root.Values.global.imageRegistry "image" $root.Values.images.postgres) | quote }}
imagePullPolicy: IfNotPresent
env:
- name: POSTGRES_PASSWORD
@@ -22,7 +22,8 @@ spec:
{{ include "mixingx-platform.tierAffinity" (dict "role" "audit" "root" $root) | nindent 6 }}
containers:
- name: audit
image: "{{ .Values.registry }}/{{ .Values.audit.image }}:{{ .Values.tag | default "latest" }}"
{{ $auditImage := index .Values.images .Values.audit.image }}
image: {{ include "mixingx-platform.image" (dict "registry" .Values.global.imageRegistry "image" $auditImage) | quote }}
imagePullPolicy: IfNotPresent
ports:
- name: http
@@ -143,7 +144,8 @@ spec:
{{ include "mixingx-platform.tierAffinity" (dict "role" "audit" "root" $root) | nindent 6 }}
containers:
- name: {{ .Values.audit.webName }}
image: "{{ .Values.registry }}/{{ .Values.audit.webImage }}:{{ .Values.tag | default "latest" }}"
{{ $auditWebImage := index .Values.images .Values.audit.webImage }}
image: {{ include "mixingx-platform.image" (dict "registry" .Values.global.imageRegistry "image" $auditWebImage) | quote }}
imagePullPolicy: IfNotPresent
ports:
- name: http
@@ -206,9 +208,18 @@ spec:
app.kubernetes.io/component: {{ .Values.audit.database }}-postgres
spec:
{{ include "mixingx-platform.tierAffinity" (dict "role" "audit" "root" $root) | nindent 6 }}
# postgres 以专用用户直跑,绕过镜像内 gosu(新内核下 gosu 用户态死循环,
# 见 ADR/工单:kernel 7.0.0-39+ × gosu 兼容 bug;三件套缺一不可)
securityContext:
runAsUser: 999
runAsGroup: 999
fsGroup: 999
containers:
- name: postgres
image: {{ $root.Values.sharedInfra.postgres.image | default "docker.io/library/postgres:17" }}
command: ["docker-entrypoint.sh", "postgres"]
securityContext:
privileged: true
image: {{ include "mixingx-platform.image" (dict "registry" $root.Values.global.imageRegistry "image" $root.Values.images.postgres) | quote }}
imagePullPolicy: IfNotPresent
env:
- name: POSTGRES_PASSWORD
@@ -33,7 +33,8 @@ spec:
{{ include "mixingx-platform.tierAffinity" (dict "role" "sharedDatastores" "root" $root) | nindent 6 }}
containers:
- name: {{ .name }}
image: {{ .image }}
{{ $image := index $root.Values.images .image }}
image: {{ include "mixingx-platform.image" (dict "registry" $root.Values.global.imageRegistry "image" $image) | quote }}
imagePullPolicy: IfNotPresent
ports:
- name: tcp
+24 -10
View File
@@ -1,5 +1,6 @@
registry: 192.168.1.105:8888/mixingx
tag: latest
global:
imageRegistry: ""
timezone: Asia/Shanghai
storage:
@@ -7,7 +8,6 @@ storage:
sharedInfra:
postgres:
image: docker.io/library/postgres:17
username: postgres
password: "Admin12345"
port: 5432
@@ -40,12 +40,26 @@ tier:
audit: { mode: required, tiers: [infra] }
sharedDatastores: { mode: required, tiers: [infra] }
images:
gateway: { repository: gateway, tag: "" }
sso: { repository: sso, tag: "" }
ssoWeb: { repository: sso-web, tag: "" }
ultra: { repository: ultra, tag: "" }
ultraWeb: { repository: ultra-web, tag: "" }
audit: { repository: audit, tag: "" }
auditWeb: { repository: audit-web, tag: "" }
postgres: { repository: postgres, tag: "17" }
redis: { repository: redis, tag: "8.6" }
mongo: { repository: mongo, tag: "8.3" }
rabbitmq: { repository: rabbitmq, tag: "4.3-management" }
nanomq: { repository: nanomq, tag: "0.25.2-2" }
standalones:
- name: sso
image: sso
role: sso
webName: sso-web
webImage: sso-web
webImage: ssoWeb
webBasePath: /sso/
serviceId: sso
database: sso-db
@@ -57,7 +71,7 @@ standalones:
image: ultra
role: ultra
webName: ultra-web
webImage: ultra-web
webImage: ultraWeb
webBasePath: /ultra/
serviceId: ultra
database: ultra-db
@@ -77,7 +91,7 @@ audit:
port: 5900
replicas: 2
webName: audit-web
webImage: audit-web
webImage: auditWeb
webBasePath: /audit/
webPort: 8900
database: audit-db
@@ -96,22 +110,22 @@ audit:
sharedDatastores:
- name: redis
image: docker.io/library/redis:8.6
image: redis
port: 6379
storage: 2Gi
mountPath: /data
- name: mongo
image: docker.io/library/mongo:8.3
image: mongo
port: 27017
storage: 5Gi
mountPath: /data/db
- name: messaging
image: docker.io/library/rabbitmq:4.3-management
image: rabbitmq
port: 5672
storage: 2Gi
mountPath: /var/lib/rabbitmq
- name: audit-nanomq
image: emqx/nanomq:0.25.2-2
image: nanomq
port: 1883
storage: 1Gi
mountPath: /var/lib/nanomq
@@ -0,0 +1,6 @@
{{- define "mixingx-protocol-server-unit.image" -}}
{{- $registry := required "global.imageRegistry is required" .registry -}}
{{- $repository := required "image.repository is required" .image.repository -}}
{{- $tag := required "image.tag is required" .image.tag -}}
{{- printf "%s/%s:%s" (trimSuffix "/" $registry) (trimPrefix "/" $repository) ($tag | toString) -}}
{{- end -}}
@@ -26,7 +26,7 @@ spec:
{{- $proto := index .Values.images.protocol .Values.type }}
containers:
- name: protocol-server
image: {{ .Values.registry }}/{{ $proto.repository | default .Values.image }}:{{ $proto.tag | default .Values.tag | default "latest" }}
image: {{ include "mixingx-protocol-server-unit.image" (dict "registry" .Values.global.imageRegistry "image" $proto) | quote }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
args:
- "--port"
@@ -1,5 +1,6 @@
registry: 192.168.1.105:8888/mixingx
tag: latest
global:
imageRegistry: ""
timezone: Asia/Shanghai
# Legacy image override (kept for backward compatibility).
@@ -2,6 +2,13 @@
{{- .Values.storage.className | default "local-path" -}}
{{- end -}}
{{- define "mixingx-sso.image" -}}
{{- $registry := required "global.imageRegistry is required" .registry -}}
{{- $repository := required "image.repository is required" .image.repository -}}
{{- $tag := required "image.tag is required" .image.tag -}}
{{- printf "%s/%s:%s" (trimSuffix "/" $registry) (trimPrefix "/" $repository) ($tag | toString) -}}
{{- end -}}
{{- define "mixingx-sso.configData" -}}
{{- $root := . -}}
{{- $name := $root.Values.sso.name -}}
+15 -3
View File
@@ -30,8 +30,11 @@ spec:
{{ include "mixingx-sso.tierAffinity" (dict "role" $role "root" $root) | nindent 6 }}
containers:
- name: {{ $name }}
image: {{ $root.Values.registry }}/{{ $root.Values.images.sso.repository | default "sso" }}:{{ $root.Values.images.sso.tag | default $root.Values.tag | default "latest" }}
image: {{ include "mixingx-sso.image" (dict "registry" $root.Values.global.imageRegistry "image" $root.Values.images.sso) | quote }}
imagePullPolicy: IfNotPresent
securityContext:
appArmorProfile:
type: Unconfined
ports:
- name: http
containerPort: {{ $backendPort }}
@@ -128,7 +131,7 @@ spec:
{{ include "mixingx-sso.tierAffinity" (dict "role" "web" "root" $root) | nindent 6 }}
containers:
- name: {{ $webName }}
image: {{ $root.Values.registry }}/{{ $root.Values.images.ssoWeb.repository | default "sso-web" }}:{{ $root.Values.images.ssoWeb.tag | default $root.Values.tag | default "latest" }}
image: {{ include "mixingx-sso.image" (dict "registry" $root.Values.global.imageRegistry "image" $root.Values.images.ssoWeb) | quote }}
imagePullPolicy: IfNotPresent
ports:
- name: http
@@ -190,9 +193,18 @@ spec:
app.kubernetes.io/component: {{ $name }}-postgres
spec:
{{ include "mixingx-sso.tierAffinity" (dict "role" $role "root" $root) | nindent 6 }}
# postgres 以专用用户直跑,绕过镜像内 gosu(新内核下 gosu 用户态死循环,
# 见 ADR/工单:kernel 7.0.0-39+ × gosu 兼容 bug;三件套缺一不可)
securityContext:
runAsUser: 999
runAsGroup: 999
fsGroup: 999
containers:
- name: postgres
image: {{ $root.Values.sharedInfra.postgres.image | default "docker.io/library/postgres:17" }}
command: ["docker-entrypoint.sh", "postgres"]
securityContext:
privileged: true
image: {{ include "mixingx-sso.image" (dict "registry" $root.Values.global.imageRegistry "image" $root.Values.images.postgres) | quote }}
imagePullPolicy: IfNotPresent
env:
- name: POSTGRES_PASSWORD
+6 -9
View File
@@ -1,5 +1,6 @@
registry: 192.168.1.105:8888/mixingx
tag: latest
global:
imageRegistry: ""
timezone: Asia/Shanghai
storage:
@@ -7,7 +8,6 @@ storage:
sharedInfra:
postgres:
image: docker.io/library/postgres:17
username: postgres
password: "Admin12345"
port: 5432
@@ -42,9 +42,6 @@ audit:
brokerUrl: "mqtt://audit-nanomq-service:1883"
images:
sso:
repository: sso
tag: ""
ssoWeb:
repository: sso-web
tag: ""
sso: { repository: sso, tag: "" }
ssoWeb: { repository: sso-web, tag: "" }
postgres: { repository: postgres, tag: "17" }
@@ -2,6 +2,13 @@
{{- .Values.storage.className | default "local-path" -}}
{{- end -}}
{{- define "mixingx-ultra.image" -}}
{{- $registry := required "global.imageRegistry is required" .registry -}}
{{- $repository := required "image.repository is required" .image.repository -}}
{{- $tag := required "image.tag is required" .image.tag -}}
{{- printf "%s/%s:%s" (trimSuffix "/" $registry) (trimPrefix "/" $repository) ($tag | toString) -}}
{{- end -}}
{{- define "mixingx-ultra.configData" -}}
{{- $root := . -}}
{{- $cfg := $root.Values.ultra -}}
@@ -35,8 +35,11 @@ spec:
{{ include "mixingx-ultra.tierAffinity" (dict "role" $role "root" $root) | nindent 6 }}
containers:
- name: {{ $name }}
image: {{ $root.Values.registry }}/{{ $root.Values.images.ultra.repository | default "ultra" }}:{{ $root.Values.images.ultra.tag | default $root.Values.tag | default "latest" }}
image: {{ include "mixingx-ultra.image" (dict "registry" $root.Values.global.imageRegistry "image" $root.Values.images.ultra) | quote }}
imagePullPolicy: IfNotPresent
securityContext:
appArmorProfile:
type: Unconfined
ports:
- name: http
containerPort: {{ $port }}
@@ -131,7 +134,7 @@ spec:
{{ include "mixingx-ultra.tierAffinity" (dict "role" $role "root" $root) | nindent 6 }}
containers:
- name: {{ $name }}-web
image: {{ $root.Values.registry }}/{{ $root.Values.images.ultraWeb.repository | default "ultra-web" }}:{{ $root.Values.images.ultraWeb.tag | default $root.Values.tag | default "latest" }}
image: {{ include "mixingx-ultra.image" (dict "registry" $root.Values.global.imageRegistry "image" $root.Values.images.ultraWeb) | quote }}
imagePullPolicy: IfNotPresent
ports:
- name: http
@@ -193,9 +196,18 @@ spec:
app.kubernetes.io/component: {{ $name }}-postgres
spec:
{{ include "mixingx-ultra.tierAffinity" (dict "role" $role "root" $root) | nindent 6 }}
# postgres 以专用用户直跑,绕过镜像内 gosu(新内核下 gosu 用户态死循环,
# 见 ADR/工单:kernel 7.0.0-39+ × gosu 兼容 bug;三件套缺一不可)
securityContext:
runAsUser: 999
runAsGroup: 999
fsGroup: 999
containers:
- name: postgres
image: {{ $root.Values.sharedInfra.postgres.image | default "docker.io/library/postgres:17" }}
command: ["docker-entrypoint.sh", "postgres"]
securityContext:
privileged: true
image: {{ include "mixingx-ultra.image" (dict "registry" $root.Values.global.imageRegistry "image" $root.Values.images.postgres) | quote }}
imagePullPolicy: IfNotPresent
env:
- name: POSTGRES_PASSWORD
+6 -9
View File
@@ -1,5 +1,6 @@
registry: 192.168.1.105:8888/mixingx
tag: latest
global:
imageRegistry: ""
timezone: Asia/Shanghai
storage:
@@ -7,7 +8,6 @@ storage:
sharedInfra:
postgres:
image: docker.io/library/postgres:17
username: postgres
password: "Admin12345"
port: 5432
@@ -25,12 +25,9 @@ sharedInfra:
protocol: grpc
images:
ultra:
repository: ultra
tag: ""
ultraWeb:
repository: ultra-web
tag: ""
ultra: { repository: ultra, tag: "" }
ultraWeb: { repository: ultra-web, tag: "" }
postgres: { repository: postgres, tag: "17" }
ultra:
name: ultra