|
| 1 | +# Copyright (C) 2024 Intel Corporation |
| 2 | +# SPDX-License-Identifier: Apache-2.0 |
| 3 | + |
| 4 | +apiVersion: apps/v1 |
| 5 | +kind: Deployment |
| 6 | +metadata: |
| 7 | + name: {{ include "data-prep.fullname" . }} |
| 8 | + labels: |
| 9 | + {{- include "data-prep.labels" . | nindent 4 }} |
| 10 | +spec: |
| 11 | + replicas: {{ .Values.replicaCount }} |
| 12 | + selector: |
| 13 | + matchLabels: |
| 14 | + {{- include "data-prep.selectorLabels" . | nindent 6 }} |
| 15 | + template: |
| 16 | + metadata: |
| 17 | + {{- with .Values.podAnnotations }} |
| 18 | + annotations: |
| 19 | + {{- toYaml . | nindent 8 }} |
| 20 | + {{- end }} |
| 21 | + labels: |
| 22 | + {{- include "data-prep.selectorLabels" . | nindent 8 }} |
| 23 | + spec: |
| 24 | + {{- with .Values.imagePullSecrets }} |
| 25 | + imagePullSecrets: |
| 26 | + {{- toYaml . | nindent 8 }} |
| 27 | + {{- end }} |
| 28 | + securityContext: |
| 29 | + {{- toYaml .Values.podSecurityContext | nindent 8 }} |
| 30 | + containers: |
| 31 | + - name: {{ .Release.Name }} |
| 32 | + env: |
| 33 | + - name: TEI_ENDPOINT |
| 34 | + {{- if .Values.TEI_EMBEDDING_ENDPOINT }} |
| 35 | + value: {{ .Values.TEI_EMBEDDING_ENDPOINT | quote}} |
| 36 | + {{- else }} |
| 37 | + value: "http://{{ .Release.Name }}-tei" |
| 38 | + {{- end }} |
| 39 | + - name: REDIS_URL |
| 40 | + {{- if .Values.REDIS_URL }} |
| 41 | + value: {{ .Values.REDIS_URL | quote}} |
| 42 | + {{- else }} |
| 43 | + value: "redis://{{ .Release.Name }}-redis-vector-db:6379" |
| 44 | + {{- end }} |
| 45 | + - name: INDEX_NAME |
| 46 | + value: "rag-redis" |
| 47 | + - name: HUGGINGFACEHUB_API_TOKEN |
| 48 | + value: {{ .Values.global.HUGGINGFACEHUB_API_TOKEN | quote}} |
| 49 | + - name: HF_HOME |
| 50 | + value: "/tmp/.cache/huggingface" |
| 51 | + - name: http_proxy |
| 52 | + value: {{ .Values.global.http_proxy }} |
| 53 | + - name: https_proxy |
| 54 | + value: {{ .Values.global.https_proxy }} |
| 55 | + - name: no_proxy |
| 56 | + value: {{ .Values.global.no_proxy }} |
| 57 | + - name: LANGCHAIN_TRACING_V2 |
| 58 | + value: {{ .Values.global.LANGCHAIN_TRACING_V2 | quote }} |
| 59 | + - name: LANGCHAIN_API_KEY |
| 60 | + value: {{ .Values.global.LANGCHAIN_API_KEY }} |
| 61 | + - name: LANGCHAIN_PROJECT |
| 62 | + value: "opea-dataprep-service" |
| 63 | + securityContext: |
| 64 | + {{- toYaml .Values.securityContext | nindent 12 }} |
| 65 | + image: "{{ .Values.image.repository }}" |
| 66 | + imagePullPolicy: {{ .Values.image.pullPolicy }} |
| 67 | + ports: |
| 68 | + - name: data-prep |
| 69 | + containerPort: 6007 |
| 70 | + protocol: TCP |
| 71 | + volumeMounts: |
| 72 | + - mountPath: /tmp |
| 73 | + name: tmp |
| 74 | +# livenessProbe: |
| 75 | +# httpGet: |
| 76 | +# path: / |
| 77 | +# port: 7000 |
| 78 | +# readinessProbe: |
| 79 | +# httpGet: |
| 80 | +# path: / |
| 81 | +# port: 7000 |
| 82 | + resources: |
| 83 | + {{- toYaml .Values.resources | nindent 12 }} |
| 84 | + volumes: |
| 85 | + - name: tmp |
| 86 | + emptyDir: {} |
| 87 | + {{- with .Values.nodeSelector }} |
| 88 | + nodeSelector: |
| 89 | + {{- toYaml . | nindent 8 }} |
| 90 | + {{- end }} |
| 91 | + {{- with .Values.affinity }} |
| 92 | + affinity: |
| 93 | + {{- toYaml . | nindent 8 }} |
| 94 | + {{- end }} |
| 95 | + {{- with .Values.tolerations }} |
| 96 | + tolerations: |
| 97 | + {{- toYaml . | nindent 8 }} |
| 98 | + {{- end }} |
0 commit comments