Skip to content

Commit

Permalink
updated videoqna-ui vars and configmap
Browse files Browse the repository at this point in the history
Signed-off-by: Krishna Murti <[email protected]>
  • Loading branch information
krish918 committed Oct 30, 2024
1 parent fc17e30 commit 42dec51
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 17 deletions.
41 changes: 28 additions & 13 deletions helm-charts/common/ui/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
4 changes: 2 additions & 2 deletions helm-charts/common/ui/variant_videoqna-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions helm-charts/videoqna/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 42dec51

Please sign in to comment.