Mohammed Naser | 65cda13 | 2024-05-02 14:34:08 -0400 | [diff] [blame] | 1 | suite: Controller > HPA |
| 2 | templates: |
| 3 | - controller-hpa.yaml |
| 4 | |
| 5 | tests: |
Mohammed Naser | 7d1623e | 2024-06-17 09:12:39 -0400 | [diff] [blame] | 6 | - it: should create an HPA if `controller.autoscaling.enabled` is true |
Mohammed Naser | 65cda13 | 2024-05-02 14:34:08 -0400 | [diff] [blame] | 7 | set: |
Mohammed Naser | 65cda13 | 2024-05-02 14:34:08 -0400 | [diff] [blame] | 8 | controller.autoscaling.enabled: true |
| 9 | asserts: |
| 10 | - hasDocuments: |
| 11 | count: 1 |
| 12 | - isKind: |
| 13 | of: HorizontalPodAutoscaler |
| 14 | - equal: |
| 15 | path: metadata.name |
| 16 | value: RELEASE-NAME-ingress-nginx-controller |
Mohammed Naser | 7d1623e | 2024-06-17 09:12:39 -0400 | [diff] [blame] | 17 | |
| 18 | - it: should not create an HPA if `controller.autoscaling.enabled` is true and `controller.keda.enabled` is true |
| 19 | set: |
| 20 | controller.autoscaling.enabled: true |
| 21 | controller.keda.enabled: true |
| 22 | asserts: |
| 23 | - hasDocuments: |
| 24 | count: 0 |
| 25 | |
| 26 | - it: should not create an HPA if `controller.kind` is "DaemonSet" |
| 27 | set: |
| 28 | controller.kind: DaemonSet |
| 29 | asserts: |
| 30 | - hasDocuments: |
| 31 | count: 0 |