This commit is contained in:
Samy Djemaï 2026-11-05 22:21:31 +00:00 • committed by GitHub
commit bb6e1475a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 119 additions and 0 deletions

View file

@ -50,6 +50,14 @@ spec:
- name: backend
image: "{{ .Values.backend.image.repository }}:{{ .Values.backend.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.backend.image.pullPolicy }}
{{- with .Values.backend.command }}
command:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.backend.args }}
args:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.backend.securityContext }}
securityContext:
{{- toYaml . | nindent 12 }}

View file

@ -46,6 +46,14 @@ spec:
- name: gateway
image: "{{ .Values.gateway.image.repository }}:{{ .Values.gateway.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.gateway.image.pullPolicy }}
{{- with .Values.gateway.command }}
command:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.gateway.args }}
args:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.gateway.securityContext }}
securityContext:
{{- toYaml . | nindent 12 }}

View file

@ -45,6 +45,14 @@ spec:
- name: ui
image: "{{ .Values.ui.image.repository }}:{{ .Values.ui.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.ui.image.pullPolicy }}
{{- with .Values.ui.command }}
command:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.ui.args }}
args:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.ui.securityContext }}
securityContext:
{{- toYaml . | nindent 12 }}

View file

@ -0,0 +1,89 @@
suite: test container command and args overrides
templates:
- gateway/deployment.yaml
- gateway/configmap.yaml
- backend/deployment.yaml
- ui/deployment.yaml
values:
- ./values/required.yaml
tests:
- it: gateway omits command and args by default
template: gateway/deployment.yaml
asserts:
- isNull:
path: spec.template.spec.containers[0].command
- isNull:
path: spec.template.spec.containers[0].args
- it: gateway renders command and args when set
template: gateway/deployment.yaml
set:
gateway.command:
- .venv/bin/granian
gateway.args:
- gateway.main:app
- --http
- auto
asserts:
- equal:
path: spec.template.spec.containers[0].command
value:
- .venv/bin/granian
- equal:
path: spec.template.spec.containers[0].args
value:
- gateway.main:app
- --http
- auto
- it: backend omits command and args by default
template: backend/deployment.yaml
asserts:
- isNull:
path: spec.template.spec.containers[0].command
- isNull:
path: spec.template.spec.containers[0].args
- it: backend renders command and args when set
template: backend/deployment.yaml
set:
backend.command:
- python
backend.args:
- -m
- litellm
asserts:
- equal:
path: spec.template.spec.containers[0].command
value:
- python
- equal:
path: spec.template.spec.containers[0].args
value:
- -m
- litellm
- it: ui omits command and args by default
template: ui/deployment.yaml
asserts:
- isNull:
path: spec.template.spec.containers[0].command
- isNull:
path: spec.template.spec.containers[0].args
- it: ui renders command and args when set
template: ui/deployment.yaml
set:
ui.command:
- node
ui.args:
- server.js
asserts:
- equal:
path: spec.template.spec.containers[0].command
value:
- node
- equal:
path: spec.template.spec.containers[0].args
value:
- server.js

View file

@ -371,6 +371,8 @@ gateway:
repository: ghcr.io/berriai/litellm-gateway
tag: "" # defaults to .Chart.AppVersion
pullPolicy: IfNotPresent
command: []
args: []
service:
type: ClusterIP
port: 4000
@ -517,6 +519,8 @@ backend:
repository: ghcr.io/berriai/litellm-backend
tag: ""
pullPolicy: IfNotPresent
command: []
args: []
service:
type: ClusterIP
port: 4001
@ -585,6 +589,8 @@ ui:
repository: ghcr.io/berriai/litellm-ui
tag: ""
pullPolicy: IfNotPresent
command: []
args: []
service:
type: ClusterIP
port: 3000