11# Copyright (C) 2025-2026 Intel Corporation
22# SPDX-License-Identifier: Apache-2.0
3- # Please edit the object below. Lines beginning with a '#' will be ignored,
4- # and an empty file will abort the edit. If an error occurs while saving this file will be
5- # reopened with the relevant failures.
63{{- if or .Values.ingress.enabled .Values.apisix.enabled }}
7- apiVersion : networking.k8s.io/v1
8- kind : Ingress
4+ {{- $modelName := .Values.EMBEDDING_MODEL_ID | splitList "/" | last }}
5+ apiVersion : gateway.networking.k8s.io/v1
6+ kind : HTTPRoute
97metadata :
10- annotations :
11- kubernetes.io/ingress.class : nginx
12- # nginx.ingress.kubernetes.io/rewrite-target: /{{ .Values.EMBEDDING_MODEL_ID | splitList "/" | last }}/$1
13- nginx.ingress.kubernetes.io/rewrite-target : {{- if and .Values.apisix.enabled .Values.accelDevice }}
14- /{{ .Values.EMBEDDING_MODEL_ID | splitList "/" | last }}/$1
15- {{- else if and .Values.apisix.enabled (not .Values.accelDevice) }}
16- /{{ .Values.EMBEDDING_MODEL_ID | splitList "/" | last }}-teicpu/$1
17- {{- else if not .Values.apisix.enabled }}
18- /$1
19- {{- end }}
20- creationTimestamp : " 2024-11-22T03:27:37Z"
21- generation : 1
228 labels :
239 {{- include "tei.labels" . | nindent 4 }}
24- name : {{ include "tei.fullname" . }}-ingress
10+ name : {{ include "tei.fullname" . }}-httproute
2511 namespace : {{- if .Values.apisix.enabled }}
2612 auth-apisix
2713 {{- else }}
2814 default
2915 {{- end }}
30- resourceVersion : " 244487"
31- uid : df2b31a1-6653-4d71-9de0-4df33cb93ad1
3216spec :
33- ingressClassName : nginx
17+ parentRefs :
18+ - name : enterprise-edge-gateway
19+ namespace : envoy-gateway-system
20+ hostnames :
21+ - {{ .Values.ingress.host }}
3422 rules :
35- - host : {{ .Values.ingress.host }}
36- http :
37- paths :
38- - backend :
39- service :
40- name : {{- if .Values.apisix.enabled }}
41- auth-apisix-gateway
42- {{- else }}
43- {{ include "tei.fullname" . }}-service
44- {{- end }}
45- port :
46- number : 80
47- # path: /{{ .Values.EMBEDDING_MODEL_ID | splitList "/" | last }}/(.*)
48- path : {{- if and .Values.apisix.enabled .Values.accelDevice }}
49- /{{ .Values.EMBEDDING_MODEL_ID | splitList "/" | last }}/(.*)
50- {{- else if and .Values.apisix.enabled (not .Values.accelDevice) }}
51- /{{ .Values.EMBEDDING_MODEL_ID | splitList "/" | last }}-teicpu/(.*)
52- {{- else if not .Values.apisix.enabled }}
53- /{{ .Values.EMBEDDING_MODEL_ID | splitList "/" | last }}/(.*)
23+ - matches :
24+ - path :
25+ type : PathPrefix
26+ value : {{- if and .Values.apisix.enabled .Values.accelDevice }}
27+ /{{ $modelName }}
28+ {{- else if and .Values.apisix.enabled (not .Values.accelDevice) }}
29+ /{{ $modelName }}-teicpu
30+ {{- else }}
31+ /{{ $modelName }}
32+ {{- end }}
33+ {{- if not .Values.apisix.enabled }}
34+ filters :
35+ - type : URLRewrite
36+ urlRewrite :
37+ path :
38+ type : ReplacePrefixMatch
39+ replacePrefixMatch : /
40+ {{- end }}
41+ backendRefs :
42+ - name : {{- if .Values.apisix.enabled }}
43+ auth-apisix-gateway
44+ {{- else }}
45+ {{ include "tei.fullname" . }}-service
5446 {{- end }}
55- pathType : ImplementationSpecific
56- tls :
57- - hosts :
58- - {{ .Values.ingress.host }}
59- secretName : {{ .Values.ingress.secretname }}
47+ port : 80
6048{{- end }}
0 commit comments