ref: Helm | 从这里开始吧
create a helm chart
chart=prompt-usvc
helm create $chart
add ConfigMap
check the values from:
GenAIComps/comps/prompt_registry/mongo/docker-compose-prompt-registry-mongo.yaml at main · opea-project/GenAIComps (github.com)
and:
GenAIComps/comps/prompt_registry/mongo/config.py at main · opea-project/GenAIComps (github.com)
cat <<EOF | sudo tee $chart/templates/configmap.yaml # Copyright (C) 2024 OPEA Corporation # SPDX-License-Identifier: Apache-2.0 apiVersion: v1 kind: ConfigMap metadata: name: {{ include "prompt-usvc.fullname" . }}-config labels: {{- include "prompt-usvc.labels" . | nindent 4 }} data: {{- if .Values.TEI_EMBEDDING_ENDPOINT }} TEI_ENDPOINT: {{ .Values.TEI_EMBEDDING_ENDPOINT | quote}} {{- else if not .Values.EMBED_MODEL }} TEI_ENDPOINT: "http://{{ .Release.Name }}-tei" {{- end }} EMBED_MODEL: {{ .Values.EMBED_MODEL | quote }} {{- if .Values.REDIS_URL }} REDIS_URL: {{ .Values.REDIS_URL | quote}} {{- else }} REDIS_URL: "redis://{{ .Release.Name }}-redis-vector-db:6379" {{- end }} INDEX_NAME: {{ .Values.INDEX_NAME | quote }} KEY_INDEX_NAME: {{ .Values.KEY_INDEX_NAME | quote }} SEARCH_BATCH_SIZE: {{ .Values.SEARCH_BATCH_SIZE | quote }} HUGGINGFACEHUB_API_TOKEN: {{ .Values.global.HUGGINGFACEHUB_API_TOKEN | quote}} HF_HOME: "/tmp/.cache/huggingface" {{- if .Values.global.HF_ENDPOINT }} HF_ENDPOINT: {{ .Values.global.HF_ENDPOINT | quote}} {{- end }} http_proxy: {{ .Values.global.http_proxy | quote }} https_proxy: {{ .Values.global.https_proxy | quote }} {{- if and (not .Values.REDIS_URL) (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,{{ .Values.global.no_proxy }}" {{- else }} no_proxy: {{ .Values.global.no_proxy | quote }} {{- end }} LOGFLAG: {{ .Values.LOGFLAG | quote }} EOF
标签:prompt,mongo,app,chart,opea,registry,GenAIComps From: https://www.cnblogs.com/shaohef/p/18429936