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`. | diff --git a/config/charts/inferencepool/templates/epp-deployment.yaml b/config/charts/inferencepool/templates/epp-deployment.yaml index 3d210fc82..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,3 +87,11 @@ spec: - name: plugins-config-volume configMap: name: {{ include "gateway-api-inference-extension.name" . }} + {{- if .Values.inferenceExtension.affinity }} + affinity: + {{- toYaml .Values.inferenceExtension.affinity | nindent 8 }} + {{- end }} + {{- if .Values.inferenceExtension.tolerations }} + tolerations: + {{- toYaml .Values.inferenceExtension.tolerations | 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