- 添加global.imageRegistry作为统一镜像仓库地址配置项 - 创建通用image模板函数处理镜像地址拼接逻辑 - 更新所有chart使用新的镜像配置结构 - 在README中添加镜像地址约定说明 - 修改CI命令示例以包含必要的镜像配置参数 - 将硬编码的镜像地址改为通过values动态配置
57 lines
1.5 KiB
YAML
57 lines
1.5 KiB
YAML
{{- if .Values.audit.enabled }}
|
|
{{- $root := $ }}
|
|
---
|
|
# ===== Audit 前端(nginx 静态,生产构建 base 固定 /audit/) =====
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: audit-web-deployment
|
|
labels:
|
|
app.kubernetes.io/name: mixingx
|
|
app.kubernetes.io/component: audit-web
|
|
spec:
|
|
replicas: {{ .Values.audit.replicas | default 2 }}
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/component: audit-web
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/component: audit-web
|
|
spec:
|
|
{{ include "mixingx-audit.tierAffinity" (dict "role" "audit" "root" $root) | nindent 6 }}
|
|
containers:
|
|
- name: audit-web
|
|
image: {{ include "mixingx-audit.image" (dict "registry" .Values.global.imageRegistry "image" .Values.images.auditWeb) | quote }}
|
|
imagePullPolicy: IfNotPresent
|
|
ports:
|
|
- name: http
|
|
containerPort: 80
|
|
protocol: TCP
|
|
env:
|
|
- name: TZ
|
|
value: "{{ $root.Values.timezone | default "Asia/Shanghai" }}"
|
|
- name: VITE_BASE_PATH
|
|
value: "/audit"
|
|
- name: PORT
|
|
value: "80"
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: audit-web-service
|
|
labels:
|
|
app.kubernetes.io/name: mixingx
|
|
app.kubernetes.io/component: audit-web
|
|
mixingx.io/role: web
|
|
mixingx.io/node-id: audit-web
|
|
spec:
|
|
selector:
|
|
app.kubernetes.io/component: audit-web
|
|
ports:
|
|
- name: http
|
|
port: 80
|
|
targetPort: http
|
|
protocol: TCP
|
|
{{- end }}
|