diff --git a/helm-charts/chatqna/templates/nginx-deployment.yaml b/helm-charts/chatqna/templates/nginx-deployment.yaml index 3e155274..c395bea4 100644 --- a/helm-charts/chatqna/templates/nginx-deployment.yaml +++ b/helm-charts/chatqna/templates/nginx-deployment.yaml @@ -114,4 +114,4 @@ spec: selector: {{- include "chatqna.selectorLabels" . | nindent 4 }} app: {{ include "chatqna.fullname" . }}-nginx - type: NodePort + type: {{ .Values.nginx.service.type }} diff --git a/helm-charts/chatqna/values.yaml b/helm-charts/chatqna/values.yaml index fb6c725e..d0f64f3e 100644 --- a/helm-charts/chatqna/values.yaml +++ b/helm-charts/chatqna/values.yaml @@ -18,6 +18,10 @@ service: type: ClusterIP port: 8888 +nginx: + service: + type: NodePort + securityContext: readOnlyRootFilesystem: true allowPrivilegeEscalation: false diff --git a/helm-charts/codegen/templates/nginx-deployment.yaml b/helm-charts/codegen/templates/nginx-deployment.yaml index e59010f1..03f95621 100644 --- a/helm-charts/codegen/templates/nginx-deployment.yaml +++ b/helm-charts/codegen/templates/nginx-deployment.yaml @@ -90,4 +90,4 @@ spec: selector: {{- include "codegen.selectorLabels" . | nindent 4 }} app: {{ include "codegen.fullname" . }}-nginx - type: NodePort + type: {{ .Values.nginx.service.type }} diff --git a/helm-charts/codegen/values.yaml b/helm-charts/codegen/values.yaml index b418194c..17f7355d 100644 --- a/helm-charts/codegen/values.yaml +++ b/helm-charts/codegen/values.yaml @@ -18,6 +18,10 @@ service: type: ClusterIP port: 7778 +nginx: + service: + type: NodePort + securityContext: readOnlyRootFilesystem: true allowPrivilegeEscalation: false diff --git a/helm-charts/codetrans/templates/nginx-deployment.yaml b/helm-charts/codetrans/templates/nginx-deployment.yaml index 9553557b..6b39f071 100644 --- a/helm-charts/codetrans/templates/nginx-deployment.yaml +++ b/helm-charts/codetrans/templates/nginx-deployment.yaml @@ -90,4 +90,4 @@ spec: selector: {{- include "codetrans.selectorLabels" . | nindent 4 }} app: {{ include "codetrans.fullname" . }}-nginx - type: NodePort + type: {{ .Values.nginx.service.type }} diff --git a/helm-charts/codetrans/values.yaml b/helm-charts/codetrans/values.yaml index 84153032..90f2cd48 100644 --- a/helm-charts/codetrans/values.yaml +++ b/helm-charts/codetrans/values.yaml @@ -19,6 +19,10 @@ service: type: ClusterIP port: 7777 +nginx: + service: + type: NodePort + securityContext: readOnlyRootFilesystem: true allowPrivilegeEscalation: false diff --git a/helm-charts/common/ui/templates/tests/test-pod.yaml b/helm-charts/common/ui/templates/tests/test-pod.yaml index db92a558..5c320d59 100644 --- a/helm-charts/common/ui/templates/tests/test-pod.yaml +++ b/helm-charts/common/ui/templates/tests/test-pod.yaml @@ -13,11 +13,15 @@ metadata: spec: containers: - name: curl - image: alpine/curl - #image: python:3.10.14 - command: ['sh', '-c'] + image: python:3.10.14 + command: ['bash', '-c'] args: - | - curl http://{{ include "ui.fullname" . }}:{{ .Values.service.port }} -sS --fail-with-body \ - -X GET + max_retry=20; + for ((i=1; i<=max_retry; i++)); do + curl http://{{ include "ui.fullname" . }}:{{ .Values.service.port }} -sS --fail-with-body -X GET && break; + curlcode=$? + if [[ $curlcode -eq 7 ]]; then sleep 10; else echo "curl failed with code $curlcode"; exit 1; fi; + done; + if [ $i -gt $max_retry ]; then echo "test failed with maximum retry"; exit 1; fi restartPolicy: Never diff --git a/helm-charts/docsum/templates/nginx-deployment.yaml b/helm-charts/docsum/templates/nginx-deployment.yaml index 47171a01..890edac2 100644 --- a/helm-charts/docsum/templates/nginx-deployment.yaml +++ b/helm-charts/docsum/templates/nginx-deployment.yaml @@ -90,4 +90,4 @@ spec: selector: {{- include "docsum.selectorLabels" . | nindent 4 }} app: {{ include "docsum.fullname" . }}-nginx - type: NodePort + type: {{ .Values.nginx.service.type }} diff --git a/helm-charts/docsum/templates/tests/test-pod.yaml b/helm-charts/docsum/templates/tests/test-pod.yaml index b60fc962..50c5730b 100644 --- a/helm-charts/docsum/templates/tests/test-pod.yaml +++ b/helm-charts/docsum/templates/tests/test-pod.yaml @@ -20,8 +20,9 @@ spec: max_retry=20; for ((i=1; i<=max_retry; i++)); do curl http://{{ include "docsum.fullname" . }}:{{ .Values.service.port }}/v1/docsum -sS --fail-with-body \ - -H 'Content-Type: application/json' \ - -d '{"messages": "Text Embeddings Inference (TEI) is a toolkit for deploying and serving open source text embeddings and sequence classification models. TEI enables high-performance extraction for the most popular models, including FlagEmbedding, Ember, GTE and E5."}' && break; + -H 'Content-Type: multipart/form-data' \ + -F "messages=Text Embeddings Inference (TEI) is a toolkit for deploying and serving open source text embeddings and sequence classification models. TEI enables high-performance extraction for the most popular models, including FlagEmbedding, Ember, GTE and E5." \ + -F "max_tokens=32" && break; curlcode=$? if [[ $curlcode -eq 7 ]]; then sleep 10; else echo "curl failed with code $curlcode"; exit 1; fi; done; diff --git a/helm-charts/docsum/values.yaml b/helm-charts/docsum/values.yaml index 6e9e10e9..0030609f 100644 --- a/helm-charts/docsum/values.yaml +++ b/helm-charts/docsum/values.yaml @@ -19,6 +19,10 @@ service: type: ClusterIP port: 8888 +nginx: + service: + type: NodePort + securityContext: readOnlyRootFilesystem: true allowPrivilegeEscalation: false