feat: CI/CD 全链路(Drone pipeline + Helm chart + Dockerfile)
重大变更:
- .drone.yml: 4 步 pipeline(submodule init → build 12 镜像 → helm deploy → verify)
- mixingx-chart/: 手写 Helm chart(模式 3,替代 aspire publish)
- 独立 postgres(每服务一个,不再共享)
- 四胞胎架构(agent/edge: 后端+前端+DB podAffinity 同节点)
- pgAdmin(在 K3s 内,管理所有 postgres)
- Aspire Dashboard(OTLP 遥测接收端)
- Dockerfile: 全部服务已补齐(含 gateway/audit 新增)
- apphost.cs: opcua mock publish 模式改 AddDockerfile
- patch-persistence.sh: emptyDir → PVC patch(备用)
submodule 指针更新:
- mixingx.sso: Dockerfile 精准 COPY
- mixingx.edge: opcua Dockerfile 新增
- eau.ultra: MigrateAsync 无条件执行
- mixingx.audit: Dockerfile 新增
- mixingx.gateway: Dockerfile 新增
镜像 tag 规则: {分支}-{时间戳}-[{tag}]
This commit is contained in:
commit
f69c4161b5
19 files changed
+975
No files matched your search
@@ -0,0 +1,89 @@
|
||||
{{/*
|
||||
共享数据层:redis + mongo + rabbitmq
|
||||
所有服务连同一个(StatefulSet + PVC 持久化)
|
||||
postgres 不在这里 — 每个服务有独立的 postgres(见 _postgres.tpl)
|
||||
*/}}
|
||||
{{- range .Values.sharedDatastores }}
|
||||
{{- $root := $ }}
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: {{ .name }}-statefulset
|
||||
labels:
|
||||
app.kubernetes.io/name: mixingx
|
||||
app.kubernetes.io/component: {{ .name }}
|
||||
spec:
|
||||
serviceName: {{ .name }}-service
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/component: {{ .name }}
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: data
|
||||
spec:
|
||||
accessModes: ["ReadWriteOnce"]
|
||||
storageClassName: local-path
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .storage }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: {{ .name }}
|
||||
spec:
|
||||
containers:
|
||||
- name: {{ .name }}
|
||||
image: {{ .image }}
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- name: tcp
|
||||
containerPort: {{ .port }}
|
||||
protocol: TCP
|
||||
{{- if eq .name "redis" }}
|
||||
command: ["/bin/sh"]
|
||||
args:
|
||||
- "-c"
|
||||
- "redis-server --requirepass {{ $root.Values.sharedInfra.redis.password }} --save 60 1"
|
||||
{{- end }}
|
||||
{{- if eq .name "mongo" }}
|
||||
env:
|
||||
- name: MONGO_INITDB_ROOT_USERNAME
|
||||
value: "{{ $root.Values.sharedInfra.mongo.username }}"
|
||||
- name: MONGO_INITDB_ROOT_PASSWORD
|
||||
value: "{{ $root.Values.sharedInfra.mongo.password }}"
|
||||
{{- end }}
|
||||
{{- if eq .name "messaging" }}
|
||||
env:
|
||||
- name: RABBITMQ_DEFAULT_USER
|
||||
value: "{{ $root.Values.sharedInfra.rabbitmq.username }}"
|
||||
- name: RABBITMQ_DEFAULT_PASS
|
||||
value: "{{ $root.Values.sharedInfra.rabbitmq.password }}"
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: {{ .mountPath }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ .name }}-service
|
||||
labels:
|
||||
app.kubernetes.io/name: mixingx
|
||||
app.kubernetes.io/component: {{ .name }}
|
||||
spec:
|
||||
selector:
|
||||
app.kubernetes.io/component: {{ .name }}
|
||||
ports:
|
||||
- name: tcp
|
||||
port: {{ .port }}
|
||||
targetPort: tcp
|
||||
protocol: TCP
|
||||
{{- if eq .name "messaging" }}
|
||||
- name: management
|
||||
port: 15672
|
||||
targetPort: 15672
|
||||
protocol: TCP
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
Reference in new issue
Block a user