diff --git a/helm-charts/common/ui/ci-variant_chatqna_svelte-values.yaml b/helm-charts/common/ui/ci-variant_chatqna_svelte-values.yaml new file mode 120000 index 00000000..83ad2295 --- /dev/null +++ b/helm-charts/common/ui/ci-variant_chatqna_svelte-values.yaml @@ -0,0 +1 @@ +variant_chatqna_svelte-values.yaml \ No newline at end of file diff --git a/helm-charts/common/ui/ci-variant_codegen_react-values.yaml b/helm-charts/common/ui/ci-variant_codegen_react-values.yaml new file mode 120000 index 00000000..dca8edda --- /dev/null +++ b/helm-charts/common/ui/ci-variant_codegen_react-values.yaml @@ -0,0 +1 @@ +variant_codegen_react-values.yaml \ No newline at end of file diff --git a/helm-charts/common/ui/ci-variant_codegen_svelte-values.yaml b/helm-charts/common/ui/ci-variant_codegen_svelte-values.yaml new file mode 120000 index 00000000..92b8a5e5 --- /dev/null +++ b/helm-charts/common/ui/ci-variant_codegen_svelte-values.yaml @@ -0,0 +1 @@ +variant_codegen_svelte-values.yaml \ No newline at end of file diff --git a/helm-charts/common/ui/ci-variant_codetrans_svelte-values.yaml b/helm-charts/common/ui/ci-variant_codetrans_svelte-values.yaml new file mode 120000 index 00000000..8034cb02 --- /dev/null +++ b/helm-charts/common/ui/ci-variant_codetrans_svelte-values.yaml @@ -0,0 +1 @@ +variant_codetrans_svelte-values.yaml \ No newline at end of file diff --git a/helm-charts/common/ui/ci-variant_docsum_react-values.yaml b/helm-charts/common/ui/ci-variant_docsum_react-values.yaml new file mode 120000 index 00000000..a06c0a48 --- /dev/null +++ b/helm-charts/common/ui/ci-variant_docsum_react-values.yaml @@ -0,0 +1 @@ +variant_docsum_react-values.yaml \ No newline at end of file diff --git a/helm-charts/common/ui/ci-variant_docsum_svelte-values.yaml b/helm-charts/common/ui/ci-variant_docsum_svelte-values.yaml new file mode 120000 index 00000000..c0a3e63f --- /dev/null +++ b/helm-charts/common/ui/ci-variant_docsum_svelte-values.yaml @@ -0,0 +1 @@ +variant_docsum_svelte-values.yaml \ No newline at end of file diff --git a/helm-charts/common/ui/ci-variant_faqgen_react-values.yaml b/helm-charts/common/ui/ci-variant_faqgen_react-values.yaml new file mode 120000 index 00000000..29846e96 --- /dev/null +++ b/helm-charts/common/ui/ci-variant_faqgen_react-values.yaml @@ -0,0 +1 @@ +variant_faqgen_react-values.yaml \ No newline at end of file diff --git a/helm-charts/common/ui/ci-variant_faqgen_svelte-values.yaml b/helm-charts/common/ui/ci-variant_faqgen_svelte-values.yaml new file mode 120000 index 00000000..f1976d3a --- /dev/null +++ b/helm-charts/common/ui/ci-variant_faqgen_svelte-values.yaml @@ -0,0 +1 @@ +variant_faqgen_svelte-values.yaml \ No newline at end of file diff --git a/helm-charts/common/ui/ci-variant_visualqna_svelte-values.yaml b/helm-charts/common/ui/ci-variant_visualqna_svelte-values.yaml new file mode 120000 index 00000000..b14d59af --- /dev/null +++ b/helm-charts/common/ui/ci-variant_visualqna_svelte-values.yaml @@ -0,0 +1 @@ +variant_visualqna_svelte-values.yaml \ No newline at end of file diff --git a/helm-charts/common/ui/templates/configmap.yaml b/helm-charts/common/ui/templates/configmap.yaml index d6bfef1a..ce22b014 100644 --- a/helm-charts/common/ui/templates/configmap.yaml +++ b/helm-charts/common/ui/templates/configmap.yaml @@ -8,14 +8,32 @@ metadata: labels: {{- include "ui.labels" . | nindent 4 }} data: - 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 }} + {{- fail "Unsupported ui image: " .Values.image.repository }} + {{- end }} diff --git a/helm-charts/common/ui/templates/deployment.yaml b/helm-charts/common/ui/templates/deployment.yaml index 3cc55641..07425acf 100644 --- a/helm-charts/common/ui/templates/deployment.yaml +++ b/helm-charts/common/ui/templates/deployment.yaml @@ -45,6 +45,18 @@ spec: - name: ui containerPort: {{ .Values.containerPort }} protocol: TCP + {{- if .Values.livenessProbe }} + livenessProbe: + {{- toYaml .Values.livenessProbe | nindent 12 }} + {{- end }} + {{- if .Values.readinessProbe }} + readinessProbe: + {{- toYaml .Values.readinessProbe | nindent 12 }} + {{- end }} + {{- if .Values.startupProbe }} + startupProbe: + {{- toYaml .Values.startupProbe | nindent 12 }} + {{- end }} resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: diff --git a/helm-charts/common/ui/values.yaml b/helm-charts/common/ui/values.yaml index a349adcf..6c6537bb 100644 --- a/helm-charts/common/ui/values.yaml +++ b/helm-charts/common/ui/values.yaml @@ -44,6 +44,27 @@ service: type: ClusterIP port: 5174 +livenessProbe: + httpGet: + path: / + port: ui + initialDelaySeconds: 5 + periodSeconds: 5 + failureThreshold: 24 +readinessProbe: + httpGet: + path: / + port: ui + initialDelaySeconds: 5 + periodSeconds: 5 +startupProbe: + httpGet: + path: / + port: ui + initialDelaySeconds: 5 + periodSeconds: 5 + failureThreshold: 120 + resources: {} # We usually recommend not to specify default resources and to leave this as a conscious # choice for the user. This also increases chances charts run on environments with little diff --git a/helm-charts/common/ui/variant_chatqna_svelte-values.yaml b/helm-charts/common/ui/variant_chatqna_svelte-values.yaml new file mode 100644 index 00000000..ab688a5a --- /dev/null +++ b/helm-charts/common/ui/variant_chatqna_svelte-values.yaml @@ -0,0 +1,8 @@ +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +image: + repository: opea/chatqna-ui + tag: "latest" + +containerPort: 5173 diff --git a/helm-charts/common/ui/variant_codegen_react-values.yaml b/helm-charts/common/ui/variant_codegen_react-values.yaml new file mode 100644 index 00000000..37a2ee2b --- /dev/null +++ b/helm-charts/common/ui/variant_codegen_react-values.yaml @@ -0,0 +1,8 @@ +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +image: + repository: opea/codegen-react-ui + tag: "latest" + +BACKEND_SERVICE_ENDPOINT: "/v1/codegen" diff --git a/helm-charts/common/ui/variant_codegen_svelte-values.yaml b/helm-charts/common/ui/variant_codegen_svelte-values.yaml new file mode 100644 index 00000000..8ec0519e --- /dev/null +++ b/helm-charts/common/ui/variant_codegen_svelte-values.yaml @@ -0,0 +1,10 @@ +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +image: + repository: opea/codegen-ui + tag: "latest" + +containerPort: 5173 + +BACKEND_SERVICE_ENDPOINT: "/v1/codegen" diff --git a/helm-charts/common/ui/variant_codetrans_svelte-values.yaml b/helm-charts/common/ui/variant_codetrans_svelte-values.yaml new file mode 100644 index 00000000..fe943ae0 --- /dev/null +++ b/helm-charts/common/ui/variant_codetrans_svelte-values.yaml @@ -0,0 +1,10 @@ +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +image: + repository: opea/codetrans-ui + tag: "latest" + +containerPort: 5173 + +BACKEND_SERVICE_ENDPOINT: "/v1/codetrans" diff --git a/helm-charts/common/ui/variant_docsum_react-values.yaml b/helm-charts/common/ui/variant_docsum_react-values.yaml new file mode 100644 index 00000000..a28b9acb --- /dev/null +++ b/helm-charts/common/ui/variant_docsum_react-values.yaml @@ -0,0 +1,8 @@ +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +image: + repository: opea/docsum-react-ui + tag: "latest" + +BACKEND_SERVICE_ENDPOINT: "/v1/docsum" diff --git a/helm-charts/common/ui/variant_docsum_svelte-values.yaml b/helm-charts/common/ui/variant_docsum_svelte-values.yaml new file mode 100644 index 00000000..6c9e215f --- /dev/null +++ b/helm-charts/common/ui/variant_docsum_svelte-values.yaml @@ -0,0 +1,10 @@ +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +image: + repository: opea/docsum-ui + tag: "latest" + +containerPort: 5173 + +BACKEND_SERVICE_ENDPOINT: "/v1/docsum" diff --git a/helm-charts/common/ui/variant_faqgen_react-values.yaml b/helm-charts/common/ui/variant_faqgen_react-values.yaml new file mode 100644 index 00000000..4af8aa97 --- /dev/null +++ b/helm-charts/common/ui/variant_faqgen_react-values.yaml @@ -0,0 +1,8 @@ +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +image: + repository: opea/faqgen-react-ui + tag: "latest" + +BACKEND_SERVICE_ENDPOINT: "/v1/faqgen" diff --git a/helm-charts/common/ui/variant_faqgen_svelte-values.yaml b/helm-charts/common/ui/variant_faqgen_svelte-values.yaml new file mode 100644 index 00000000..846cee1a --- /dev/null +++ b/helm-charts/common/ui/variant_faqgen_svelte-values.yaml @@ -0,0 +1,10 @@ +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +image: + repository: opea/faqgen-ui + tag: "latest" + +containerPort: 5173 + +BACKEND_SERVICE_ENDPOINT: "/v1/faqgen" diff --git a/helm-charts/common/ui/variant_visualqna_svelte-values.yaml b/helm-charts/common/ui/variant_visualqna_svelte-values.yaml new file mode 100644 index 00000000..2b1aab1d --- /dev/null +++ b/helm-charts/common/ui/variant_visualqna_svelte-values.yaml @@ -0,0 +1,10 @@ +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +image: + repository: opea/visualqna-ui + tag: "latest" + +containerPort: 5173 + +BACKEND_SERVICE_ENDPOINT: "/v1/visualqna"