Yylzhangahupdate file
9175c74a创建于 2025年10月10日历史提交
{{- if .Values.euler_copilot.rag_web.enabled -}}
---
apiVersion: v1
kind: Service
metadata:
  name: rag-web-service
  namespace: {{ .Release.Namespace }}
spec:
  type: {{ default "ClusterIP" .Values.euler_copilot.rag_web.service.type }}
  selector:
    app: rag-web
  ports:
    - port: 9888
      targetPort: 9888
      nodePort: {{ default nil .Values.euler_copilot.rag_web.service.nodePort }}

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: rag-web-deploy
  namespace: {{ .Release.Namespace }}
  labels:
    app: rag-web
spec:
  replicas: {{ default 1 .Values.globals.replicaCount }}
  selector:
    matchLabels:
      app: rag-web
  template:
    metadata:
      annotations:
        checksum/config: {{ include (print $.Template.BasePath "/rag-web/rag-web-config.yaml") . | sha256sum }}
      labels:
        app: rag-web
    spec:
      automountServiceAccountToken: false
      containers:
        - name: rag-web
          image: {{ .Values.euler_copilot.rag_web.image | default (printf "%s/neocopilot/data_chain_web:0.10.0-%s" (.Values.globals.imageRegistry | default "hub.oepkgs.net") (.Values.globals.arch | default "x86")) }}
          imagePullPolicy: {{ default "IfNotPresent" .Values.globals.imagePullPolicy }}
          ports:
            - containerPort: 9888
              protocol: TCP
          livenessProbe:
            httpGet:
              path: /
              port: 9888
              scheme: HTTP
            failureThreshold: 5
            initialDelaySeconds: 60
            periodSeconds: 90
          env:
            - name: TZ
              value: "Asia/Shanghai"
          volumeMounts:
            - mountPath: /config
              name: rag-web-config-volume
            - mountPath: /var/lib/nginx/tmp
              name: rag-web-tmp
            - mountPath: /opt/.env
              name: rag-web-env-volume
              subPath: .env
          resources:
            requests:
              cpu: 0.05
              memory: 64Mi
            limits:
              {{ toYaml .Values.euler_copilot.rag_web.resourceLimits | nindent 14 }}
      volumes:
        - name: rag-web-config-volume
          emptyDir:
            medium: Memory
        - name: rag-web-env-volume
          configMap:
            name: rag-web-config
        - name: rag-web-tmp
          emptyDir:
            medium: Memory
{{- end -}}