-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add helm test for chart retriever-usvc
- Add helm test for chart - Update the chart README - Add flag autodependency.enabled=true to automatically install dependency charts Signed-off-by: Lianhao Lu <[email protected]>
- Loading branch information
1 parent
3972089
commit 6db408a
Showing
5 changed files
with
71 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
26 changes: 26 additions & 0 deletions
26
helm-charts/common/retriever-usvc/templates/tests/test-pod.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Copyright (C) 2024 Intel Corporation | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: "{{ include "retriever-usvc.fullname" . }}-testpod" | ||
labels: | ||
{{- include "retriever-usvc.labels" . | nindent 4 }} | ||
annotations: | ||
"helm.sh/hook": test | ||
#"helm.sh/hook-delete-policy": "hook-succeeded, hook-failure" | ||
spec: | ||
containers: | ||
- name: curl | ||
#image: alpine/curl | ||
image: python:3.10.14 | ||
command: ['sh', '-c'] | ||
args: | ||
- | | ||
your_embedding=$(python3 -c "import random; embedding = [random.uniform(-1, 1) for _ in range(768)]; print(embedding)"); | ||
curl http://{{ include "retriever-usvc.fullname" . }}:{{ .Values.service.port }}/v1/retrieval -sS --fail-with-body \ | ||
-X POST \ | ||
-d "{\"text\":\"What is the revenue of Nike in 2023?\",\"embedding\":${your_embedding}}" \ | ||
-H 'Content-Type: application/json' | ||
restartPolicy: Never |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters