Skip to content
Draft
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
6 changes: 3 additions & 3 deletions helm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,12 @@ The following table lists the configurable parameters of the ModelExpress chart
| `persistence.size` | Storage size | `10Gi` |
| `persistence.mountPath` | Mount path | `/root` |
| `env.MODEL_EXPRESS_SERVER_PORT` | Server port | `8001` |
| `env.MODEL_EXPRESS_LOGGING_LEVEL` | Logging level | `info` |
| `env.MODEL_EXPRESS_LOG_LEVEL` | Logging level | `info` |
| `env.MODEL_EXPRESS_CACHE_DIRECTORY` | Cache directory | `/app/cache` |
| `env.MX_METADATA_BACKEND` | Distributed backend (`redis` or `kubernetes`). Server fails to start without this. | `<required>` |
| `env.REDIS_URL` | Redis connection URL; required when backend is `redis`. Chart does not bundle Redis. | `<required when backend=redis>` |
| `livenessProbe.enabled` | Enable liveness probe | `true` |
| `readinessProbe.enabled` | Enable readiness probe | `true` |
| `livenessProbe.enabled` | Enable liveness probe (remaining keys render verbatim; default handler is `grpc`) | `true` |
| `readinessProbe.enabled` | Enable readiness probe (remaining keys render verbatim; default handler is `grpc`) | `true` |
| `nodeSelector` | Node selector | `{}` |
| `tolerations` | Tolerations | `[]` |
| `affinity` | Affinity rules | `{}` |
Expand Down
31 changes: 14 additions & 17 deletions helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ spec:
imagePullPolicy: {{ .Values.image.pullPolicy | default "IfNotPresent" }}
{{- end }}
ports:
- name: http
- name: grpc
containerPort: {{ .Values.service.port | default 8001 }}
protocol: TCP
env:
Expand Down Expand Up @@ -96,26 +96,23 @@ spec:
{{- toYaml .Values.args | nindent 12 }}
{{- end }}
{{- if and .Values.livenessProbe .Values.livenessProbe.enabled }}
{{- $liveness := omit .Values.livenessProbe "enabled" }}
{{- /* A probe allows exactly one handler. Helm deep-merges values,
so an override with tcpSocket/httpGet/exec would otherwise
combine with the default grpc handler; drop grpc in that case. */}}
{{- if or $liveness.tcpSocket $liveness.httpGet $liveness.exec }}
{{- $liveness = omit $liveness "grpc" }}
{{- end }}
livenessProbe:
{{- if .Values.livenessProbe.tcpSocket }}
tcpSocket:
{{- toYaml .Values.livenessProbe.tcpSocket | nindent 14 }}
{{- end }}
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds | default 5 }}
periodSeconds: {{ .Values.livenessProbe.periodSeconds | default 10 }}
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds | default 5 }}
failureThreshold: {{ .Values.livenessProbe.failureThreshold | default 3 }}
{{- toYaml $liveness | nindent 12 }}
{{- end }}
{{- if and .Values.readinessProbe .Values.readinessProbe.enabled }}
{{- $readiness := omit .Values.readinessProbe "enabled" }}
{{- if or $readiness.tcpSocket $readiness.httpGet $readiness.exec }}
{{- $readiness = omit $readiness "grpc" }}
{{- end }}
readinessProbe:
{{- if .Values.readinessProbe.tcpSocket }}
tcpSocket:
{{- toYaml .Values.readinessProbe.tcpSocket | nindent 14 }}
{{- end }}
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds | default 5 }}
periodSeconds: {{ .Values.readinessProbe.periodSeconds | default 10 }}
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds | default 5 }}
failureThreshold: {{ .Values.readinessProbe.failureThreshold | default 3 }}
{{- toYaml $readiness | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
Expand Down
5 changes: 3 additions & 2 deletions helm/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ spec:
type: {{ .Values.service.type | default "ClusterIP" }}
ports:
- port: {{ .Values.service.port | default 8001 }}
targetPort: http
targetPort: grpc
protocol: TCP
name: http
name: grpc
appProtocol: grpc
selector:
{{- include "modelexpress.selectorLabels" . | nindent 4 }}
6 changes: 3 additions & 3 deletions helm/test-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ persistence:

env:
MODEL_EXPRESS_SERVER_PORT: "8001"
MODEL_EXPRESS_LOGGING_LEVEL: "debug"
MODEL_EXPRESS_LOG_LEVEL: "debug"
MODEL_EXPRESS_CACHE_DIRECTORY: "/root"
MX_METADATA_BACKEND: "redis"
REDIS_URL: "redis://redis:6379"

livenessProbe:
enabled: true
tcpSocket:
grpc:
port: 8001
initialDelaySeconds: 15
periodSeconds: 10
Expand All @@ -57,7 +57,7 @@ livenessProbe:

readinessProbe:
enabled: true
tcpSocket:
grpc:
port: 8001
initialDelaySeconds: 15
periodSeconds: 10
Expand Down
6 changes: 3 additions & 3 deletions helm/values-development.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ persistence:

env:
MODEL_EXPRESS_SERVER_PORT: "8001"
MODEL_EXPRESS_LOGGING_LEVEL: "debug"
MODEL_EXPRESS_LOG_LEVEL: "debug"
MODEL_EXPRESS_CACHE_DIRECTORY: "/root"
# Distributed backend selection. Required — the server fails to start without it.
# This values file opinionates on Redis for dev convenience; override to
Expand All @@ -55,7 +55,7 @@ env:

livenessProbe:
enabled: true
tcpSocket:
grpc:
port: 8001
initialDelaySeconds: 15
periodSeconds: 30
Expand All @@ -64,7 +64,7 @@ livenessProbe:

readinessProbe:
enabled: true
tcpSocket:
grpc:
port: 8001
initialDelaySeconds: 15
periodSeconds: 10
Expand Down
6 changes: 3 additions & 3 deletions helm/values-local-storage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ extraVolumeMounts:

env:
MODEL_EXPRESS_SERVER_PORT: "8001"
MODEL_EXPRESS_LOGGING_LEVEL: "debug"
MODEL_EXPRESS_LOG_LEVEL: "debug"
MODEL_EXPRESS_CACHE_DIRECTORY: "/root"
# Note: HOME is set to /root so HuggingFace cache uses /root/.cache/huggingface
HOME: "/root"
Expand Down Expand Up @@ -96,7 +96,7 @@ extraEnv:

livenessProbe:
enabled: true
tcpSocket:
grpc:
port: 8001
initialDelaySeconds: 10
periodSeconds: 10
Expand All @@ -105,7 +105,7 @@ livenessProbe:

readinessProbe:
enabled: true
tcpSocket:
grpc:
port: 8001
initialDelaySeconds: 5
periodSeconds: 5
Expand Down
6 changes: 3 additions & 3 deletions helm/values-production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ persistence:

env:
MODEL_EXPRESS_SERVER_PORT: "8001"
MODEL_EXPRESS_LOGGING_LEVEL: "info"
MODEL_EXPRESS_LOG_LEVEL: "info"
MODEL_EXPRESS_CACHE_DIRECTORY: "/root"
MX_METADATA_BACKEND: "redis"
REDIS_URL: "redis://redis:6379"

livenessProbe:
enabled: true
tcpSocket:
grpc:
port: 8001
initialDelaySeconds: 15
periodSeconds: 10
Expand All @@ -74,7 +74,7 @@ livenessProbe:

readinessProbe:
enabled: true
tcpSocket:
grpc:
port: 8001
initialDelaySeconds: 15
periodSeconds: 5
Expand Down
6 changes: 3 additions & 3 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ persistence:

env:
MODEL_EXPRESS_SERVER_PORT: "8001"
MODEL_EXPRESS_LOGGING_LEVEL: "info"
MODEL_EXPRESS_LOG_LEVEL: "info"
MODEL_EXPRESS_CACHE_DIRECTORY: "/root"
# Distributed backend selection. Required — the server fails to start without it.
# Set MX_METADATA_BACKEND to "redis" or "kubernetes"; it drives both the P2P metadata
Expand All @@ -109,7 +109,7 @@ env:

livenessProbe:
enabled: true
tcpSocket:
grpc:
port: 8001
initialDelaySeconds: 15
periodSeconds: 10
Expand All @@ -118,7 +118,7 @@ livenessProbe:

readinessProbe:
enabled: true
tcpSocket:
grpc:
port: 8001
initialDelaySeconds: 15
periodSeconds: 10
Expand Down
Loading