Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions helm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ Set `servingEngineSpec.modelSpec[].raySpec.enabled: true` to deploy the model as
| `cacheserverSpec.serviceType` | string | `"ClusterIP"` | Kubernetes service type for the cache server |
| `cacheserverSpec.servicePort` | integer | `80` | Port the cache server service will listen on |
| `cacheserverSpec.resources` | map | `{}` | Resource requests and limits |
| `cacheserverSpec.env` | list | `[]` | Extra environment variables for the cache server container, e.g. to configure LMCache's eviction policy via `LMCACHE_CACHE_POLICY` and `LMCACHE_MAX_LOCAL_CPU_SIZE` |
| `cacheserverSpec.labels` | map | `{environment: "cache", release: "cache"}` | Customized labels for the cache server deployment |
| `cacheserverSpec.strategy` | map | `{}` | Deployment strategy for the cache server pods |
| `cacheserverSpec.livenessProbe` | map | `{initialDelaySeconds: 15, periodSeconds: 10, failureThreshold: 3, httpGet: {path: /health, port: 8000}}` | Configuration for the liveness probe |
Expand Down
4 changes: 4 additions & 0 deletions helm/templates/deployment-cache-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ spec:
- "/opt/venv/bin/lmcache_server"
- "0.0.0.0"
- "{{ .Values.cacheserverSpec.containerPort }}"
{{- with .Values.cacheserverSpec.env }}
env:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.cacheserverSpec.resources }}
resources:
{{- toYaml . | nindent 12 }}
Expand Down
13 changes: 13 additions & 0 deletions helm/tests/cacheserver_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ tests:
requests:
cpu: "0.5"
memory: "512Mi"
env:
- name: LMCACHE_CACHE_POLICY
value: "LRU"
- name: LMCACHE_MAX_LOCAL_CPU_SIZE
value: "16"
annotations:
annotation-key: annotation-value
labels:
Expand Down Expand Up @@ -165,6 +170,14 @@ tests:
path: spec.template.spec.containers[0].imagePullPolicy
value: "Always"

- equal:
path: spec.template.spec.containers[0].env
value:
- name: LMCACHE_CACHE_POLICY
value: "LRU"
- name: LMCACHE_MAX_LOCAL_CPU_SIZE
value: "16"

- equal:
path: spec.template.spec.containers[0].livenessProbe
value:
Expand Down
4 changes: 4 additions & 0 deletions helm/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
"description": "Whether to enable the cache server",
"type": "boolean"
},
"env": {
"description": "Extra environment variables for the cache server container, e.g. to configure LMCache's eviction policy via `LMCACHE_CACHE_POLICY` and `LMCACHE_MAX_LOCAL_CPU_SIZE` (https://docs.lmcache.ai/api_reference/configurations.html)",
"type": "array"
},
"image": {
"description": "Image configuration for the cache Server",
"type": "object",
Expand Down
4 changes: 4 additions & 0 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,10 @@ cacheserverSpec:
serviceAnnotations: {}
# -- Resource requests and limits for the cache server container
resources: {}
# -- Extra environment variables for the cache server container, e.g. to
# configure LMCache's eviction policy via `LMCACHE_CACHE_POLICY` and
# `LMCACHE_MAX_LOCAL_CPU_SIZE` (https://docs.lmcache.ai/api_reference/configurations.html)
env: []
# -- Customized annotations for the cache server deployment
annotations: {}
# -- Customized labels for the cache server deployment and service
Expand Down