From 0c7442c14e1963890cd70291c44d6935fa0ad5bb Mon Sep 17 00:00:00 2001 From: Hyeonki Hong Date: Sat, 30 Aug 2025 00:48:35 +0900 Subject: [PATCH 1/3] feat(helm): add affinity and tolerations to epp-deployment Signed-off-by: Hyeonki Hong --- config/charts/inferencepool/templates/epp-deployment.yaml | 8 ++++++++ config/charts/inferencepool/values.yaml | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/config/charts/inferencepool/templates/epp-deployment.yaml b/config/charts/inferencepool/templates/epp-deployment.yaml index 3d210fc82..76f0c5f59 100644 --- a/config/charts/inferencepool/templates/epp-deployment.yaml +++ b/config/charts/inferencepool/templates/epp-deployment.yaml @@ -87,3 +87,11 @@ spec: - name: plugins-config-volume configMap: name: {{ include "gateway-api-inference-extension.name" . }} + {{- with .Values.inferenceExtension.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.inferenceExtension.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/config/charts/inferencepool/values.yaml b/config/charts/inferencepool/values.yaml index 443085ef5..091829ce0 100644 --- a/config/charts/inferencepool/values.yaml +++ b/config/charts/inferencepool/values.yaml @@ -36,6 +36,10 @@ inferenceExtension: - name: v value: 1 + affinity: {} + + tolerations: [] + inferencePool: targetPorts: - number: 8000 From 7b527331611a7fef9acb92cf2bce29fcba755720 Mon Sep 17 00:00:00 2001 From: Hyeonki Hong Date: Sat, 30 Aug 2025 19:38:22 +0900 Subject: [PATCH 2/3] docs(helm): add affinity and tolerations to inferencepool chart README Signed-off-by: Hyeonki Hong --- config/charts/inferencepool/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/charts/inferencepool/README.md b/config/charts/inferencepool/README.md index 5bbbac7cb..38204c044 100644 --- a/config/charts/inferencepool/README.md +++ b/config/charts/inferencepool/README.md @@ -123,6 +123,8 @@ The following table list the configurable parameters of the chart. | `inferenceExtension.extraContainerPorts` | List of additional container ports to expose. Defaults to `[]`. | | `inferenceExtension.extraServicePorts` | List of additional service ports to expose. Defaults to `[]`. | | `inferenceExtension.flags` | List of flags which are passed through to endpoint picker. Example flags, enable-pprof, grpc-port etc. Refer [runner.go](https://github.com/kubernetes-sigs/gateway-api-inference-extension/blob/main/cmd/epp/runner/runner.go) for complete list. | +| `inferenceExtension.affinity` | Affinity for the endpoint picker. Defaults to `{}`. | +| `inferenceExtension.tolerations` | Tolerations for the endpoint picker. Defaults to `[]`. | | `inferenceExtension.flags.has-enable-leader-election` | Enable leader election for high availability. When enabled, only one EPP pod (the leader) will be ready to serve traffic. | | `provider.name` | Name of the Inference Gateway implementation being used. Possible values: `gke`. Defaults to `none`. | From d6f2bcc3f1c01de6340a0390259298b72b20e1ad Mon Sep 17 00:00:00 2001 From: Hyeonki Hong Date: Mon, 1 Sep 2025 14:56:10 +0900 Subject: [PATCH 3/3] chore(helm): use `if` instead of `with` Signed-off-by: Hyeonki Hong --- .../inferencepool/templates/epp-deployment.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/config/charts/inferencepool/templates/epp-deployment.yaml b/config/charts/inferencepool/templates/epp-deployment.yaml index 76f0c5f59..cd5f2009c 100644 --- a/config/charts/inferencepool/templates/epp-deployment.yaml +++ b/config/charts/inferencepool/templates/epp-deployment.yaml @@ -49,8 +49,8 @@ spec: containerPort: 9003 - name: metrics containerPort: 9090 - {{- with .Values.inferenceExtension.extraContainerPorts }} - {{- toYaml . | nindent 8 }} + {{- if .Values.inferenceExtension.extraContainerPorts }} + {{- toYaml .Values.inferenceExtension.extraContainerPorts | nindent 8 }} {{- end }} livenessProbe: {{- if .Values.inferenceExtension.enableLeaderElection }} @@ -76,9 +76,9 @@ spec: {{- end }} initialDelaySeconds: 5 periodSeconds: 10 - {{- with .Values.inferenceExtension.env }} + {{- if .Values.inferenceExtension.env }} env: - {{- toYaml . | nindent 8 }} + {{- toYaml .Values.inferenceExtension.env | nindent 8 }} {{- end }} volumeMounts: - name: plugins-config-volume @@ -87,11 +87,11 @@ spec: - name: plugins-config-volume configMap: name: {{ include "gateway-api-inference-extension.name" . }} - {{- with .Values.inferenceExtension.affinity }} + {{- if .Values.inferenceExtension.affinity }} affinity: - {{- toYaml . | nindent 8 }} + {{- toYaml .Values.inferenceExtension.affinity | nindent 8 }} {{- end }} - {{- with .Values.inferenceExtension.tolerations }} + {{- if .Values.inferenceExtension.tolerations }} tolerations: - {{- toYaml . | nindent 8 }} + {{- toYaml .Values.inferenceExtension.tolerations | nindent 8 }} {{- end }}