feat(helm): 统一镜像地址配置规范并更新CI示例

- 添加global.imageRegistry作为统一镜像仓库地址配置项
- 创建通用image模板函数处理镜像地址拼接逻辑
- 更新所有chart使用新的镜像配置结构
- 在README中添加镜像地址约定说明
- 修改CI命令示例以包含必要的镜像配置参数
- 将硬编码的镜像地址改为通过values动态配置
This commit is contained in:
王野 committed 2026-11-03 09:52:35 +08:00
1 parent 0c105e5224
commit d7366869ed
37 files changed
+200 -121

No files matched your search

@@ -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: