Skip to content

Commit 15fc6f9

Browse files
authored
Optimize gmc manifest e2e tests (#382)
Signed-off-by: Yingchun Guo <[email protected]>
1 parent e878dc1 commit 15fc6f9

File tree

9 files changed

+22
-348
lines changed

9 files changed

+22
-348
lines changed

.github/workflows/gmc-e2e.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ jobs:
5050
if [ ${{ matrix.hardware }} == "gaudi" ]; then IMAGE_REPO=${{ vars.IMAGE_REPO_GAUDI }}; else IMAGE_REPO=${{ vars.IMAGE_REPO_XEON }}; fi
5151
echo "IMAGE_REPO=$OPEA_IMAGE_REPO" >> $GITHUB_ENV
5252
lower_example=$(echo "${{ matrix.example }}" | tr '[:upper:]' '[:lower:]')
53-
echo "SYSTEM_NAMESPACE=opea-system-$(date +%Y%m%d%H%M%S)" >> $GITHUB_ENV
5453
echo "APP_NAMESPACE=$lower_example-$(date +%Y%m%d%H%M%S)" >> $GITHUB_ENV
5554
echo "ROLLOUT_TIMEOUT_SECONDS=1800s" >> $GITHUB_ENV
5655
echo "KUBECTL_TIMEOUT_SECONDS=60s" >> $GITHUB_ENV
@@ -66,7 +65,6 @@ jobs:
6665
echo "No test script found, exist test!"
6766
exit 0
6867
else
69-
${{ github.workspace }}/${{ matrix.example }}/tests/test_gmc_on_${{ matrix.hardware }}.sh init_${{ matrix.example }}
7068
echo "should_cleanup=true" >> $GITHUB_ENV
7169
${{ github.workspace }}/${{ matrix.example }}/tests/test_gmc_on_${{ matrix.hardware }}.sh install_${{ matrix.example }}
7270
echo "Testing ${{ matrix.example }}, waiting for pod ready..."
@@ -93,10 +91,6 @@ jobs:
9391
if: always()
9492
run: |
9593
if $should_cleanup; then
96-
if ! kubectl delete ns $SYSTEM_NAMESPACE --timeout=$KUBECTL_TIMEOUT_SECONDS; then
97-
kubectl delete pods --namespace $SYSTEM_NAMESPACE --force --grace-period=0 --all
98-
kubectl delete ns $SYSTEM_NAMESPACE --force --grace-period=0 --timeout=$KUBECTL_TIMEOUT_SECONDS
99-
fi
10094
if ! kubectl delete ns $APP_NAMESPACE --timeout=$KUBECTL_TIMEOUT_SECONDS; then
10195
kubectl delete pods --namespace $APP_NAMESPACE --force --grace-period=0 --all
10296
kubectl delete ns $APP_NAMESPACE --force --grace-period=0 --timeout=$KUBECTL_TIMEOUT_SECONDS

ChatQnA/tests/test_gmc_on_gaudi.sh

Lines changed: 2 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -8,43 +8,7 @@ LOG_PATH=/home/$(whoami)/logs
88
MOUNT_DIR=/home/$USER_ID/.cache/huggingface/hub
99
IMAGE_REPO=${IMAGE_REPO:-}
1010

11-
function init_chatqna() {
12-
wget https://raw.githubusercontent.com/opea-project/GenAIInfra/main/microservices-connector/config/crd/bases/gmc.opea.io_gmconnectors.yaml
13-
wget https://raw.githubusercontent.com/opea-project/GenAIInfra/main/microservices-connector/config/rbac/gmc-manager-rbac.yaml
14-
wget https://raw.githubusercontent.com/opea-project/GenAIInfra/main/microservices-connector/config/manager/gmc-manager.yaml
15-
wget -O manifests/gmc-router.yaml https://raw.githubusercontent.com/opea-project/GenAIInfra/main/microservices-connector/config/gmcrouter/gmc-router.yaml
16-
17-
# replace namespace for gmc-router and gmc-manager
18-
sed -i "s|namespace: system|namespace: $SYSTEM_NAMESPACE|g" ./gmc-manager.yaml
19-
sed -i "s|namespace: system|namespace: $SYSTEM_NAMESPACE|g" ./gmc-manager-rbac.yaml
20-
sed -i "s|name: system|name: $SYSTEM_NAMESPACE|g" ./gmc-manager-rbac.yaml
21-
# replace the mount dir "path: /mnt/model" with "path: $CHART_MOUNT"
22-
find . -name '*.yaml' -type f -exec sed -i "s#path: /mnt/models#path: $MOUNT_DIR#g" {} \;
23-
# replace the repository "image: opea/*" with "image: ${IMAGE_REPO}opea/"
24-
find . -name '*.yaml' -type f -exec sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" {} \;
25-
find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/*#image: \"${IMAGE_REPO}opea/#g" {} \;
26-
# set huggingface token
27-
find . -name '*.yaml' -type f -exec sed -i "s#\${HUGGINGFACEHUB_API_TOKEN}#$(cat /home/$USER_ID/.cache/huggingface/token)#g" {} \;
28-
# replace namespace "default" with real namespace
29-
find . -name '*.yaml' -type f -exec sed -i "s#default.svc#$APP_NAMESPACE.svc#g" {} \;
30-
}
31-
3211
function install_chatqna() {
33-
# Make sure you have to use image tag $VERSION for microservice-connector installation
34-
echo "install microservice-connector, using repo $DOCKER_REGISTRY and tag $VERSION"
35-
echo "using namespace $SYSTEM_NAMESPACE and $APP_NAMESPACE"
36-
37-
kubectl apply -f ./gmc.opea.io_gmconnectors.yaml
38-
kubectl apply -f ./gmc-manager-rbac.yaml
39-
kubectl create configmap gmcyaml -n $SYSTEM_NAMESPACE --from-file $(pwd)/../kubernetes/manifests
40-
kubectl apply -f ./gmc-manager.yaml
41-
42-
# Wait until the gmc controller pod is ready
43-
wait_until_pod_ready "gmc-controller" $SYSTEM_NAMESPACE "gmc-controller"
44-
kubectl get pods -n $SYSTEM_NAMESPACE
45-
}
46-
47-
function validate_chatqna() {
4812
kubectl create ns $APP_NAMESPACE
4913
sed -i "s|namespace: chatqa|namespace: $APP_NAMESPACE|g" ./chatQnA_xeon.yaml
5014
kubectl apply -f ./chatQnA_xeon.yaml
@@ -59,8 +23,9 @@ function validate_chatqna() {
5923
TGI_POD_NAME=$(kubectl get pods --namespace=$APP_NAMESPACE | grep ^tgi-service | awk '{print $1}')
6024
kubectl describe pod $TGI_POD_NAME -n $APP_NAMESPACE
6125
kubectl wait --for=condition=ready pod/$TGI_POD_NAME --namespace=$APP_NAMESPACE --timeout=300s
26+
}
6227

63-
28+
function validate_chatqna() {
6429
# deploy client pod for testing
6530
kubectl create deployment client-test -n $APP_NAMESPACE --image=python:3.8.13 -- sleep infinity
6631

@@ -167,11 +132,6 @@ if [ $# -eq 0 ]; then
167132
fi
168133

169134
case "$1" in
170-
init_ChatQnA)
171-
pushd ChatQnA/kubernetes
172-
init_chatqna
173-
popd
174-
;;
175135
install_ChatQnA)
176136
pushd ChatQnA/kubernetes
177137
install_chatqna

ChatQnA/tests/test_gmc_on_xeon.sh

Lines changed: 2 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -8,43 +8,7 @@ LOG_PATH=/home/$(whoami)/logs
88
MOUNT_DIR=/home/$USER_ID/.cache/huggingface/hub
99
IMAGE_REPO=${IMAGE_REPO:-}
1010

11-
function init_chatqna() {
12-
wget https://raw.githubusercontent.com/opea-project/GenAIInfra/main/microservices-connector/config/crd/bases/gmc.opea.io_gmconnectors.yaml
13-
wget https://raw.githubusercontent.com/opea-project/GenAIInfra/main/microservices-connector/config/rbac/gmc-manager-rbac.yaml
14-
wget https://raw.githubusercontent.com/opea-project/GenAIInfra/main/microservices-connector/config/manager/gmc-manager.yaml
15-
wget -O manifests/gmc-router.yaml https://raw.githubusercontent.com/opea-project/GenAIInfra/main/microservices-connector/config/gmcrouter/gmc-router.yaml
16-
17-
# replace namespace for gmc-router and gmc-manager
18-
sed -i "s|namespace: system|namespace: $SYSTEM_NAMESPACE|g" ./gmc-manager.yaml
19-
sed -i "s|namespace: system|namespace: $SYSTEM_NAMESPACE|g" ./gmc-manager-rbac.yaml
20-
sed -i "s|name: system|name: $SYSTEM_NAMESPACE|g" ./gmc-manager-rbac.yaml
21-
# replace the mount dir "path: /mnt/model" with "path: $CHART_MOUNT"
22-
find . -name '*.yaml' -type f -exec sed -i "s#path: /mnt/models#path: $MOUNT_DIR#g" {} \;
23-
# replace the repository "image: opea/*" with "image: ${IMAGE_REPO}opea/"
24-
find . -name '*.yaml' -type f -exec sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" {} \;
25-
find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/*#image: \"${IMAGE_REPO}opea/#g" {} \;
26-
# set huggingface token
27-
find . -name '*.yaml' -type f -exec sed -i "s#\${HUGGINGFACEHUB_API_TOKEN}#$(cat /home/$USER_ID/.cache/huggingface/token)#g" {} \;
28-
# replace namespace "default" with real namespace
29-
find . -name '*.yaml' -type f -exec sed -i "s#default.svc#$APP_NAMESPACE.svc#g" {} \;
30-
}
31-
3211
function install_chatqna() {
33-
# Make sure you have to use image tag $VERSION for microservice-connector installation
34-
echo "install microservice-connector, using repo $DOCKER_REGISTRY and tag $VERSION"
35-
echo "using namespace $SYSTEM_NAMESPACE and $APP_NAMESPACE"
36-
37-
kubectl apply -f ./gmc.opea.io_gmconnectors.yaml
38-
kubectl apply -f ./gmc-manager-rbac.yaml
39-
kubectl create configmap gmcyaml -n $SYSTEM_NAMESPACE --from-file $(pwd)/../kubernetes/manifests
40-
kubectl apply -f ./gmc-manager.yaml
41-
42-
# Wait until the gmc controller pod is ready
43-
wait_until_pod_ready "gmc-controller" $SYSTEM_NAMESPACE "gmc-controller"
44-
kubectl get pods -n $SYSTEM_NAMESPACE
45-
}
46-
47-
function validate_chatqna() {
4812
kubectl create ns $APP_NAMESPACE
4913
sed -i "s|namespace: chatqa|namespace: $APP_NAMESPACE|g" ./chatQnA_xeon.yaml
5014
kubectl apply -f ./chatQnA_xeon.yaml
@@ -59,7 +23,9 @@ function validate_chatqna() {
5923
TGI_POD_NAME=$(kubectl get pods --namespace=$APP_NAMESPACE | grep ^tgi-service | awk '{print $1}')
6024
kubectl describe pod $TGI_POD_NAME -n $APP_NAMESPACE
6125
kubectl wait --for=condition=ready pod/$TGI_POD_NAME --namespace=$APP_NAMESPACE --timeout=300s
26+
}
6227

28+
function validate_chatqna() {
6329
# deploy client pod for testing
6430
kubectl create deployment client-test -n $APP_NAMESPACE --image=python:3.8.13 -- sleep infinity
6531

@@ -167,11 +133,6 @@ if [ $# -eq 0 ]; then
167133
fi
168134

169135
case "$1" in
170-
init_ChatQnA)
171-
pushd ChatQnA/kubernetes
172-
init_chatqna
173-
popd
174-
;;
175136
install_ChatQnA)
176137
pushd ChatQnA/kubernetes
177138
install_chatqna

CodeGen/tests/test_gmc_on_gaudi.sh

Lines changed: 3 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -8,44 +8,7 @@ LOG_PATH=/home/$(whoami)/logs
88
MOUNT_DIR=/home/$USER_ID/.cache/huggingface/hub
99
IMAGE_REPO=${IMAGE_REPO:-}
1010

11-
function init_codegen() {
12-
wget https://raw.githubusercontent.com/opea-project/GenAIInfra/main/microservices-connector/config/crd/bases/gmc.opea.io_gmconnectors.yaml
13-
wget https://raw.githubusercontent.com/opea-project/GenAIInfra/main/microservices-connector/config/rbac/gmc-manager-rbac.yaml
14-
wget https://raw.githubusercontent.com/opea-project/GenAIInfra/main/microservices-connector/config/manager/gmc-manager.yaml
15-
wget -O manifests/gmc-router.yaml https://raw.githubusercontent.com/opea-project/GenAIInfra/main/microservices-connector/config/gmcrouter/gmc-router.yaml
16-
17-
# replace namespace for gmc-router and gmc-manager
18-
sed -i "s|namespace: system|namespace: $SYSTEM_NAMESPACE|g" ./gmc-manager.yaml
19-
sed -i "s|namespace: system|namespace: $SYSTEM_NAMESPACE|g" ./gmc-manager-rbac.yaml
20-
sed -i "s|name: system|name: $SYSTEM_NAMESPACE|g" ./gmc-manager-rbac.yaml
21-
# replace the mount dir "path: /mnt/model" with "path: $CHART_MOUNT"
22-
find . -name '*.yaml' -type f -exec sed -i "s#path: /mnt/models#path: $MOUNT_DIR#g" {} \;
23-
# replace the repository "image: opea/*" with "image: ${IMAGE_REPO}opea/"
24-
find . -name '*.yaml' -type f -exec sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" {} \;
25-
find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/*#image: \"${IMAGE_REPO}opea/#g" {} \;
26-
# set huggingface token
27-
find . -name '*.yaml' -type f -exec sed -i "s#\${HUGGINGFACEHUB_API_TOKEN}#$(cat /home/$USER_ID/.cache/huggingface/token)#g" {} \;
28-
# replace namespace "default" with real namespace
29-
find . -name '*.yaml' -type f -exec sed -i "s#default.svc#$APP_NAMESPACE.svc#g" {} \;
30-
}
31-
3211
function install_codegen() {
33-
# Make sure you have to use image tag $VERSION for microservice-connector installation
34-
echo "install microservice-connector, using repo $DOCKER_REGISTRY and tag $VERSION"
35-
echo "using namespace $SYSTEM_NAMESPACE and $APP_NAMESPACE"
36-
37-
kubectl apply -f ./gmc.opea.io_gmconnectors.yaml
38-
kubectl apply -f ./gmc-manager-rbac.yaml
39-
kubectl create configmap gmcyaml -n $SYSTEM_NAMESPACE --from-file $(pwd)/../kubernetes/manifests
40-
kubectl apply -f ./gmc-manager.yaml
41-
42-
# Wait until the gmc controller pod is ready
43-
wait_until_pod_ready "gmc-controller" $SYSTEM_NAMESPACE "gmc-controller"
44-
kubectl get pods -n $SYSTEM_NAMESPACE
45-
rm -f ./gmc.opea.io_gmconnectors.yaml ./gmc-manager-rbac.yaml ./gmc-manager.yaml manifests/gmc-router.yaml
46-
}
47-
48-
function validate_codegen() {
4912
kubectl create ns $APP_NAMESPACE
5013
sed -i "s|namespace: codegen|namespace: $APP_NAMESPACE|g" ./codegen_gaudi.yaml
5114
kubectl apply -f ./codegen_gaudi.yaml
@@ -55,7 +18,9 @@ function validate_codegen() {
5518
wait_until_pod_ready "codegen router" $APP_NAMESPACE "router-service"
5619
output=$(kubectl get pods -n $APP_NAMESPACE)
5720
echo $output
21+
}
5822

23+
function validate_codegen() {
5924
# deploy client pod for testing
6025
kubectl create deployment client-test -n $APP_NAMESPACE --image=python:3.8.13 -- sleep infinity
6126

@@ -146,13 +111,8 @@ if [ $# -eq 0 ]; then
146111
fi
147112

148113
case "$1" in
149-
init_CodeGen)
150-
pushd ChatQnA/kubernetes
151-
init_codegen
152-
popd
153-
;;
154114
install_CodeGen)
155-
pushd ChatQnA/kubernetes
115+
pushd CodeGen/kubernetes
156116
install_codegen
157117
popd
158118
;;

CodeGen/tests/test_gmc_on_xeon.sh

Lines changed: 3 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -8,44 +8,7 @@ LOG_PATH=/home/$(whoami)/logs
88
MOUNT_DIR=/home/$USER_ID/.cache/huggingface/hub
99
IMAGE_REPO=${IMAGE_REPO:-}
1010

11-
function init_codegen() {
12-
wget https://raw.githubusercontent.com/opea-project/GenAIInfra/main/microservices-connector/config/crd/bases/gmc.opea.io_gmconnectors.yaml
13-
wget https://raw.githubusercontent.com/opea-project/GenAIInfra/main/microservices-connector/config/rbac/gmc-manager-rbac.yaml
14-
wget https://raw.githubusercontent.com/opea-project/GenAIInfra/main/microservices-connector/config/manager/gmc-manager.yaml
15-
wget -O manifests/gmc-router.yaml https://raw.githubusercontent.com/opea-project/GenAIInfra/main/microservices-connector/config/gmcrouter/gmc-router.yaml
16-
17-
# replace namespace for gmc-router and gmc-manager
18-
sed -i "s|namespace: system|namespace: $SYSTEM_NAMESPACE|g" ./gmc-manager.yaml
19-
sed -i "s|namespace: system|namespace: $SYSTEM_NAMESPACE|g" ./gmc-manager-rbac.yaml
20-
sed -i "s|name: system|name: $SYSTEM_NAMESPACE|g" ./gmc-manager-rbac.yaml
21-
# replace the mount dir "path: /mnt/model" with "path: $CHART_MOUNT"
22-
find . -name '*.yaml' -type f -exec sed -i "s#path: /mnt/models#path: $MOUNT_DIR#g" {} \;
23-
# replace the repository "image: opea/*" with "image: ${IMAGE_REPO}opea/"
24-
find . -name '*.yaml' -type f -exec sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" {} \;
25-
find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/*#image: \"${IMAGE_REPO}opea/#g" {} \;
26-
# set huggingface token
27-
find . -name '*.yaml' -type f -exec sed -i "s#\${HUGGINGFACEHUB_API_TOKEN}#$(cat /home/$USER_ID/.cache/huggingface/token)#g" {} \;
28-
# replace namespace "default" with real namespace
29-
find . -name '*.yaml' -type f -exec sed -i "s#default.svc#$APP_NAMESPACE.svc#g" {} \;
30-
}
31-
3211
function install_codegen() {
33-
# Make sure you have to use image tag $VERSION for microservice-connector installation
34-
echo "install microservice-connector, using repo $DOCKER_REGISTRY and tag $VERSION"
35-
echo "using namespace $SYSTEM_NAMESPACE and $APP_NAMESPACE"
36-
37-
kubectl apply -f ./gmc.opea.io_gmconnectors.yaml
38-
kubectl apply -f ./gmc-manager-rbac.yaml
39-
kubectl create configmap gmcyaml -n $SYSTEM_NAMESPACE --from-file $(pwd)/../kubernetes/manifests
40-
kubectl apply -f ./gmc-manager.yaml
41-
42-
# Wait until the gmc controller pod is ready
43-
wait_until_pod_ready "gmc-controller" $SYSTEM_NAMESPACE "gmc-controller"
44-
kubectl get pods -n $SYSTEM_NAMESPACE
45-
rm -f ./gmc.opea.io_gmconnectors.yaml ./gmc-manager-rbac.yaml ./gmc-manager.yaml manifests/gmc-router.yaml
46-
}
47-
48-
function validate_codegen() {
4912
kubectl create ns $APP_NAMESPACE
5013
sed -i "s|namespace: codegen|namespace: $APP_NAMESPACE|g" ./codegen_xeon.yaml
5114
kubectl apply -f ./codegen_xeon.yaml
@@ -55,7 +18,9 @@ function validate_codegen() {
5518
wait_until_pod_ready "codegen router" $APP_NAMESPACE "router-service"
5619
output=$(kubectl get pods -n $APP_NAMESPACE)
5720
echo $output
21+
}
5822

23+
function validate_codegen() {
5924
# deploy client pod for testing
6025
kubectl create deployment client-test -n $APP_NAMESPACE --image=python:3.8.13 -- sleep infinity
6126

@@ -146,13 +111,8 @@ if [ $# -eq 0 ]; then
146111
fi
147112

148113
case "$1" in
149-
init_CodeGen)
150-
pushd ChatQnA/kubernetes
151-
init_codegen
152-
popd
153-
;;
154114
install_CodeGen)
155-
pushd ChatQnA/kubernetes
115+
pushd CodeGen/kubernetes
156116
install_codegen
157117
popd
158118
;;

CodeTrans/tests/test_gmc_on_gaudi.sh

Lines changed: 3 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -8,44 +8,7 @@ LOG_PATH=/home/$(whoami)/logs
88
MOUNT_DIR=/home/$USER_ID/.cache/huggingface/hub
99
IMAGE_REPO=${IMAGE_REPO:-}
1010

11-
function init_codetrans() {
12-
wget https://raw.githubusercontent.com/opea-project/GenAIInfra/main/microservices-connector/config/crd/bases/gmc.opea.io_gmconnectors.yaml
13-
wget https://raw.githubusercontent.com/opea-project/GenAIInfra/main/microservices-connector/config/rbac/gmc-manager-rbac.yaml
14-
wget https://raw.githubusercontent.com/opea-project/GenAIInfra/main/microservices-connector/config/manager/gmc-manager.yaml
15-
wget -O manifests/gmc-router.yaml https://raw.githubusercontent.com/opea-project/GenAIInfra/main/microservices-connector/config/gmcrouter/gmc-router.yaml
16-
17-
# replace namespace for gmc-router and gmc-manager
18-
sed -i "s|namespace: system|namespace: $SYSTEM_NAMESPACE|g" ./gmc-manager.yaml
19-
sed -i "s|namespace: system|namespace: $SYSTEM_NAMESPACE|g" ./gmc-manager-rbac.yaml
20-
sed -i "s|name: system|name: $SYSTEM_NAMESPACE|g" ./gmc-manager-rbac.yaml
21-
# replace the mount dir "path: /mnt/model" with "path: $CHART_MOUNT"
22-
find . -name '*.yaml' -type f -exec sed -i "s#path: /mnt/models#path: $MOUNT_DIR#g" {} \;
23-
# replace the repository "image: opea/*" with "image: ${IMAGE_REPO}opea/"
24-
find . -name '*.yaml' -type f -exec sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" {} \;
25-
find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/*#image: \"${IMAGE_REPO}opea/#g" {} \;
26-
# set huggingface token
27-
find . -name '*.yaml' -type f -exec sed -i "s#\${HUGGINGFACEHUB_API_TOKEN}#$(cat /home/$USER_ID/.cache/huggingface/token)#g" {} \;
28-
# replace namespace "default" with real namespace
29-
find . -name '*.yaml' -type f -exec sed -i "s#default.svc#$APP_NAMESPACE.svc#g" {} \;
30-
}
31-
3211
function install_codetrans() {
33-
# Make sure you have to use image tag $VERSION for microservice-connector installation
34-
echo "install microservice-connector, using repo $DOCKER_REGISTRY and tag $VERSION"
35-
echo "using namespace $SYSTEM_NAMESPACE and $APP_NAMESPACE"
36-
37-
kubectl apply -f ./gmc.opea.io_gmconnectors.yaml
38-
kubectl apply -f ./gmc-manager-rbac.yaml
39-
kubectl create configmap gmcyaml -n $SYSTEM_NAMESPACE --from-file $(pwd)/../kubernetes/manifests
40-
kubectl apply -f ./gmc-manager.yaml
41-
42-
# Wait until the gmc controller pod is ready
43-
wait_until_pod_ready "gmc-controller" $SYSTEM_NAMESPACE "gmc-controller"
44-
kubectl get pods -n $SYSTEM_NAMESPACE
45-
rm -f ./gmc.opea.io_gmconnectors.yaml ./gmc-manager-rbac.yaml ./gmc-manager.yaml manifests/gmc-router.yaml
46-
}
47-
48-
function validate_codetrans() {
4912
kubectl create ns $APP_NAMESPACE
5013
sed -i "s|namespace: codetrans|namespace: $APP_NAMESPACE|g" ./codetrans_gaudi.yaml
5114
kubectl apply -f ./codetrans_gaudi.yaml
@@ -55,7 +18,9 @@ function validate_codetrans() {
5518
wait_until_pod_ready "codetrans router" $APP_NAMESPACE "router-service"
5619
output=$(kubectl get pods -n $APP_NAMESPACE)
5720
echo $output
21+
}
5822

23+
function validate_codetrans() {
5924
# deploy client pod for testing
6025
kubectl create deployment client-test -n $APP_NAMESPACE --image=python:3.8.13 -- sleep infinity
6126

@@ -145,13 +110,8 @@ if [ $# -eq 0 ]; then
145110
fi
146111

147112
case "$1" in
148-
init_CodeTrans)
149-
pushd ChatQnA/kubernetes
150-
init_codetrans
151-
popd
152-
;;
153113
install_CodeTrans)
154-
pushd ChatQnA/kubernetes
114+
pushd CodeTrans/kubernetes
155115
install_codetrans
156116
popd
157117
;;

0 commit comments

Comments
 (0)