2023-12-14 15:17:09 +00:00
|
|
|
suite: Controller > Service > Internal
|
|
|
|
templates:
|
|
|
|
- controller-service-internal.yaml
|
|
|
|
|
|
|
|
tests:
|
|
|
|
- it: should not create an internal Service if `controller.service.internal.enabled` is false
|
|
|
|
set:
|
|
|
|
controller.service.internal.enabled: false
|
|
|
|
asserts:
|
|
|
|
- hasDocuments:
|
|
|
|
count: 0
|
|
|
|
|
|
|
|
- it: should create an internal Service if `controller.service.internal.enabled` is true and `controller.service.internal.annotations` are set
|
|
|
|
set:
|
|
|
|
controller.service.internal.enabled: true
|
|
|
|
controller.service.internal.annotations:
|
|
|
|
test.annotation: "true"
|
|
|
|
asserts:
|
|
|
|
- hasDocuments:
|
|
|
|
count: 1
|
|
|
|
- isKind:
|
|
|
|
of: Service
|
|
|
|
- equal:
|
|
|
|
path: metadata.name
|
|
|
|
value: RELEASE-NAME-ingress-nginx-controller-internal
|
2024-11-12 21:26:46 +00:00
|
|
|
|
|
|
|
- it: should create a Service without `clusterIPs` if `controller.service.internal.clusterIPs` is not set
|
|
|
|
set:
|
|
|
|
controller.service.internal.enabled: true
|
|
|
|
controller.service.internal.annotations:
|
|
|
|
test.annotation: "true"
|
|
|
|
asserts:
|
|
|
|
- notExists:
|
|
|
|
path: spec.clusterIPs
|
|
|
|
|
|
|
|
- it: should create a Service with `clusterIPs` if `controller.service.internal.clusterIPs` is set
|
|
|
|
set:
|
|
|
|
controller.service.internal.enabled: true
|
|
|
|
controller.service.internal.annotations:
|
|
|
|
test.annotation: "true"
|
|
|
|
controller.service.internal.clusterIPs:
|
|
|
|
- 10.0.0.1
|
|
|
|
- fd00::1
|
|
|
|
asserts:
|
|
|
|
- equal:
|
|
|
|
path: spec.clusterIPs
|
|
|
|
value:
|
|
|
|
- 10.0.0.1
|
|
|
|
- fd00::1
|