From 42dec5121142e1792e1124c6b10a7e84dc234d29 Mon Sep 17 00:00:00 2001 From: Krishna Murti Date: Wed, 30 Oct 2024 17:09:18 +0530 Subject: [PATCH] updated videoqna-ui vars and configmap Signed-off-by: Krishna Murti --- .../common/ui/templates/configmap.yaml | 41 +++++++++++++------ .../common/ui/variant_videoqna-values.yaml | 4 +- helm-charts/videoqna/values.yaml | 4 +- 3 files changed, 32 insertions(+), 17 deletions(-) diff --git a/helm-charts/common/ui/templates/configmap.yaml b/helm-charts/common/ui/templates/configmap.yaml index 664c4f7a..f6734869 100644 --- a/helm-charts/common/ui/templates/configmap.yaml +++ b/helm-charts/common/ui/templates/configmap.yaml @@ -8,20 +8,35 @@ metadata: labels: {{- include "ui.labels" . | nindent 4 }} data: - {{- if .Values.videoqnaBackendHealthCheck }} - BACKEND_HEALTH_CHECK_ENDPOINT: {{ tpl .Values.videoqnaBackendHealthCheck . | quote }} - {{- end }} - {{- if .Values.videoqnaBackendService }} - BACKEND_SERVICE_ENDPOINT: {{ tpl .Values.videoqnaBackendService . | quote }} - {{- end }} - APP_BACKEND_SERVICE_ENDPOINT: {{ .Values.BACKEND_SERVICE_ENDPOINT | quote }} - APP_DATA_PREP_SERVICE_URL: {{ .Values.DATAPREP_SERVICE_ENDPOINT | quote }} +{{- if contains "codegen-react-ui" .Values.image.repository }} + VITE_CODE_GEN_URL: {{ .Values.BACKEND_SERVICE_ENDPOINT | quote }} + {{- else if contains "codegen-ui" .Values.image.repository }} + BASIC_URL: {{ .Values.BACKEND_SERVICE_ENDPOINT | quote }} + {{- else if contains "codetrans-ui" .Values.image.repository }} + BASE_URL: {{ .Values.BACKEND_SERVICE_ENDPOINT | quote }} + {{- else if or (contains "docsum-ui" .Values.image.repository) (contains "faqgen-ui" .Values.image.repository) }} + DOC_BASE_URL: {{ .Values.BACKEND_SERVICE_ENDPOINT | quote }} + {{- else if (contains "docsum-react-ui" .Values.image.repository) }} + VITE_DOC_SUM_URL: {{ .Values.BACKEND_SERVICE_ENDPOINT | quote }} + {{- else if contains "chatqna-ui" .Values.image.repository }} CHAT_BASE_URL: {{ .Values.BACKEND_SERVICE_ENDPOINT | quote }} UPLOAD_FILE_BASE_URL: {{ .Values.DATAPREP_SERVICE_ENDPOINT | quote }} GET_FILE: {{ .Values.DATAPREP_GET_FILE_ENDPOINT | quote }} DELETE_FILE: {{ .Values.DATAPREP_DELETE_FILE_ENDPOINT | quote }} - BASE_URL: {{ .Values.BACKEND_SERVICE_ENDPOINT | quote }} - DOC_BASE_URL: {{ .Values.BACKEND_SERVICE_ENDPOINT | quote }} - BASIC_URL: {{ .Values.BACKEND_SERVICE_ENDPOINT | quote }} - VITE_CODE_GEN_URL: {{ .Values.BACKEND_SERVICE_ENDPOINT | quote }} - VITE_DOC_SUM_URL: {{ .Values.BACKEND_SERVICE_ENDPOINT | quote }} + {{- else if contains "chatqna-conversation-ui" .Values.image.repository}} + APP_BACKEND_SERVICE_ENDPOINT: {{ .Values.BACKEND_SERVICE_ENDPOINT | quote }} + APP_DATA_PREP_SERVICE_URL: {{ .Values.DATAPREP_SERVICE_ENDPOINT | quote }} + APP_DATA_PREP_GET_FILE_URL: {{ .Values.DATAPREP_GET_FILE_ENDPOINT | quote }} + APP_DATA_PREP_DELETE_FILE_URL: {{ .Values.DATAPREP_DELETE_FILE_ENDPOINT | quote }} + {{- else if contains "visualqna-ui" .Values.image.repository }} + BACKEND_BASE_URL: {{ .Values.BACKEND_SERVICE_ENDPOINT | quote }} + {{- else if contains "audioqna-ui" .Values.image.repository }} + CHAT_URL: {{ .Values.BACKEND_SERVICE_ENDPOINT | quote }} + {{- else if contains "faqgen-react-ui" .Values.image.repository }} + VITE_FAQ_GEN_URL: {{ .Values.BACKEND_SERVICE_ENDPOINT | quote }} + {{- else if contains "videoqna-ui" .Values.image.repository }} + BACKEND_SERVICE_ENDPOINT: {{ tpl .Values.BACKEND_SERVICE_ENDPOINT . | quote }} + BACKEND_HEALTH_CHECK_ENDPOINT: {{ tpl .Values.BACKEND_HEALTH_CHECK_ENDPOINT . | quote }} + {{- else }} + {{- fail "Unsupported ui image: " .Values.image.repository }} + {{- end }} diff --git a/helm-charts/common/ui/variant_videoqna-values.yaml b/helm-charts/common/ui/variant_videoqna-values.yaml index 857c0f8c..c853f634 100644 --- a/helm-charts/common/ui/variant_videoqna-values.yaml +++ b/helm-charts/common/ui/variant_videoqna-values.yaml @@ -7,9 +7,9 @@ image: tag: "latest" # Endpoint for VideoQnA Backend. Test Value - Override it with actual Backend endpoint -videoqnaBackendService: "http://localhost:8888/v1/videoqna" +BACKEND_SERVICE_ENDPOINT: "http://localhost:8888/v1/videoqna" # Endpoint for VideoQnA Backend Service health check. Test Value - Override it with actual Backend endpoint -videoqnaBackendHealthCheck: "http://localhost:8888/v1/health_check" +BACKEND_HEALTH_CHECK_ENDPOINT: "http://localhost:8888/v1/health_check" containerPort: 5173 service: diff --git a/helm-charts/videoqna/values.yaml b/helm-charts/videoqna/values.yaml index 2e43a42f..a5b6ea24 100644 --- a/helm-charts/videoqna/values.yaml +++ b/helm-charts/videoqna/values.yaml @@ -72,8 +72,8 @@ videoqna-ui: nameOverride: "ui" # Following template value will be resolved in videoqna-ui ConfigMap - videoqnaBackendService: http://{{ .Release.Name | trunc 57 | trimSuffix "-" }}-nginx/v1/videoqna - videoqnaBackendHealthCheck: http://{{ .Release.Name | trunc 57 | trimSuffix "-" }}-nginx/v1/health_check + BACKEND_SERVICE_ENDPOINT: http://{{ .Release.Name | trunc 57 | trimSuffix "-" }}-nginx/v1/videoqna + BACKEND_HEALTH_CHECK_ENDPOINT: http://{{ .Release.Name | trunc 57 | trimSuffix "-" }}-nginx/v1/health_check containerPort: 5173 service: