Skip to content

Commit

Permalink
misc changes (#324)
Browse files Browse the repository at this point in the history
* update_manifest.sh: Support specify image version
* Rename chatqna-ui helm chart name to chatqna-ui

Signed-off-by: Lianhao Lu <[email protected]>
  • Loading branch information
lianhao authored Aug 20, 2024
1 parent c2a13d1 commit b1182c4
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion helm-charts/common/chatqna-ui/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-License-Identifier: Apache-2.0

apiVersion: v2
name: ui
name: chatqna-ui
description: A Helm chart to the UI for chatQnA workload
type: application
version: 0.8.0
Expand Down
7 changes: 4 additions & 3 deletions helm-charts/update_manifests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ CUR_DIR=$(cd $(dirname "$0") && pwd)
OUTPUTDIR=${CUR_DIR}/../microservices-connector/config/manifests
MODELPATH="/mnt/opea-models"

NEWTAG="${NEWTAG:-latest}"
#
# generate_yaml <chart> <outputdir>
#
Expand All @@ -16,7 +17,7 @@ function generate_yaml {

local extraparams=""
if [[ $(grep -c 'tag: ""' ./common/$chart/values.yaml) != 0 ]]; then
extraparams="--set image.tag=latest"
extraparams="--set image.tag=$NEWTAG"
fi

helm template $chart ./common/$chart --skip-tests --values ./common/$chart/values.yaml --set global.extraEnvConfig=extra-env-config,global.modelUseHostPath=$MODELPATH,noProbe=true $extraparams > ${outputdir}/$chart.yaml
Expand All @@ -25,7 +26,7 @@ function generate_yaml {
ext=$(basename $f | cut -d'-' -f1)
extraparams=""
if [[ $(grep -c 'tag: ""' $f) != 0 ]]; then
extraparams="--set image.tag=latest"
extraparams="--set image.tag=$NEWTAG"
fi
helm template $chart ./common/$chart --skip-tests --values ${f} --set global.extraEnvConfig=extra-env-config,global.modelUseHostPath=$MODELPATH,noProbe=true $extraparams > ${outputdir}/${chart}_${ext}.yaml
done
Expand All @@ -43,4 +44,4 @@ done

# we need special version of docsum-llm-uservice
echo "Update manifest for docsum-llm-uservice..."
helm template docsum ./common/llm-uservice --skip-tests --set global.extraEnvConfig=extra-env-config,global.modelUseHostPath=$MODELPATH,noProbe=true,image.repository=opea/llm-docsum-tgi,image.tag=latest> ${OUTPUTDIR}/docsum-llm-uservice.yaml
helm template docsum ./common/llm-uservice --skip-tests --set global.extraEnvConfig=extra-env-config,global.modelUseHostPath=$MODELPATH,noProbe=true,image.repository=opea/llm-docsum-tgi,image.tag=$NEWTAG> ${OUTPUTDIR}/docsum-llm-uservice.yaml
33 changes: 16 additions & 17 deletions microservices-connector/config/manifests/chatqna-ui.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
# Source: ui/templates/configmap.yaml
# Source: chatqna-ui/templates/configmap.yaml
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

Expand All @@ -8,24 +8,23 @@ kind: ConfigMap
metadata:
name: chatqna-ui-config
labels:
helm.sh/chart: ui-0.8.0
app.kubernetes.io/name: ui
helm.sh/chart: chatqna-ui-0.8.0
app.kubernetes.io/name: chatqna-ui
app.kubernetes.io/instance: chatqna-ui
app.kubernetes.io/version: "v0.8"
app.kubernetes.io/managed-by: Helm
data:
http_proxy: ""
https_proxy: ""
no_proxy: ""
BACKEND_SERVICE_ENDPOINT: ""
DATAPREP_SERVICE_ENDPOINT: ""
DATAPREP_GET_FILE_ENDPOINT: ""
APP_BACKEND_SERVICE_ENDPOINT: ""
APP_DATA_PREP_SERVICE_URL: ""
CHAT_BASE_URL: ""
UPLOAD_FILE_BASE_URL: ""
GET_FILE: ""
DELETE_FILE: ""
---
# Source: ui/templates/service.yaml
# Source: chatqna-ui/templates/service.yaml
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

Expand All @@ -34,8 +33,8 @@ kind: Service
metadata:
name: chatqna-ui
labels:
helm.sh/chart: ui-0.8.0
app.kubernetes.io/name: ui
helm.sh/chart: chatqna-ui-0.8.0
app.kubernetes.io/name: chatqna-ui
app.kubernetes.io/instance: chatqna-ui
app.kubernetes.io/version: "v0.8"
app.kubernetes.io/managed-by: Helm
Expand All @@ -47,10 +46,10 @@ spec:
protocol: TCP
name: ui
selector:
app.kubernetes.io/name: ui
app.kubernetes.io/name: chatqna-ui
app.kubernetes.io/instance: chatqna-ui
---
# Source: ui/templates/deployment.yaml
# Source: chatqna-ui/templates/deployment.yaml
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

Expand All @@ -59,30 +58,30 @@ kind: Deployment
metadata:
name: chatqna-ui
labels:
helm.sh/chart: ui-0.8.0
app.kubernetes.io/name: ui
helm.sh/chart: chatqna-ui-0.8.0
app.kubernetes.io/name: chatqna-ui
app.kubernetes.io/instance: chatqna-ui
app.kubernetes.io/version: "v0.8"
app.kubernetes.io/managed-by: Helm
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: ui
app.kubernetes.io/name: chatqna-ui
app.kubernetes.io/instance: chatqna-ui
template:
metadata:
labels:
helm.sh/chart: ui-0.8.0
app.kubernetes.io/name: ui
helm.sh/chart: chatqna-ui-0.8.0
app.kubernetes.io/name: chatqna-ui
app.kubernetes.io/instance: chatqna-ui
app.kubernetes.io/version: "v0.8"
app.kubernetes.io/managed-by: Helm
spec:
securityContext:
{}
containers:
- name: ui
- name: chatqna-ui
envFrom:
- configMapRef:
name: chatqna-ui-config
Expand Down

0 comments on commit b1182c4

Please sign in to comment.