mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-25 01:02:15 +00:00
test(helm): cover fixed replicaCount on component deployments
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
e484a7c89c
commit
1aa038cb47
1 changed files with 63 additions and 0 deletions
63
helm/litellm/tests/replica_count_tests.yaml
Normal file
63
helm/litellm/tests/replica_count_tests.yaml
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
suite: test fixed replica count on the component deployments
|
||||
templates:
|
||||
- gateway/deployment.yaml
|
||||
- gateway/configmap.yaml
|
||||
- backend/deployment.yaml
|
||||
- ui/deployment.yaml
|
||||
values:
|
||||
- ./values/required.yaml
|
||||
tests:
|
||||
- it: renders replicaCount as spec.replicas when the component HPA is disabled
|
||||
set:
|
||||
gateway.hpa.enabled: false
|
||||
gateway.replicaCount: 3
|
||||
backend.hpa.enabled: false
|
||||
backend.replicaCount: 2
|
||||
ui.hpa.enabled: false
|
||||
ui.replicaCount: 4
|
||||
asserts:
|
||||
- equal:
|
||||
path: spec.replicas
|
||||
value: 3
|
||||
template: gateway/deployment.yaml
|
||||
- equal:
|
||||
path: spec.replicas
|
||||
value: 2
|
||||
template: backend/deployment.yaml
|
||||
- equal:
|
||||
path: spec.replicas
|
||||
value: 4
|
||||
template: ui/deployment.yaml
|
||||
|
||||
- it: leaves spec.replicas to the HPA when the component HPA is enabled
|
||||
set:
|
||||
gateway.hpa.enabled: true
|
||||
gateway.replicaCount: 3
|
||||
backend.hpa.enabled: true
|
||||
backend.replicaCount: 2
|
||||
ui.hpa.enabled: true
|
||||
ui.replicaCount: 4
|
||||
asserts:
|
||||
- notExists:
|
||||
path: spec.replicas
|
||||
template: gateway/deployment.yaml
|
||||
- notExists:
|
||||
path: spec.replicas
|
||||
template: backend/deployment.yaml
|
||||
- notExists:
|
||||
path: spec.replicas
|
||||
template: ui/deployment.yaml
|
||||
|
||||
- it: pins one component while another stays autoscaled
|
||||
set:
|
||||
gateway.hpa.enabled: false
|
||||
gateway.replicaCount: 5
|
||||
backend.hpa.enabled: true
|
||||
asserts:
|
||||
- equal:
|
||||
path: spec.replicas
|
||||
value: 5
|
||||
template: gateway/deployment.yaml
|
||||
- notExists:
|
||||
path: spec.replicas
|
||||
template: backend/deployment.yaml
|
||||
Loading…
Add table
Reference in a new issue