diff --git a/helm-charts/common/retriever-usvc/README.md b/helm-charts/common/retriever-usvc/README.md index d82ba529f..055e8483f 100644 --- a/helm-charts/common/retriever-usvc/README.md +++ b/helm-charts/common/retriever-usvc/README.md @@ -42,31 +42,6 @@ helm install retriever-usvc . --set TEI_EMBEDDING_ENDPOINT=${TEI_EMBEDDING_ENDPO # helm install retriever-usvc . --set TEI_EMBEDDING_ENDPOINT=${TEI_EMBEDDING_ENDPOINT} --set global.HUGGINGFACEHUB_API_TOKEN=${HF_TOKEN} --set RETRIEVER_BACKEND=${RETRIEVER_BACKEND} --set QDRANT_HOST=${DB_HOST} ``` -### Install the microservice in air gapped(offline) mode - -To support running this microservice in an air gapped environment, users are required to download the `nltk` data to a shared storage. Below is an example for using node level local directory to download the offline data: - -Assuming the `nltk` data is ahred using node-local directory `/mnt/nltk_data`. - -``` -# On every K8s node, run the following command: -export NLTKDATA=/mnt/nltk_data -# Download nltk data, assumes Python nltk module(s) are already installed -python -m nltk.downloader -d $NLTKDATA all && chmod -R a+r $NLTKDATA - -# Install using Helm with the following additional parameters: -# helm install ... ... --set global.offline=true,global.nltkDataUseHostPath=${NLTKDATA} -``` - -Assuming we share the `nltk` data on cluster level using a persistent volume(PV), first we need to create a persistent volume claim(PVC) with name `opea-nltk-pvc`: - -``` -# Download nltk data at the root of the corresponding PV -# Install using Helm with the following additional parameters: -# export NLTKPVC=opea-nltk-pvc -# helm install ... ... --set global.offline=true,global.nltkDataUsePVC=${NLTKPVC} -``` - ## Verify To verify the installation, run the command `kubectl get pod` to make sure all pods are running. diff --git a/helm-charts/common/retriever-usvc/templates/configmap.yaml b/helm-charts/common/retriever-usvc/templates/configmap.yaml index b5a2aea0d..67d0f994a 100644 --- a/helm-charts/common/retriever-usvc/templates/configmap.yaml +++ b/helm-charts/common/retriever-usvc/templates/configmap.yaml @@ -56,7 +56,7 @@ data: http_proxy: {{ .Values.global.http_proxy | quote }} https_proxy: {{ .Values.global.https_proxy | quote }} {{- if and (and (not .Values.MILVUS_HOST ) (not .Values.REDIS_HOST)) (and (not .Values.TEI_EMBEDDING_ENDPOINT) (or .Values.global.http_proxy .Values.global.https_proxy)) }} - no_proxy: "{{ .Release.Name }}-tei,{{ .Release.Name }}-redis-vector-db,{{ .Release.Name }}-milvus,{{ .Values.global.no_proxy }}" + no_proxy: "{{ .Release.Name }}-tei,{{ .Release.Name }}-redis-vector-db,{{ .Release.Name }}-milvus,{{ .Release.Name }}-qdrant,{{ .Values.global.no_proxy }}" {{- else }} no_proxy: {{ tpl .Values.global.no_proxy . | quote }} {{- end }} diff --git a/helm-charts/common/retriever-usvc/templates/deployment.yaml b/helm-charts/common/retriever-usvc/templates/deployment.yaml index 4852a8994..1fa060faa 100644 --- a/helm-charts/common/retriever-usvc/templates/deployment.yaml +++ b/helm-charts/common/retriever-usvc/templates/deployment.yaml @@ -82,8 +82,6 @@ spec: volumeMounts: - mountPath: /tmp name: tmp - - mountPath: /home/user/nltk_data - name: nltk-data {{- if .Values.livenessProbe }} livenessProbe: {{- toYaml .Values.livenessProbe | nindent 12 }} @@ -101,21 +99,6 @@ spec: volumes: - name: tmp emptyDir: {} - - name: nltk-data - {{- if .Values.global.offline }} - {{- if .Values.global.nltkDataUsePVC }} - persistentVolumeClaim: - claimName: {{ .Values.global.nltkDataUsePVC }} - {{- else if .Values.global.nltkDataUseHostPath }} - hostPath: - path: {{ .Values.global.nltkDataUseHostPath }} - type: Directory - {{- else }} - {{- fail "'global.nltkDataUsePVC' or 'global.nltkDataUseHostPath' must be set in offline mode" }} - {{- end }} - {{- else }} - emptyDir: {} - {{- end }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/helm-charts/common/retriever-usvc/values.yaml b/helm-charts/common/retriever-usvc/values.yaml index c95ea8737..2d689d8f2 100644 --- a/helm-charts/common/retriever-usvc/values.yaml +++ b/helm-charts/common/retriever-usvc/values.yaml @@ -124,16 +124,6 @@ global: # If set, and serviceAccount.create is false, it will assume this service account is already created by others. sharedSAName: "" - # Running service in air gapped(offline) mode - # If offline is enabled, user must set either nltkDataUseHostPath or nltkDataUsePVC and download nltk data out of band. - offline: false - # To store offline nltk data in local directory for one node K8s environment, set nltkDataUseHostPath - # Download nltk data: python -m nltk.downloader -d all && chmod a+r - nltkDataUseHostPath: "" - # To store offline nltk data in persistent volume(PV) to be shared by multinode K8s environment, set nltkDataUsePVC - # and follow the similar above steps to download the nltk data to the root directory of that PV - nltkDataUsePVC: "" - # Install Prometheus serviceMonitor for service monitoring: false