diff --git a/helm/README.md b/helm/README.md index 0053f7f4a..ec158c455 100644 --- a/helm/README.md +++ b/helm/README.md @@ -257,6 +257,7 @@ This table documents all available configuration values for the Production Stack | `routerSpec.podAnnotations` | map | `{}` | (Optional) Annotations to add to the pod, e.g., {model: "opt125m"} | | `routerSpec.affinity` | map | {} | (Optional) Affinity configuration. If specified, this takes precedence over `nodeSelectorTerms`. | | `routerSpec.nodeSelectorTerms` | list | `[]` | (Optional) Node selector terms. This is ignored if `affinity` is specified. | +| `routerSpec.tolerations` | list | `[]` | (Optional) Tolerations configuration for the router pod. Use when the router should schedule onto tainted nodes (e.g., a dedicated node pool). Mirrors `servingEngineSpec.tolerations` for the engine. | | `routerSpec.hf_token` | string | `""`| Hugging Face token for router | | `routerSpec.lmcacheControllerPort` | integer | `""` | LMCache controller port, used when `routingLogic` is `"kvaware"` (e.g. `9000`) | | `routerSpec.lmcacheConfig.logLevel` | string | `"INFO"`| Log level for LMCache in the router when routingLogic is kvaware | diff --git a/helm/templates/deployment-router.yaml b/helm/templates/deployment-router.yaml index 47c065bc0..7ba41db5a 100644 --- a/helm/templates/deployment-router.yaml +++ b/helm/templates/deployment-router.yaml @@ -42,6 +42,10 @@ spec: {{- toYaml . | nindent 12 }} {{- end }} {{- end }} + {{- with .Values.routerSpec.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} {{- with .Values.routerSpec.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} diff --git a/helm/tests/deployment-router_test.yaml b/helm/tests/deployment-router_test.yaml index 6a29df6b1..5a5ffc4ec 100644 --- a/helm/tests/deployment-router_test.yaml +++ b/helm/tests/deployment-router_test.yaml @@ -233,3 +233,29 @@ tests: secretKeyRef: name: custom-secret key: custom-apikey + + - it: should not render tolerations by default + set: + routerSpec: + enableRouter: true + asserts: + - notExists: + path: spec.template.spec.tolerations + + - it: should render tolerations when routerSpec.tolerations is set + set: + routerSpec: + enableRouter: true + tolerations: + - key: dedicated + operator: Equal + value: router + effect: NoSchedule + asserts: + - equal: + path: spec.template.spec.tolerations + value: + - key: dedicated + operator: Equal + value: router + effect: NoSchedule diff --git a/helm/values.schema.json b/helm/values.schema.json index 432b72019..e4fc71b8b 100644 --- a/helm/values.schema.json +++ b/helm/values.schema.json @@ -997,6 +997,10 @@ "description": "docker tag for the router pod", "type": "string" }, + "tolerations": { + "description": "Tolerations configuration for the router pod (when there are taints on nodes). Mirrors servingEngineSpec.tolerations for the engine deployment.", + "type": "array" + }, "vllmApiKey": { "description": "API key for securing the vLLM models. Must be an object referencing an existing secret. If not set, it defaults to .Values.servingEngineSpec.vllmApiKey.", "type": "object", diff --git a/helm/values.yaml b/helm/values.yaml index 3cc8a3125..b643df294 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -676,6 +676,16 @@ routerSpec: # values: # - "NVIDIA-RTX-A6000" + # -- Tolerations configuration for the router pod (when there are taints on nodes). + # Mirrors servingEngineSpec.tolerations for the engine deployment. + # Example: + # tolerations: + # - key: "dedicated" + # operator: "Equal" + # value: "router" + # effect: "NoSchedule" + tolerations: [] + # -- Liveness probe configuration for the router pod. livenessProbe: # -- Number of seconds after the container has started before liveness probe is initiated