From 48f893daba7b770d2fc409b3751ef86b17abe0ae Mon Sep 17 00:00:00 2001 From: Remy Date: Fri, 12 Apr 2024 13:59:06 +0200 Subject: [PATCH] feat(chart): search api exposed directly with ALB (#2708) --- chart/templates/services/search/ingress.yaml | 33 ++++++++++++++++++++ chart/values.yaml | 2 ++ 2 files changed, 35 insertions(+) create mode 100644 chart/templates/services/search/ingress.yaml diff --git a/chart/templates/services/search/ingress.yaml b/chart/templates/services/search/ingress.yaml new file mode 100644 index 0000000000..3f000f52e7 --- /dev/null +++ b/chart/templates/services/search/ingress.yaml @@ -0,0 +1,33 @@ +{{- if and .Values.global.huggingface.ingress.enabled .Values.ingress.enabled .Values.search.ingress.enabled -}} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + {{- $annotations := fromYaml (include "datasetsServer.ingress.annotations" .) }} + annotations: {{ toYaml $annotations | nindent 4 }} + labels: {{ include "labels.search" . | nindent 4 }} + name: "{{ include "name" . }}-search" + namespace: {{ .Release.Namespace }} +spec: + rules: + - host: {{ include "datasetsServer.ingress.hostname" . }} + http: + paths: + - backend: + service: + name: "{{ include "name" . }}-search" + port: + name: http + path: /search + pathType: Prefix + {{- if include "hf.common.ingress.certManagerRequest" ( dict "annotations" $annotations ) }} + tls: + - hosts: + - {{ include "datasetsServer.ingress.hostname" . }} + secretName: {{ printf "%s-tls" (include "datasetsServer.ingress.hostname" .) }} + {{- else if .Values.ingress.tls -}} + {{- with .Values.ingress.tls }} + tls: + {{- tpl (toYaml .) $ | nindent 4 }} + {{- end }} + {{- end }} +{{- end }} diff --git a/chart/values.yaml b/chart/values.yaml index 19358db964..489e7bda33 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -583,6 +583,8 @@ search: service: type: "" annotations: {} + ingress: + enabled: true tolerations: [] sseApi: