From 42b97528a6a1a0aafda95b37784a8a20dd284d98 Mon Sep 17 00:00:00 2001 From: Daneyon Hansen Date: Fri, 7 Nov 2025 11:14:43 -0800 Subject: [PATCH] Helm: Adds Istio to Provier Scope Signed-off-by: Daneyon Hansen --- .../charts/inferencepool/templates/istio.yaml | 14 ++++++++++---- config/charts/inferencepool/values.yaml | 17 +++++++++++++++-- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/config/charts/inferencepool/templates/istio.yaml b/config/charts/inferencepool/templates/istio.yaml index b50c0b021..a0f9c8d8c 100644 --- a/config/charts/inferencepool/templates/istio.yaml +++ b/config/charts/inferencepool/templates/istio.yaml @@ -1,16 +1,22 @@ {{- if eq .Values.provider.name "istio" }} +{{- /* Prefer .Values.provider.istio, fallback to legacy .Values.istio, then {} */ -}} +{{- $provIstio := (index .Values "provider" "istio") -}} +{{- $legacyIstio := .Values.istio -}} +{{- $istio := coalesce $provIstio $legacyIstio (dict) -}} +{{- $dr := (index $istio "destinationRule") | default (dict) -}} + apiVersion: networking.istio.io/v1beta1 kind: DestinationRule metadata: name: {{ include "gateway-api-inference-extension.name" . }} spec: - host: {{ .Values.istio.destinationRule.host | default (printf "%s.%s.svc.cluster.local" (include "gateway-api-inference-extension.name" .) .Release.Namespace) }} + host: {{ (index $dr "host") | default (printf "%s.%s.svc.cluster.local" (include "gateway-api-inference-extension.name" .) .Release.Namespace) }} trafficPolicy: tls: mode: SIMPLE insecureSkipVerify: true - {{- if .Values.istio.destinationRule.trafficPolicy.connectionPool }} - connectionPool: - {{- .Values.istio.destinationRule.trafficPolicy.connectionPool | toYaml | nindent 6 }} + {{- with (index (index $dr "trafficPolicy") "connectionPool") }} + connectionPool: + {{- toYaml . | nindent 6 }} {{- end }} {{- end }} diff --git a/config/charts/inferencepool/values.yaml b/config/charts/inferencepool/values.yaml index daf2bfca4..3208a6700 100644 --- a/config/charts/inferencepool/values.yaml +++ b/config/charts/inferencepool/values.yaml @@ -85,12 +85,25 @@ provider: # Set to true if the cluster is an Autopilot cluster. autopilot: false + # Istio-specific configuration. + # This block is only used if name is "istio". + istio: + destinationRule: + # Provide a way to override the default calculated host + host: "" + # Optional: Enables customization of the traffic policy + trafficPolicy: {} + # connectionPool: + # http: + # maxRequestsPerConnection: 256000 + +# DEPRECATED and will be removed in v1.3. Instead, use `provider.istio.*`. istio: destinationRule: # Provide a way to override the default calculated host - host: "" + host: "" # Optional: Enables customization of the traffic policy trafficPolicy: {} # connectionPool: # http: - # maxRequestsPerConnection: 256000 \ No newline at end of file + # maxRequestsPerConnection: 256000