Skip to content

Commit 42b9752

Browse files
committed
Helm: Adds Istio to Provier Scope
Signed-off-by: Daneyon Hansen <[email protected]>
1 parent 3e930cb commit 42b9752

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
@@ -85,12 +85,25 @@ provider:
8585
# Set to true if the cluster is an Autopilot cluster.
8686
autopilot: false
8787

88+
# Istio-specific configuration.
89+
# This block is only used if name is "istio".
90+
istio:
91+
destinationRule:
92+
# Provide a way to override the default calculated host
93+
host: ""
94+
# Optional: Enables customization of the traffic policy
95+
trafficPolicy: {}
96+
# connectionPool:
97+
# http:
98+
# maxRequestsPerConnection: 256000
99+
100+
# DEPRECATED and will be removed in v1.3. Instead, use `provider.istio.*`.
88101
istio:
89102
destinationRule:
90103
# Provide a way to override the default calculated host
91-
host: ""
104+
host: ""
92105
# Optional: Enables customization of the traffic policy
93106
trafficPolicy: {}
94107
# connectionPool:
95108
# http:
96-
# maxRequestsPerConnection: 256000
109+
# maxRequestsPerConnection: 256000

0 commit comments

Comments
 (0)