Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0a451f6070 | ||
|
|
407aef89e1 | ||
|
|
d7366869ed |
No files matched your search
@@ -27,14 +27,32 @@
|
|||||||
CI 只对 `release-charts/` 做 lint/template(见 hub `.drone.yml`):
|
CI 只对 `release-charts/` 做 lint/template(见 hub `.drone.yml`):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
helm lint release-charts/mixingx-edge-unit
|
helm lint release-charts/mixingx-edge-unit \
|
||||||
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
|
||||||
|
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 部署
|
### ArgoCD 部署
|
||||||
|
|
||||||
`mixingx-deploy` 的 ApplicationSet 按 unit chart 逐个发布,每个 edge/agent 一个独立 Helm release。详见 `mixingx-deploy/`。
|
`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) — 全项目指南
|
- hub [AGENTS.md](https://gitee.com/mixing-tech/mixingx.hub) — 全项目指南
|
||||||
|
|||||||
@@ -22,6 +22,13 @@
|
|||||||
{{- printf "/%s-%s" .Values.role (.Values.site | toString) -}}
|
{{- printf "/%s-%s" .Values.role (.Values.site | toString) -}}
|
||||||
{{- end -}}
|
{{- 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" -}}
|
{{- define "mixingx-unit.storageClassName" -}}
|
||||||
{{- .Values.storage.className | default "local-path" -}}
|
{{- .Values.storage.className | default "local-path" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|||||||
@@ -79,12 +79,11 @@ spec:
|
|||||||
readOnly: true
|
readOnly: true
|
||||||
containers:
|
containers:
|
||||||
- name: {{ $name }}
|
- name: {{ $name }}
|
||||||
{{ $backendImg := .Values.images.backend }}
|
image: {{ include "mixingx-agent-unit.image" (dict "registry" .Values.global.imageRegistry "image" .Values.images.agent) | quote }}
|
||||||
{{ $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 }}
|
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
|
securityContext:
|
||||||
|
appArmorProfile:
|
||||||
|
type: Unconfined
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
containerPort: {{ .Values.ports.backend }}
|
containerPort: {{ .Values.ports.backend }}
|
||||||
@@ -193,11 +192,7 @@ spec:
|
|||||||
{{ include "mixingx-unit.followerScheduling" . | nindent 6 }}
|
{{ include "mixingx-unit.followerScheduling" . | nindent 6 }}
|
||||||
containers:
|
containers:
|
||||||
- name: {{ $webName }}
|
- name: {{ $webName }}
|
||||||
{{ $frontendImg := .Values.images.frontend }}
|
image: {{ include "mixingx-agent-unit.image" (dict "registry" .Values.global.imageRegistry "image" .Values.images.agentWeb) | quote }}
|
||||||
{{ $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 }}
|
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
@@ -261,9 +256,18 @@ spec:
|
|||||||
app.kubernetes.io/component: {{ $name }}-postgres
|
app.kubernetes.io/component: {{ $name }}-postgres
|
||||||
spec:
|
spec:
|
||||||
{{ include "mixingx-unit.followerScheduling" . | nindent 6 }}
|
{{ 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:
|
containers:
|
||||||
- name: postgres
|
- 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
|
imagePullPolicy: IfNotPresent
|
||||||
env:
|
env:
|
||||||
- name: POSTGRES_PASSWORD
|
- name: POSTGRES_PASSWORD
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
registry: 192.168.1.105:8888/mixingx
|
global:
|
||||||
tag: latest
|
imageRegistry: ""
|
||||||
|
|
||||||
timezone: Asia/Shanghai
|
timezone: Asia/Shanghai
|
||||||
|
|
||||||
role: agent
|
role: agent
|
||||||
@@ -10,17 +11,9 @@ phaseType: "" # 工序类型(对应 apphost 的 AGENT_PHASE_TYPE,如 DieC
|
|||||||
database: ""
|
database: ""
|
||||||
|
|
||||||
images:
|
images:
|
||||||
backend:
|
agent: { repository: agent, tag: "" }
|
||||||
repository: agent
|
agentWeb: { repository: agent-web, tag: "" }
|
||||||
tag: ""
|
postgres: { repository: postgres, tag: "17" }
|
||||||
frontend:
|
|
||||||
repository: agent-web
|
|
||||||
tag: ""
|
|
||||||
postgres:
|
|
||||||
repository: docker.io/library/postgres
|
|
||||||
tag: "17"
|
|
||||||
agent: {}
|
|
||||||
agentWeb: {}
|
|
||||||
|
|
||||||
ports:
|
ports:
|
||||||
backend: 8080
|
backend: 8080
|
||||||
|
|||||||
@@ -2,6 +2,13 @@
|
|||||||
{{- .Values.storage.className | default "local-path" -}}
|
{{- .Values.storage.className | default "local-path" -}}
|
||||||
{{- end -}}
|
{{- 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" -}}
|
{{- define "mixingx-audit.tierAffinity" -}}
|
||||||
{{- $root := .root -}}
|
{{- $root := .root -}}
|
||||||
{{- $role := .role -}}
|
{{- $role := .role -}}
|
||||||
|
|||||||
@@ -32,9 +32,18 @@ spec:
|
|||||||
app.kubernetes.io/component: {{ .Values.audit.database }}-postgres
|
app.kubernetes.io/component: {{ .Values.audit.database }}-postgres
|
||||||
spec:
|
spec:
|
||||||
{{ include "mixingx-audit.tierAffinity" (dict "role" "audit" "root" $root) | nindent 6 }}
|
{{ 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:
|
containers:
|
||||||
- name: postgres
|
- 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
|
imagePullPolicy: IfNotPresent
|
||||||
env:
|
env:
|
||||||
- name: POSTGRES_PASSWORD
|
- name: POSTGRES_PASSWORD
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ spec:
|
|||||||
{{ include "mixingx-audit.tierAffinity" (dict "role" "audit" "root" $root) | nindent 6 }}
|
{{ include "mixingx-audit.tierAffinity" (dict "role" "audit" "root" $root) | nindent 6 }}
|
||||||
containers:
|
containers:
|
||||||
- name: nanomq
|
- 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
|
imagePullPolicy: IfNotPresent
|
||||||
command: ["/bin/sh"]
|
command: ["/bin/sh"]
|
||||||
args:
|
args:
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ spec:
|
|||||||
{{ include "mixingx-audit.tierAffinity" (dict "role" "audit" "root" $root) | nindent 6 }}
|
{{ include "mixingx-audit.tierAffinity" (dict "role" "audit" "root" $root) | nindent 6 }}
|
||||||
containers:
|
containers:
|
||||||
- name: audit-web
|
- 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
|
imagePullPolicy: IfNotPresent
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ spec:
|
|||||||
{{ include "mixingx-audit.tierAffinity" (dict "role" "audit" "root" $root) | nindent 6 }}
|
{{ include "mixingx-audit.tierAffinity" (dict "role" "audit" "root" $root) | nindent 6 }}
|
||||||
containers:
|
containers:
|
||||||
- name: audit
|
- 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
|
imagePullPolicy: IfNotPresent
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
registry: 192.168.1.105:8888/mixingx
|
global:
|
||||||
tag: latest
|
imageRegistry: ""
|
||||||
|
|
||||||
timezone: Asia/Shanghai
|
timezone: Asia/Shanghai
|
||||||
|
|
||||||
storage:
|
storage:
|
||||||
@@ -7,7 +8,6 @@ storage:
|
|||||||
|
|
||||||
sharedInfra:
|
sharedInfra:
|
||||||
postgres:
|
postgres:
|
||||||
image: docker.io/library/postgres:17
|
|
||||||
username: postgres
|
username: postgres
|
||||||
password: "Admin12345"
|
password: "Admin12345"
|
||||||
port: 5432
|
port: 5432
|
||||||
@@ -28,7 +28,6 @@ audit:
|
|||||||
ssoBaseUrl: "http://sso-service:8080"
|
ssoBaseUrl: "http://sso-service:8080"
|
||||||
# 中心 Audit Broker(ADR-0048)与 audit 专属 PostgreSQL 随本 chart 发布(ADR-0065)
|
# 中心 Audit Broker(ADR-0048)与 audit 专属 PostgreSQL 随本 chart 发布(ADR-0065)
|
||||||
mqtt:
|
mqtt:
|
||||||
image: "emqx/nanomq:0.25.2-2"
|
|
||||||
brokerHost: "audit-nanomq-service"
|
brokerHost: "audit-nanomq-service"
|
||||||
brokerPort: 1883
|
brokerPort: 1883
|
||||||
managementPort: 8081
|
managementPort: 8081
|
||||||
@@ -42,12 +41,10 @@ audit:
|
|||||||
concurrency: 4
|
concurrency: 4
|
||||||
|
|
||||||
images:
|
images:
|
||||||
audit:
|
audit: { repository: audit, tag: "" }
|
||||||
repository: audit
|
auditWeb: { repository: audit-web, tag: "" }
|
||||||
tag: ""
|
postgres: { repository: postgres, tag: "17" }
|
||||||
auditWeb:
|
nanomq: { repository: nanomq, tag: "0.25.2-2" }
|
||||||
repository: audit-web
|
|
||||||
tag: ""
|
|
||||||
|
|
||||||
tier:
|
tier:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|||||||
@@ -43,6 +43,13 @@ AuditMqttPublisher__NodeId: "{{ .Values.audit.publisher.nodeId | default $name }
|
|||||||
{{- printf "/%s-%s" .Values.role (.Values.site | toString) -}}
|
{{- printf "/%s-%s" .Values.role (.Values.site | toString) -}}
|
||||||
{{- end -}}
|
{{- 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" -}}
|
{{- define "mixingx-unit.storageClassName" -}}
|
||||||
{{- .Values.storage.className | default "local-path" -}}
|
{{- .Values.storage.className | default "local-path" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ spec:
|
|||||||
{{ include "mixingx-unit.backendScheduling" . | nindent 6 }}
|
{{ include "mixingx-unit.backendScheduling" . | nindent 6 }}
|
||||||
containers:
|
containers:
|
||||||
- name: nanomq
|
- 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
|
imagePullPolicy: IfNotPresent
|
||||||
ports:
|
ports:
|
||||||
- name: mqtt
|
- name: mqtt
|
||||||
|
|||||||
@@ -57,12 +57,11 @@ spec:
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
containers:
|
containers:
|
||||||
- name: {{ $name }}
|
- name: {{ $name }}
|
||||||
{{ $backendImg := .Values.images.backend }}
|
image: {{ include "mixingx-edge-unit.image" (dict "registry" .Values.global.imageRegistry "image" .Values.images.edge) | quote }}
|
||||||
{{ $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 }}
|
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
|
securityContext:
|
||||||
|
appArmorProfile:
|
||||||
|
type: Unconfined
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
containerPort: {{ .Values.ports.backend }}
|
containerPort: {{ .Values.ports.backend }}
|
||||||
@@ -169,11 +168,7 @@ spec:
|
|||||||
{{ include "mixingx-unit.followerScheduling" . | nindent 6 }}
|
{{ include "mixingx-unit.followerScheduling" . | nindent 6 }}
|
||||||
containers:
|
containers:
|
||||||
- name: {{ $webName }}
|
- name: {{ $webName }}
|
||||||
{{ $frontendImg := .Values.images.frontend }}
|
image: {{ include "mixingx-edge-unit.image" (dict "registry" .Values.global.imageRegistry "image" .Values.images.edgeWeb) | quote }}
|
||||||
{{ $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 }}
|
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
registry: 192.168.1.105:8888/mixingx
|
global:
|
||||||
tag: latest
|
imageRegistry: ""
|
||||||
|
|
||||||
timezone: Asia/Shanghai
|
timezone: Asia/Shanghai
|
||||||
|
|
||||||
role: edge
|
role: edge
|
||||||
@@ -9,14 +10,9 @@ serviceId: ""
|
|||||||
idWorkerId: 17
|
idWorkerId: 17
|
||||||
|
|
||||||
images:
|
images:
|
||||||
backend:
|
edge: { repository: edge, tag: "" }
|
||||||
repository: edge
|
edgeWeb: { repository: edge-web, tag: "" }
|
||||||
tag: ""
|
nanomq: { repository: nanomq, tag: "0.25.2-2" }
|
||||||
frontend:
|
|
||||||
repository: edge-web
|
|
||||||
tag: ""
|
|
||||||
edge: {}
|
|
||||||
edgeWeb: {}
|
|
||||||
|
|
||||||
ports:
|
ports:
|
||||||
backend: 8080
|
backend: 8080
|
||||||
@@ -62,9 +58,6 @@ sharedInfra:
|
|||||||
|
|
||||||
mqtt:
|
mqtt:
|
||||||
enabled: true
|
enabled: true
|
||||||
image:
|
|
||||||
repository: emqx/nanomq
|
|
||||||
tag: 0.25.2-2
|
|
||||||
port: 1883
|
port: 1883
|
||||||
wsPort: 8083 # WebSocket listener(NanoMQ 镜像默认开启,路径 /mqtt),供 MQTTX Web 连接
|
wsPort: 8083 # WebSocket listener(NanoMQ 镜像默认开启,路径 /mqtt),供 MQTTX Web 连接
|
||||||
credentialRef: "" # 默认空,模板内 default 为 {name}-mqtt
|
credentialRef: "" # 默认空,模板内 default 为 {name}-mqtt
|
||||||
|
|||||||
@@ -2,6 +2,13 @@
|
|||||||
{{- .Values.storage.className | default "local-path" -}}
|
{{- .Values.storage.className | default "local-path" -}}
|
||||||
{{- end -}}
|
{{- 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" -}}
|
{{- define "mixingx-gateway.tierAffinity" -}}
|
||||||
{{- $root := .root -}}
|
{{- $root := .root -}}
|
||||||
{{- $role := .role -}}
|
{{- $role := .role -}}
|
||||||
|
|||||||
@@ -28,8 +28,11 @@ spec:
|
|||||||
{{ include "mixingx-gateway.tierAffinity" (dict "role" "gateway" "root" $) | nindent 6 }}
|
{{ include "mixingx-gateway.tierAffinity" (dict "role" "gateway" "root" $) | nindent 6 }}
|
||||||
containers:
|
containers:
|
||||||
- name: gateway
|
- 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
|
imagePullPolicy: IfNotPresent
|
||||||
|
securityContext:
|
||||||
|
appArmorProfile:
|
||||||
|
type: Unconfined
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
containerPort: {{ .Values.gateway.port | default 8080 }}
|
containerPort: {{ .Values.gateway.port | default 8080 }}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
registry: 192.168.1.119:8888/mixingx
|
global:
|
||||||
tag: latest
|
imageRegistry: ""
|
||||||
|
|
||||||
timezone: Asia/Shanghai
|
timezone: Asia/Shanghai
|
||||||
|
|
||||||
storage:
|
storage:
|
||||||
|
|||||||
@@ -2,6 +2,13 @@
|
|||||||
{{- .Values.storage.className | default "local-path" -}}
|
{{- .Values.storage.className | default "local-path" -}}
|
||||||
{{- end -}}
|
{{- 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" -}}
|
{{- define "mixingx-infra.tierAffinity" -}}
|
||||||
{{- $root := .root -}}
|
{{- $root := .root -}}
|
||||||
{{- $role := .role -}}
|
{{- $role := .role -}}
|
||||||
|
|||||||
@@ -33,7 +33,8 @@ spec:
|
|||||||
{{ include "mixingx-infra.tierAffinity" (dict "role" "sharedDatastores" "root" $root) | nindent 6 }}
|
{{ include "mixingx-infra.tierAffinity" (dict "role" "sharedDatastores" "root" $root) | nindent 6 }}
|
||||||
containers:
|
containers:
|
||||||
- name: {{ .name }}
|
- 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
|
imagePullPolicy: IfNotPresent
|
||||||
ports:
|
ports:
|
||||||
- name: tcp
|
- name: tcp
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
registry: 192.168.1.105:8888/mixingx
|
global:
|
||||||
tag: latest
|
imageRegistry: ""
|
||||||
|
|
||||||
timezone: Asia/Shanghai
|
timezone: Asia/Shanghai
|
||||||
|
|
||||||
storage:
|
storage:
|
||||||
@@ -7,7 +8,6 @@ storage:
|
|||||||
|
|
||||||
sharedInfra:
|
sharedInfra:
|
||||||
postgres:
|
postgres:
|
||||||
image: docker.io/library/postgres:17
|
|
||||||
username: postgres
|
username: postgres
|
||||||
password: "Admin12345"
|
password: "Admin12345"
|
||||||
port: 5432
|
port: 5432
|
||||||
@@ -36,19 +36,25 @@ tier:
|
|||||||
services:
|
services:
|
||||||
sharedDatastores: { mode: required, tiers: [infra] }
|
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:
|
sharedDatastores:
|
||||||
- name: redis
|
- name: redis
|
||||||
image: docker.io/library/redis:8.6
|
image: redis
|
||||||
port: 6379
|
port: 6379
|
||||||
storage: 2Gi
|
storage: 2Gi
|
||||||
mountPath: /data
|
mountPath: /data
|
||||||
- name: mongo
|
- name: mongo
|
||||||
image: docker.io/library/mongo:8.3
|
image: mongo
|
||||||
port: 27017
|
port: 27017
|
||||||
storage: 5Gi
|
storage: 5Gi
|
||||||
mountPath: /data/db
|
mountPath: /data/db
|
||||||
- name: messaging
|
- name: messaging
|
||||||
image: docker.io/library/rabbitmq:4.3-management
|
image: rabbitmq
|
||||||
port: 5672
|
port: 5672
|
||||||
storage: 2Gi
|
storage: 2Gi
|
||||||
mountPath: /var/lib/rabbitmq
|
mountPath: /var/lib/rabbitmq
|
||||||
@@ -4,3 +4,10 @@
|
|||||||
{{- define "mixingx-mqttx.name" -}}
|
{{- define "mixingx-mqttx.name" -}}
|
||||||
{{- .Values.mqttx.name | default "mqttx" -}}
|
{{- .Values.mqttx.name | default "mqttx" -}}
|
||||||
{{- end -}}
|
{{- 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:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: {{ $name }}
|
- 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
|
imagePullPolicy: IfNotPresent
|
||||||
# emqx/mqttx-web 镜像默认 http-server 未显式绑 0.0.0.0,导致只听 loopback、
|
# emqx/mqttx-web 镜像默认 http-server 未显式绑 0.0.0.0,导致只听 loopback、
|
||||||
# Service/Pod IP 进不来。显式覆盖启动参数,强制监听所有接口。
|
# Service/Pod IP 进不来。显式覆盖启动参数,强制监听所有接口。
|
||||||
|
|||||||
@@ -9,14 +9,17 @@
|
|||||||
#
|
#
|
||||||
# Ingress:demo 环境有 *.mixingx.local DNS,用 host 暴露;无 DNS 的现场改用 NodePort。
|
# Ingress:demo 环境有 *.mixingx.local DNS,用 host 暴露;无 DNS 的现场改用 NodePort。
|
||||||
|
|
||||||
|
global:
|
||||||
|
imageRegistry: ""
|
||||||
|
|
||||||
timezone: Asia/Shanghai
|
timezone: Asia/Shanghai
|
||||||
|
|
||||||
mqttx:
|
mqttx:
|
||||||
name: mqttx
|
name: mqttx
|
||||||
replicas: 1
|
replicas: 1
|
||||||
image:
|
image:
|
||||||
repository: emqx/mqttx-web
|
repository: mqttx-web
|
||||||
tag: latest
|
tag: ""
|
||||||
description: "MQTT 监控客户端"
|
description: "MQTT 监控客户端"
|
||||||
|
|
||||||
ingress:
|
ingress:
|
||||||
|
|||||||
@@ -2,6 +2,13 @@
|
|||||||
{{- .Values.storage.className | default "local-path" -}}
|
{{- .Values.storage.className | default "local-path" -}}
|
||||||
{{- end -}}
|
{{- 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" -}}
|
{{- define "mixingx-platform.tierAffinity" -}}
|
||||||
{{- $root := .root -}}
|
{{- $root := .root -}}
|
||||||
{{- $role := .role -}}
|
{{- $role := .role -}}
|
||||||
|
|||||||
@@ -27,8 +27,12 @@ spec:
|
|||||||
{{ include "mixingx-platform.tierAffinity" (dict "role" .role "root" $root) | nindent 6 }}
|
{{ include "mixingx-platform.tierAffinity" (dict "role" .role "root" $root) | nindent 6 }}
|
||||||
containers:
|
containers:
|
||||||
- name: {{ .name }}
|
- 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
|
imagePullPolicy: IfNotPresent
|
||||||
|
securityContext:
|
||||||
|
appArmorProfile:
|
||||||
|
type: Unconfined
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
containerPort: {{ $port }}
|
containerPort: {{ $port }}
|
||||||
@@ -158,7 +162,8 @@ spec:
|
|||||||
{{ include "mixingx-platform.tierAffinity" (dict "role" .tierRole "root" $root) | nindent 6 }}
|
{{ include "mixingx-platform.tierAffinity" (dict "role" .tierRole "root" $root) | nindent 6 }}
|
||||||
containers:
|
containers:
|
||||||
- name: {{ .name }}
|
- 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
|
imagePullPolicy: IfNotPresent
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
@@ -226,7 +231,7 @@ spec:
|
|||||||
{{ include "mixingx-platform.tierAffinity" (dict "role" .tierRole "root" $root) | nindent 6 }}
|
{{ include "mixingx-platform.tierAffinity" (dict "role" .tierRole "root" $root) | nindent 6 }}
|
||||||
containers:
|
containers:
|
||||||
- name: postgres
|
- 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
|
imagePullPolicy: IfNotPresent
|
||||||
env:
|
env:
|
||||||
- name: POSTGRES_PASSWORD
|
- name: POSTGRES_PASSWORD
|
||||||
|
|||||||
@@ -22,7 +22,8 @@ spec:
|
|||||||
{{ include "mixingx-platform.tierAffinity" (dict "role" "audit" "root" $root) | nindent 6 }}
|
{{ include "mixingx-platform.tierAffinity" (dict "role" "audit" "root" $root) | nindent 6 }}
|
||||||
containers:
|
containers:
|
||||||
- name: audit
|
- 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
|
imagePullPolicy: IfNotPresent
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
@@ -143,7 +144,8 @@ spec:
|
|||||||
{{ include "mixingx-platform.tierAffinity" (dict "role" "audit" "root" $root) | nindent 6 }}
|
{{ include "mixingx-platform.tierAffinity" (dict "role" "audit" "root" $root) | nindent 6 }}
|
||||||
containers:
|
containers:
|
||||||
- name: {{ .Values.audit.webName }}
|
- 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
|
imagePullPolicy: IfNotPresent
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
@@ -206,9 +208,18 @@ spec:
|
|||||||
app.kubernetes.io/component: {{ .Values.audit.database }}-postgres
|
app.kubernetes.io/component: {{ .Values.audit.database }}-postgres
|
||||||
spec:
|
spec:
|
||||||
{{ include "mixingx-platform.tierAffinity" (dict "role" "audit" "root" $root) | nindent 6 }}
|
{{ 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:
|
containers:
|
||||||
- name: postgres
|
- 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
|
imagePullPolicy: IfNotPresent
|
||||||
env:
|
env:
|
||||||
- name: POSTGRES_PASSWORD
|
- name: POSTGRES_PASSWORD
|
||||||
|
|||||||
@@ -33,7 +33,8 @@ spec:
|
|||||||
{{ include "mixingx-platform.tierAffinity" (dict "role" "sharedDatastores" "root" $root) | nindent 6 }}
|
{{ include "mixingx-platform.tierAffinity" (dict "role" "sharedDatastores" "root" $root) | nindent 6 }}
|
||||||
containers:
|
containers:
|
||||||
- name: {{ .name }}
|
- 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
|
imagePullPolicy: IfNotPresent
|
||||||
ports:
|
ports:
|
||||||
- name: tcp
|
- name: tcp
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
registry: 192.168.1.105:8888/mixingx
|
global:
|
||||||
tag: latest
|
imageRegistry: ""
|
||||||
|
|
||||||
timezone: Asia/Shanghai
|
timezone: Asia/Shanghai
|
||||||
|
|
||||||
storage:
|
storage:
|
||||||
@@ -7,7 +8,6 @@ storage:
|
|||||||
|
|
||||||
sharedInfra:
|
sharedInfra:
|
||||||
postgres:
|
postgres:
|
||||||
image: docker.io/library/postgres:17
|
|
||||||
username: postgres
|
username: postgres
|
||||||
password: "Admin12345"
|
password: "Admin12345"
|
||||||
port: 5432
|
port: 5432
|
||||||
@@ -40,12 +40,26 @@ tier:
|
|||||||
audit: { mode: required, tiers: [infra] }
|
audit: { mode: required, tiers: [infra] }
|
||||||
sharedDatastores: { 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:
|
standalones:
|
||||||
- name: sso
|
- name: sso
|
||||||
image: sso
|
image: sso
|
||||||
role: sso
|
role: sso
|
||||||
webName: sso-web
|
webName: sso-web
|
||||||
webImage: sso-web
|
webImage: ssoWeb
|
||||||
webBasePath: /sso/
|
webBasePath: /sso/
|
||||||
serviceId: sso
|
serviceId: sso
|
||||||
database: sso-db
|
database: sso-db
|
||||||
@@ -57,7 +71,7 @@ standalones:
|
|||||||
image: ultra
|
image: ultra
|
||||||
role: ultra
|
role: ultra
|
||||||
webName: ultra-web
|
webName: ultra-web
|
||||||
webImage: ultra-web
|
webImage: ultraWeb
|
||||||
webBasePath: /ultra/
|
webBasePath: /ultra/
|
||||||
serviceId: ultra
|
serviceId: ultra
|
||||||
database: ultra-db
|
database: ultra-db
|
||||||
@@ -77,7 +91,7 @@ audit:
|
|||||||
port: 5900
|
port: 5900
|
||||||
replicas: 2
|
replicas: 2
|
||||||
webName: audit-web
|
webName: audit-web
|
||||||
webImage: audit-web
|
webImage: auditWeb
|
||||||
webBasePath: /audit/
|
webBasePath: /audit/
|
||||||
webPort: 8900
|
webPort: 8900
|
||||||
database: audit-db
|
database: audit-db
|
||||||
@@ -96,22 +110,22 @@ audit:
|
|||||||
|
|
||||||
sharedDatastores:
|
sharedDatastores:
|
||||||
- name: redis
|
- name: redis
|
||||||
image: docker.io/library/redis:8.6
|
image: redis
|
||||||
port: 6379
|
port: 6379
|
||||||
storage: 2Gi
|
storage: 2Gi
|
||||||
mountPath: /data
|
mountPath: /data
|
||||||
- name: mongo
|
- name: mongo
|
||||||
image: docker.io/library/mongo:8.3
|
image: mongo
|
||||||
port: 27017
|
port: 27017
|
||||||
storage: 5Gi
|
storage: 5Gi
|
||||||
mountPath: /data/db
|
mountPath: /data/db
|
||||||
- name: messaging
|
- name: messaging
|
||||||
image: docker.io/library/rabbitmq:4.3-management
|
image: rabbitmq
|
||||||
port: 5672
|
port: 5672
|
||||||
storage: 2Gi
|
storage: 2Gi
|
||||||
mountPath: /var/lib/rabbitmq
|
mountPath: /var/lib/rabbitmq
|
||||||
- name: audit-nanomq
|
- name: audit-nanomq
|
||||||
image: emqx/nanomq:0.25.2-2
|
image: nanomq
|
||||||
port: 1883
|
port: 1883
|
||||||
storage: 1Gi
|
storage: 1Gi
|
||||||
mountPath: /var/lib/nanomq
|
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 }}
|
{{- $proto := index .Values.images.protocol .Values.type }}
|
||||||
containers:
|
containers:
|
||||||
- name: protocol-server
|
- 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 }}
|
imagePullPolicy: {{ .Values.imagePullPolicy }}
|
||||||
args:
|
args:
|
||||||
- "--port"
|
- "--port"
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
registry: 192.168.1.105:8888/mixingx
|
global:
|
||||||
tag: latest
|
imageRegistry: ""
|
||||||
|
|
||||||
timezone: Asia/Shanghai
|
timezone: Asia/Shanghai
|
||||||
|
|
||||||
# Legacy image override (kept for backward compatibility).
|
# Legacy image override (kept for backward compatibility).
|
||||||
|
|||||||
@@ -2,6 +2,13 @@
|
|||||||
{{- .Values.storage.className | default "local-path" -}}
|
{{- .Values.storage.className | default "local-path" -}}
|
||||||
{{- end -}}
|
{{- 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" -}}
|
{{- define "mixingx-sso.configData" -}}
|
||||||
{{- $root := . -}}
|
{{- $root := . -}}
|
||||||
{{- $name := $root.Values.sso.name -}}
|
{{- $name := $root.Values.sso.name -}}
|
||||||
|
|||||||
@@ -30,8 +30,11 @@ spec:
|
|||||||
{{ include "mixingx-sso.tierAffinity" (dict "role" $role "root" $root) | nindent 6 }}
|
{{ include "mixingx-sso.tierAffinity" (dict "role" $role "root" $root) | nindent 6 }}
|
||||||
containers:
|
containers:
|
||||||
- name: {{ $name }}
|
- 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
|
imagePullPolicy: IfNotPresent
|
||||||
|
securityContext:
|
||||||
|
appArmorProfile:
|
||||||
|
type: Unconfined
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
containerPort: {{ $backendPort }}
|
containerPort: {{ $backendPort }}
|
||||||
@@ -128,7 +131,7 @@ spec:
|
|||||||
{{ include "mixingx-sso.tierAffinity" (dict "role" "web" "root" $root) | nindent 6 }}
|
{{ include "mixingx-sso.tierAffinity" (dict "role" "web" "root" $root) | nindent 6 }}
|
||||||
containers:
|
containers:
|
||||||
- name: {{ $webName }}
|
- 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
|
imagePullPolicy: IfNotPresent
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
@@ -190,9 +193,18 @@ spec:
|
|||||||
app.kubernetes.io/component: {{ $name }}-postgres
|
app.kubernetes.io/component: {{ $name }}-postgres
|
||||||
spec:
|
spec:
|
||||||
{{ include "mixingx-sso.tierAffinity" (dict "role" $role "root" $root) | nindent 6 }}
|
{{ 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:
|
containers:
|
||||||
- name: postgres
|
- 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
|
imagePullPolicy: IfNotPresent
|
||||||
env:
|
env:
|
||||||
- name: POSTGRES_PASSWORD
|
- name: POSTGRES_PASSWORD
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
registry: 192.168.1.105:8888/mixingx
|
global:
|
||||||
tag: latest
|
imageRegistry: ""
|
||||||
|
|
||||||
timezone: Asia/Shanghai
|
timezone: Asia/Shanghai
|
||||||
|
|
||||||
storage:
|
storage:
|
||||||
@@ -7,7 +8,6 @@ storage:
|
|||||||
|
|
||||||
sharedInfra:
|
sharedInfra:
|
||||||
postgres:
|
postgres:
|
||||||
image: docker.io/library/postgres:17
|
|
||||||
username: postgres
|
username: postgres
|
||||||
password: "Admin12345"
|
password: "Admin12345"
|
||||||
port: 5432
|
port: 5432
|
||||||
@@ -42,9 +42,6 @@ audit:
|
|||||||
brokerUrl: "mqtt://audit-nanomq-service:1883"
|
brokerUrl: "mqtt://audit-nanomq-service:1883"
|
||||||
|
|
||||||
images:
|
images:
|
||||||
sso:
|
sso: { repository: sso, tag: "" }
|
||||||
repository: sso
|
ssoWeb: { repository: sso-web, tag: "" }
|
||||||
tag: ""
|
postgres: { repository: postgres, tag: "17" }
|
||||||
ssoWeb:
|
|
||||||
repository: sso-web
|
|
||||||
tag: ""
|
|
||||||
@@ -2,6 +2,13 @@
|
|||||||
{{- .Values.storage.className | default "local-path" -}}
|
{{- .Values.storage.className | default "local-path" -}}
|
||||||
{{- end -}}
|
{{- 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" -}}
|
{{- define "mixingx-ultra.configData" -}}
|
||||||
{{- $root := . -}}
|
{{- $root := . -}}
|
||||||
{{- $cfg := $root.Values.ultra -}}
|
{{- $cfg := $root.Values.ultra -}}
|
||||||
|
|||||||
@@ -35,8 +35,11 @@ spec:
|
|||||||
{{ include "mixingx-ultra.tierAffinity" (dict "role" $role "root" $root) | nindent 6 }}
|
{{ include "mixingx-ultra.tierAffinity" (dict "role" $role "root" $root) | nindent 6 }}
|
||||||
containers:
|
containers:
|
||||||
- name: {{ $name }}
|
- 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
|
imagePullPolicy: IfNotPresent
|
||||||
|
securityContext:
|
||||||
|
appArmorProfile:
|
||||||
|
type: Unconfined
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
containerPort: {{ $port }}
|
containerPort: {{ $port }}
|
||||||
@@ -131,7 +134,7 @@ spec:
|
|||||||
{{ include "mixingx-ultra.tierAffinity" (dict "role" $role "root" $root) | nindent 6 }}
|
{{ include "mixingx-ultra.tierAffinity" (dict "role" $role "root" $root) | nindent 6 }}
|
||||||
containers:
|
containers:
|
||||||
- name: {{ $name }}-web
|
- 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
|
imagePullPolicy: IfNotPresent
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
@@ -193,9 +196,18 @@ spec:
|
|||||||
app.kubernetes.io/component: {{ $name }}-postgres
|
app.kubernetes.io/component: {{ $name }}-postgres
|
||||||
spec:
|
spec:
|
||||||
{{ include "mixingx-ultra.tierAffinity" (dict "role" $role "root" $root) | nindent 6 }}
|
{{ 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:
|
containers:
|
||||||
- name: postgres
|
- 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
|
imagePullPolicy: IfNotPresent
|
||||||
env:
|
env:
|
||||||
- name: POSTGRES_PASSWORD
|
- name: POSTGRES_PASSWORD
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
registry: 192.168.1.105:8888/mixingx
|
global:
|
||||||
tag: latest
|
imageRegistry: ""
|
||||||
|
|
||||||
timezone: Asia/Shanghai
|
timezone: Asia/Shanghai
|
||||||
|
|
||||||
storage:
|
storage:
|
||||||
@@ -7,7 +8,6 @@ storage:
|
|||||||
|
|
||||||
sharedInfra:
|
sharedInfra:
|
||||||
postgres:
|
postgres:
|
||||||
image: docker.io/library/postgres:17
|
|
||||||
username: postgres
|
username: postgres
|
||||||
password: "Admin12345"
|
password: "Admin12345"
|
||||||
port: 5432
|
port: 5432
|
||||||
@@ -25,12 +25,9 @@ sharedInfra:
|
|||||||
protocol: grpc
|
protocol: grpc
|
||||||
|
|
||||||
images:
|
images:
|
||||||
ultra:
|
ultra: { repository: ultra, tag: "" }
|
||||||
repository: ultra
|
ultraWeb: { repository: ultra-web, tag: "" }
|
||||||
tag: ""
|
postgres: { repository: postgres, tag: "17" }
|
||||||
ultraWeb:
|
|
||||||
repository: ultra-web
|
|
||||||
tag: ""
|
|
||||||
|
|
||||||
ultra:
|
ultra:
|
||||||
name: ultra
|
name: ultra
|
||||||
|
|||||||
Reference in new issue
Block a user