Skip to content

Commit a634467

Browse files
authored
feat(helm): add affinity and tolerations to epp-deployment (#1504)
* feat(helm): add affinity and tolerations to epp-deployment Signed-off-by: Hyeonki Hong <[email protected]> * docs(helm): add affinity and tolerations to inferencepool chart README Signed-off-by: Hyeonki Hong <[email protected]> * chore(helm): use `if` instead of `with` Signed-off-by: Hyeonki Hong <[email protected]> --------- Signed-off-by: Hyeonki Hong <[email protected]>
1 parent 93985b7 commit a634467

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

config/charts/inferencepool/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ The following table list the configurable parameters of the chart.
123123
| `inferenceExtension.extraContainerPorts` | List of additional container ports to expose. Defaults to `[]`. |
124124
| `inferenceExtension.extraServicePorts` | List of additional service ports to expose. Defaults to `[]`. |
125125
| `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. |
126+
| `inferenceExtension.affinity` | Affinity for the endpoint picker. Defaults to `{}`. |
127+
| `inferenceExtension.tolerations` | Tolerations for the endpoint picker. Defaults to `[]`. |
126128
| `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. |
127129
| `provider.name` | Name of the Inference Gateway implementation being used. Possible values: `gke`. Defaults to `none`. |
128130

config/charts/inferencepool/templates/epp-deployment.yaml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ spec:
5050
containerPort: 9003
5151
- name: metrics
5252
containerPort: 9090
53-
{{- with .Values.inferenceExtension.extraContainerPorts }}
54-
{{- toYaml . | nindent 8 }}
53+
{{- if .Values.inferenceExtension.extraContainerPorts }}
54+
{{- toYaml .Values.inferenceExtension.extraContainerPorts | nindent 8 }}
5555
{{- end }}
5656
livenessProbe:
5757
{{- if .Values.inferenceExtension.enableLeaderElection }}
@@ -77,9 +77,9 @@ spec:
7777
{{- end }}
7878
initialDelaySeconds: 5
7979
periodSeconds: 10
80-
{{- with .Values.inferenceExtension.env }}
80+
{{- if .Values.inferenceExtension.env }}
8181
env:
82-
{{- toYaml . | nindent 8 }}
82+
{{- toYaml .Values.inferenceExtension.env | nindent 8 }}
8383
{{- end }}
8484
volumeMounts:
8585
- name: plugins-config-volume
@@ -88,3 +88,11 @@ spec:
8888
- name: plugins-config-volume
8989
configMap:
9090
name: {{ include "gateway-api-inference-extension.name" . }}
91+
{{- if .Values.inferenceExtension.affinity }}
92+
affinity:
93+
{{- toYaml .Values.inferenceExtension.affinity | nindent 8 }}
94+
{{- end }}
95+
{{- if .Values.inferenceExtension.tolerations }}
96+
tolerations:
97+
{{- toYaml .Values.inferenceExtension.tolerations | nindent 8 }}
98+
{{- end }}

config/charts/inferencepool/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ inferenceExtension:
3636
- name: v
3737
value: 1
3838

39+
affinity: {}
40+
41+
tolerations: []
42+
3943
inferencePool:
4044
targetPorts:
4145
- number: 8000

0 commit comments

Comments
 (0)