{{- 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 }}