[Bugfix][Helm] Fix chart resource references (#51664)
Signed-off-by: iwannagotobed <us990704@yonsei.ac.kr> Co-authored-by: Chauncey <chaunceyjiang@gmail.com>
This commit is contained in:
co-authored by
Chauncey
parent
69e0e58da1
commit
aa31003573
@@ -15,7 +15,7 @@ type: application
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 0.0.1
|
||||
version: 0.0.2
|
||||
|
||||
maintainers:
|
||||
- name: mfournioux
|
||||
|
||||
@@ -12,10 +12,17 @@ Define service name
|
||||
{{- if .Values.serviceName }}
|
||||
{{- .Values.serviceName | lower | trim }}
|
||||
{{- else }}
|
||||
"{{ .Release.Name }}-service"
|
||||
{{- printf "%s-service" .Release.Name }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Define deployment name
|
||||
*/}}
|
||||
{{- define "chart.deployment-name" -}}
|
||||
{{- printf "%s-deployment-vllm" .Release.Name }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Define service port
|
||||
*/}}
|
||||
@@ -162,4 +169,4 @@ runAsUser:
|
||||
{{- with .Values.labels -}}
|
||||
{{ toYaml . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
@@ -1,23 +1,21 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: "{{ .Release.Name }}-deployment-vllm"
|
||||
name: {{ include "chart.deployment-name" . | quote }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "chart.labels" . | nindent 4 }}
|
||||
spec:
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
{{- include "chart.strategy" . | nindent 2 }}
|
||||
selector:
|
||||
selector:
|
||||
matchLabels:
|
||||
environment: "test"
|
||||
release: "test"
|
||||
{{- include "chart.labels" . | nindent 6 }}
|
||||
progressDeadlineSeconds: 1200
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
environment: "test"
|
||||
release: "test"
|
||||
{{- include "chart.labels" . | nindent 8 }}
|
||||
spec:
|
||||
containers:
|
||||
- name: "vllm"
|
||||
@@ -128,4 +126,4 @@ spec:
|
||||
values:
|
||||
{{- toYaml . | nindent 20 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
@@ -8,7 +8,7 @@ spec:
|
||||
scaleTargetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: vllm
|
||||
name: {{ include "chart.deployment-name" . | quote }}
|
||||
minReplicas: {{ .Values.autoscaling.minReplicas }}
|
||||
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
|
||||
metrics:
|
||||
@@ -28,4 +28,4 @@ spec:
|
||||
type: Utilization
|
||||
averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: "{{ .Release.Name }}-service"
|
||||
name: {{ include "chart.service-name" . | quote }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
spec:
|
||||
type: ClusterIP
|
||||
@@ -11,4 +11,4 @@ spec:
|
||||
targetPort: {{ include "chart.container-port-name" . }}
|
||||
protocol: TCP
|
||||
selector:
|
||||
{{- include "chart.labels" . | nindent 4 }}
|
||||
{{- include "chart.labels" . | nindent 4 }}
|
||||
|
||||
@@ -2,6 +2,23 @@ suite: test deployment
|
||||
templates:
|
||||
- deployment.yaml
|
||||
tests:
|
||||
- it: should use configured labels for the deployment selector and pods
|
||||
set:
|
||||
labels:
|
||||
environment: production
|
||||
release: qwen-serving
|
||||
asserts:
|
||||
- equal:
|
||||
path: spec.selector.matchLabels
|
||||
value:
|
||||
environment: production
|
||||
release: qwen-serving
|
||||
- equal:
|
||||
path: spec.template.metadata.labels
|
||||
value:
|
||||
environment: production
|
||||
release: qwen-serving
|
||||
|
||||
- it: should create wait-download-model init container when modelDownload is enabled
|
||||
set:
|
||||
extraInit:
|
||||
@@ -132,4 +149,4 @@ tests:
|
||||
value: ghcr.io/llm-d/llm-d-routing-sidecar:v0.2.0
|
||||
- equal:
|
||||
path: spec.template.spec.initContainers[1].ports[0].containerPort
|
||||
value: 8080
|
||||
value: 8080
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
suite: test horizontal pod autoscaler
|
||||
templates:
|
||||
- hpa.yaml
|
||||
release:
|
||||
name: demo
|
||||
tests:
|
||||
- it: should target the deployment created by this release
|
||||
set:
|
||||
autoscaling:
|
||||
enabled: true
|
||||
minReplicas: 1
|
||||
maxReplicas: 3
|
||||
targetCPUUtilizationPercentage: 80
|
||||
asserts:
|
||||
- equal:
|
||||
path: spec.scaleTargetRef.name
|
||||
value: demo-deployment-vllm
|
||||
@@ -0,0 +1,25 @@
|
||||
suite: test service
|
||||
templates:
|
||||
- service.yaml
|
||||
release:
|
||||
name: demo
|
||||
tests:
|
||||
- it: should honor the configured service name
|
||||
set:
|
||||
serviceName: vllm-api
|
||||
asserts:
|
||||
- equal:
|
||||
path: metadata.name
|
||||
value: vllm-api
|
||||
|
||||
- it: should select pods using the configured labels
|
||||
set:
|
||||
labels:
|
||||
environment: production
|
||||
release: qwen-serving
|
||||
asserts:
|
||||
- equal:
|
||||
path: spec.selector
|
||||
value:
|
||||
environment: production
|
||||
release: qwen-serving
|
||||
@@ -28,7 +28,10 @@
|
||||
"type": "integer"
|
||||
},
|
||||
"serviceName": {
|
||||
"type": "null"
|
||||
"type": [
|
||||
"null",
|
||||
"string"
|
||||
]
|
||||
},
|
||||
"servicePort": {
|
||||
"type": "integer"
|
||||
@@ -326,4 +329,4 @@
|
||||
"secrets",
|
||||
"servicePort"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user