Skip to content

Commit fd5ce6b

Browse files
authored
Helm: Adds Istio to Provier Scope (#1831)
Signed-off-by: Daneyon Hansen <daneyon.hansen@solo.io>
1 parent 81deb19 commit fd5ce6b

File tree

2 files changed

+25
-6
lines changed

2 files changed

+25
-6
lines changed
Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
11
{{- if eq .Values.provider.name "istio" }}
2+
{{- /* Prefer .Values.provider.istio, fallback to legacy .Values.istio, then {} */ -}}
3+
{{- $provIstio := (index .Values "provider" "istio") -}}
4+
{{- $legacyIstio := .Values.istio -}}
5+
{{- $istio := coalesce $provIstio $legacyIstio (dict) -}}
6+
{{- $dr := (index $istio "destinationRule") | default (dict) -}}
7+
28
apiVersion: networking.istio.io/v1beta1
39
kind: DestinationRule
410
metadata:
511
name: {{ include "gateway-api-inference-extension.name" . }}
612
spec:
7-
host: {{ .Values.istio.destinationRule.host | default (printf "%s.%s.svc.cluster.local" (include "gateway-api-inference-extension.name" .) .Release.Namespace) }}
13+
host: {{ (index $dr "host") | default (printf "%s.%s.svc.cluster.local" (include "gateway-api-inference-extension.name" .) .Release.Namespace) }}
814
trafficPolicy:
915
tls:
1016
mode: SIMPLE
1117
insecureSkipVerify: true
12-
{{- if .Values.istio.destinationRule.trafficPolicy.connectionPool }}
13-
connectionPool:
14-
{{- .Values.istio.destinationRule.trafficPolicy.connectionPool | toYaml | nindent 6 }}
18+
{{- with (index (index $dr "trafficPolicy") "connectionPool") }}
19+
connectionPool:
20+
{{- toYaml . | nindent 6 }}
1521
{{- end }}
1622
{{- end }}

config/charts/inferencepool/values.yaml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,25 @@ provider:
9494
# Set to true if the cluster is an Autopilot cluster.
9595
autopilot: false
9696

97+
# Istio-specific configuration.
98+
# This block is only used if name is "istio".
99+
istio:
100+
destinationRule:
101+
# Provide a way to override the default calculated host
102+
host: ""
103+
# Optional: Enables customization of the traffic policy
104+
trafficPolicy: {}
105+
# connectionPool:
106+
# http:
107+
# maxRequestsPerConnection: 256000
108+
109+
# DEPRECATED and will be removed in v1.3. Instead, use `provider.istio.*`.
97110
istio:
98111
destinationRule:
99112
# Provide a way to override the default calculated host
100-
host: ""
113+
host: ""
101114
# Optional: Enables customization of the traffic policy
102115
trafficPolicy: {}
103116
# connectionPool:
104117
# http:
105-
# maxRequestsPerConnection: 256000
118+
# maxRequestsPerConnection: 256000

0 commit comments

Comments
 (0)