vllm/.helm/templates/sts.yaml

118 lines
3.3 KiB
YAML
Raw Normal View History

2026-09-09 14:12:08 +00:00
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: {{ .Chart.Name }}
labels:
app: {{ .Chart.Name }}
spec:
serviceName: {{ .Chart.Name }}
minReadySeconds: 10
updateStrategy:
type: RollingUpdate
replicas: 1
selector:
matchLabels:
app: {{ .Chart.Name }}
template:
metadata:
labels:
app: {{ .Chart.Name }}
spec:
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchLabels:
app: {{ .Chart.Name }}
topologyKey: kubernetes.io/hostname
weight: 100
{{- if and .Values.gpu.enabled .Values.gpu.nodeSelector }}
nodeSelector: {{ toYaml .Values.gpu.nodeSelector | nindent 8 }}
{{- end }}
{{- if and .Values.gpu.enabled .Values.gpu.tolerations }}
tolerations: {{ toYaml .Values.gpu.tolerations | nindent 6 }}
2026-09-09 14:12:08 +00:00
{{- end }}
imagePullSecrets:
- name: registrysecret
containers:
- name: {{ .Chart.Name }}
image: {{ .Values.werf.image.vllm }}
imagePullPolicy: IfNotPresent
volumeMounts:
- name: data
mountPath: /root/.cache/huggingface
ports:
- name: http
containerPort: {{ .Values.port }}
protocol: TCP
args:
- {{ .Values.env.VLLM_MODEL }}
- --async-scheduling
- --host
- 0.0.0.0
- --port
- "{{ .Values.port }}"
- --gpu-memory-utilization
- "0.2"
- --max-model-len
- "{{ .Values.env.VLLM_MAX_MODEL_LEN }}"
- --enforce-eager
- --tensor-parallel-size
- "1"
- --trust-remote-code
- --chat-template-content-format
- "string"
env:
{{- range $n, $v := .Values.env }}
- name: {{ $n }}
value: {{ $v | quote }}
{{- end }}
livenessProbe:
httpGet:
path: /health
port: {{ .Values.port }}
initialDelaySeconds: 120
periodSeconds: 9
timeoutSeconds: 6
failureThreshold: 3
readinessProbe:
httpGet:
path: /v1/models
port: {{ .Values.port }}
initialDelaySeconds: 120
periodSeconds: 5
timeoutSeconds: 6
failureThreshold: 3
resources: {{ dig .Values.werf.env .Values.resources._default .Values.resources | toYaml | nindent 12 }}
volumeClaimTemplates:
- metadata:
name: data
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: {{ dig .Values.werf.env .Values.storage.class._default .Values.storage.class | quote }}
resources:
requests:
storage: {{ dig .Values.werf.env .Values.storage.size._default .Values.storage.size | quote }}
---
apiVersion: v1
kind: Service
metadata:
name: {{ .Chart.Name }}
labels:
app: {{ .Chart.Name }}
prometheus.deckhouse.io/custom-target: {{ .Chart.Name }}
annotations:
prometheus.deckhouse.io/port: "{{ .Values.port }}"
prometheus.deckhouse.io/path: "/metrics/"
spec:
type: ClusterIP
ports:
- port: {{ .Values.port }}
targetPort: http
protocol: TCP
name: http
selector:
app: {{ .Chart.Name }}