Skip to content

Commit

Permalink
helm: update data-prep to latest changes (#283)
Browse files Browse the repository at this point in the history
Update data-prep to use single port based on PR opea-project/GenAIComps#424.

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
  • Loading branch information
lianhao authored Aug 9, 2024
1 parent c412aa3 commit 625899b
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 42 deletions.
6 changes: 0 additions & 6 deletions helm-charts/common/data-prep/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,6 @@ spec:
- name: data-prep
containerPort: 6007
protocol: TCP
# The following need to be modified after GenAIComps bug #282 is resolved.
# https://github.com/opea-project/GenAIComps/issues/282
- containerPort: 6008
protocol: TCP
- containerPort: 6009
protocol: TCP
volumeMounts:
- mountPath: /tmp
name: tmp
Expand Down
8 changes: 3 additions & 5 deletions helm-charts/common/data-prep/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@ metadata:
spec:
type: {{ .Values.service.type }}
ports:
{{- range .Values.service.ports }}
- port: {{ .port }}
targetPort: {{ .targetPort }}
- port: {{ .Values.service.port }}
targetPort: 6007
protocol: TCP
name: {{ .name }}
{{- end }}
name: data-prep
selector:
{{- include "data-prep.selectorLabels" . | nindent 4 }}
5 changes: 1 addition & 4 deletions helm-charts/common/data-prep/templates/tests/test-pod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,9 @@ spec:
args:
- |
echo "test file" > /tmp/file1.txt;
{{- with index .Values.service.ports 0 }}
export port={{.port}};
{{- end }}
max_retry=20;
for ((i=1; i<=max_retry; i++)); do
curl http://{{ include "data-prep.fullname" . }}:$port/v1/dataprep -sS --fail-with-body \
curl http://{{ include "data-prep.fullname" . }}:{{ .Values.service.port }}/v1/dataprep -sS --fail-with-body \
-X POST \
-H "Content-Type: multipart/form-data" \
-F "files=@/tmp/file1.txt" && break;
Expand Down
14 changes: 1 addition & 13 deletions helm-charts/common/data-prep/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,7 @@ securityContext:

service:
type: ClusterIP
# The following need to be modified after GenAIComps bug #282 is resolved.
# https://github.com/opea-project/GenAIComps/issues/282
ports:
# The default port for data prep service is 6007
- port: 6007
targetPort: 6007
name: data-prep
- port: 6008
targetPort: 6008
name: data-prep-get
- port: 6009
targetPort: 6009
name: data-prep-delete
port: 6007

resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
Expand Down
14 changes: 0 additions & 14 deletions microservices-connector/config/manifests/data-prep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,6 @@ spec:
targetPort: 6007
protocol: TCP
name: data-prep
- port: 6008
targetPort: 6008
protocol: TCP
name: data-prep-get
- port: 6009
targetPort: 6009
protocol: TCP
name: data-prep-delete
selector:
app.kubernetes.io/name: data-prep
app.kubernetes.io/instance: data-prep
Expand Down Expand Up @@ -112,12 +104,6 @@ spec:
- name: data-prep
containerPort: 6007
protocol: TCP
# The following need to be modified after GenAIComps bug #282 is resolved.
# https://github.com/opea-project/GenAIComps/issues/282
- containerPort: 6008
protocol: TCP
- containerPort: 6009
protocol: TCP
volumeMounts:
- mountPath: /tmp
name: tmp
Expand Down

0 comments on commit 625899b

Please sign in to comment.