From f782177967ed59ed4acf530ced6ce69ef85ee26c Mon Sep 17 00:00:00 2001 From: Hang Yin Date: Thu, 4 Dec 2025 17:20:51 +0800 Subject: [PATCH 1/2] (helm) support custom volumes and volumeMounts for epp Signed-off-by: Hang Yin --- config/charts/inferencepool/README.md | 15 +++++++++++++++ .../inferencepool/templates/epp-config.yaml | 2 +- .../inferencepool/templates/epp-deployment.yaml | 6 ++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/config/charts/inferencepool/README.md b/config/charts/inferencepool/README.md index 769b964fa..46bdb261e 100644 --- a/config/charts/inferencepool/README.md +++ b/config/charts/inferencepool/README.md @@ -247,6 +247,21 @@ The following table list the configurable parameters of the chart. | `inferenceExtension.tracing.otelExporterEndpoint` | OpenTelemetry collector endpoint. | | `inferenceExtension.tracing.sampling.sampler` | The trace sampler to use. Currently, only `parentbased_traceidratio` is supported. This sampler respects the parent span’s sampling decision when present, and applies the configured ratio for root spans. | | `inferenceExtension.tracing.sampling.samplerArg` | Sampler-specific argument. For `parentbased_traceidratio`, this defines the base sampling rate for new traces (root spans), as a float string in the range [0.0, 1.0]. For example, "0.1" enables 10% sampling. | +| `inferenceExtension.volumes` | List of volumes to mount in the EPP deployment as free-form YAML. Optional. | +| `inferenceExtension.volumeMounts` | List of volume mounts for the EPP container as free-form YAML. Optional. | +| `inferenceExtension.sidecar.enabled` | Enables or disables the sidecar container in the EPP deployment. Defaults to `false`. | +| `inferenceExtension.sidecar.name` | Name of the sidecar container. Required when the sidecar is enabled. | +| `inferenceExtension.sidecar.image` | Image for the sidecar container. Required when the sidecar is enabled. | +| `inferenceExtension.sidecar.imagePullPolicy` | Image pull policy for the sidecar container. Possible values: `Always`, `IfNotPresent`, or `Never`. Defaults to `IfNotPresent`. | +| `inferenceExtension.sidecar.command` | Command to run in the sidecar container as a single string. Optional. | +| `inferenceExtension.sidecar.args` | Arguments to pass to the command in the sidecar container as a list of strings. Optional. | +| `inferenceExtension.sidecar.env` | Environment variables to set in the sidecar container as free-form YAML. Optional. | +| `inferenceExtension.sidecar.ports` | List of ports to expose for the sidecar container. Optional. | +| `inferenceExtension.sidecar.livenessProbe` | Liveness probe configuration for the sidecar container. Optional. | +| `inferenceExtension.sidecar.readinessProbe` | Readiness probe configuration for the sidecar container. Optional. | +| `inferenceExtension.sidecar.resources` | Resource limits and requests for the sidecar container. Optional. | +| `inferenceExtension.sidecar.volumeMounts` | List of volume mounts for the sidecar container. Optional. | +| `inferenceExtension.sidecar.volumes` | List of volumes for the sidecar container. Optional. | | `provider.name` | Name of the Inference Gateway implementation being used. Possible values: [`none`, `gke`, or `istio`]. Defaults to `none`. | | `provider.gke.autopilot` | Set to `true` if the cluster is a GKE Autopilot cluster. This is only used if `provider.name` is `gke`. Defaults to `false`. | diff --git a/config/charts/inferencepool/templates/epp-config.yaml b/config/charts/inferencepool/templates/epp-config.yaml index e082db793..75614b98c 100644 --- a/config/charts/inferencepool/templates/epp-config.yaml +++ b/config/charts/inferencepool/templates/epp-config.yaml @@ -64,7 +64,7 @@ data: {{- end }} --- -{{- if .Values.inferenceExtension.sidecar.enabled }} +{{- if and .Values.inferenceExtension.sidecar.enabled .Values.inferenceExtension.sidecar.configMap }} apiVersion: v1 kind: ConfigMap metadata: diff --git a/config/charts/inferencepool/templates/epp-deployment.yaml b/config/charts/inferencepool/templates/epp-deployment.yaml index f792874f2..20e6746c2 100644 --- a/config/charts/inferencepool/templates/epp-deployment.yaml +++ b/config/charts/inferencepool/templates/epp-deployment.yaml @@ -182,8 +182,14 @@ spec: volumeMounts: - name: plugins-config-volume mountPath: "/config" + {{- if .Values.inferenceExtension.volumeMounts }} + {{- tpl (toYaml .Values.inferenceExtension.volumeMounts) $ | nindent 8 }} + {{- end }} {{- include "gateway-api-inference-extension.latencyPredictor.containers" . | nindent 6 }} volumes: + {{- if .Values.inferenceExtension.volumes }} + {{- tpl (toYaml .Values.inferenceExtension.volumes) $ | nindent 6 }} + {{- end }} {{- if .Values.inferenceExtension.sidecar.volumes }} {{- tpl (toYaml .Values.inferenceExtension.sidecar.volumes) $ | nindent 6 }} {{- end }} From 5ecba15962b10a2d2a507e74d0f4610d2ef14d9c Mon Sep 17 00:00:00 2001 From: Hang Yin Date: Mon, 8 Dec 2025 18:02:28 +0800 Subject: [PATCH 2/2] fix for comments Signed-off-by: Hang Yin --- config/charts/inferencepool/README.md | 1 + config/charts/inferencepool/templates/epp-config.yaml | 6 +++--- config/charts/inferencepool/templates/epp-deployment.yaml | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/config/charts/inferencepool/README.md b/config/charts/inferencepool/README.md index 46bdb261e..013a1f2b3 100644 --- a/config/charts/inferencepool/README.md +++ b/config/charts/inferencepool/README.md @@ -262,6 +262,7 @@ The following table list the configurable parameters of the chart. | `inferenceExtension.sidecar.resources` | Resource limits and requests for the sidecar container. Optional. | | `inferenceExtension.sidecar.volumeMounts` | List of volume mounts for the sidecar container. Optional. | | `inferenceExtension.sidecar.volumes` | List of volumes for the sidecar container. Optional. | +| `inferenceExtension.sidecar.configMapData` | Custom key-value pairs to be included in a ConfigMap created for the sidecar container. Only used when `inferenceExtension.sidecar.enabled` is `true`. Optional. | | `provider.name` | Name of the Inference Gateway implementation being used. Possible values: [`none`, `gke`, or `istio`]. Defaults to `none`. | | `provider.gke.autopilot` | Set to `true` if the cluster is a GKE Autopilot cluster. This is only used if `provider.name` is `gke`. Defaults to `false`. | diff --git a/config/charts/inferencepool/templates/epp-config.yaml b/config/charts/inferencepool/templates/epp-config.yaml index 75614b98c..f34d5cf21 100644 --- a/config/charts/inferencepool/templates/epp-config.yaml +++ b/config/charts/inferencepool/templates/epp-config.yaml @@ -64,14 +64,14 @@ data: {{- end }} --- -{{- if and .Values.inferenceExtension.sidecar.enabled .Values.inferenceExtension.sidecar.configMap }} +{{- if and .Values.inferenceExtension.sidecar.enabled .Values.inferenceExtension.sidecar.configMapData }} apiVersion: v1 kind: ConfigMap metadata: - name: {{ .Values.inferenceExtension.sidecar.configMap.name }} + name: {{ include "gateway-api-inference-extension.name" . }}-sidecar namespace: {{ .Release.Namespace }} data: - {{- .Values.inferenceExtension.sidecar.configMap.data | toYaml | nindent 2 }} + {{- .Values.inferenceExtension.sidecar.configMapData | toYaml | nindent 2 }} {{- end }} --- {{- if .Values.inferenceExtension.latencyPredictor.enabled }} diff --git a/config/charts/inferencepool/templates/epp-deployment.yaml b/config/charts/inferencepool/templates/epp-deployment.yaml index 20e6746c2..b58c3b782 100644 --- a/config/charts/inferencepool/templates/epp-deployment.yaml +++ b/config/charts/inferencepool/templates/epp-deployment.yaml @@ -183,12 +183,12 @@ spec: - name: plugins-config-volume mountPath: "/config" {{- if .Values.inferenceExtension.volumeMounts }} - {{- tpl (toYaml .Values.inferenceExtension.volumeMounts) $ | nindent 8 }} + {{- toYaml .Values.inferenceExtension.volumeMounts | nindent 8 }} {{- end }} {{- include "gateway-api-inference-extension.latencyPredictor.containers" . | nindent 6 }} volumes: {{- if .Values.inferenceExtension.volumes }} - {{- tpl (toYaml .Values.inferenceExtension.volumes) $ | nindent 6 }} + {{- toYaml .Values.inferenceExtension.volumes | nindent 6 }} {{- end }} {{- if .Values.inferenceExtension.sidecar.volumes }} {{- tpl (toYaml .Values.inferenceExtension.sidecar.volumes) $ | nindent 6 }}