ingress-nginx-helm/charts/ingress-nginx/tests/controller-hpa_test.yaml
k8s-infra-cherrypick-robot f118d67042
Chart: Align HPA & KEDA conditions. (#11113)
Co-authored-by: Marco Ebert <marco_ebert@icloud.com>
2024-03-12 08:06:30 -07:00

31 lines
824 B
YAML

suite: Controller > HPA
templates:
- controller-hpa.yaml
tests:
- it: should create an HPA if `controller.autoscaling.enabled` is true
set:
controller.autoscaling.enabled: true
asserts:
- hasDocuments:
count: 1
- isKind:
of: HorizontalPodAutoscaler
- equal:
path: metadata.name
value: RELEASE-NAME-ingress-nginx-controller
- it: should not create an HPA if `controller.autoscaling.enabled` is true and `controller.keda.enabled` is true
set:
controller.autoscaling.enabled: true
controller.keda.enabled: true
asserts:
- hasDocuments:
count: 0
- it: should not create an HPA if `controller.kind` is "DaemonSet"
set:
controller.kind: DaemonSet
asserts:
- hasDocuments:
count: 0