2023-12-14 15:17:09 +00:00
suite : Controller > DaemonSet
templates :
- controller-daemonset.yaml
tests :
- it : should create a DaemonSet if `controller.kind` is "DaemonSet"
set :
controller.kind : DaemonSet
asserts :
- hasDocuments :
count : 1
- isKind :
of : DaemonSet
- equal :
path : metadata.name
value : RELEASE-NAME-ingress-nginx-controller
2024-02-02 06:55:15 +00:00
- it : should create a DaemonSet with argument `--enable-metrics=false` if `controller.metrics.enabled` is false
set :
controller.kind : DaemonSet
controller.metrics.enabled : false
asserts :
- contains :
path : spec.template.spec.containers[0].args
content : --enable-metrics=false
- it : should create a DaemonSet without argument `--enable-metrics=false` if `controller.metrics.enabled` is true
set :
controller.kind : DaemonSet
controller.metrics.enabled : true
asserts :
- notContains :
path : spec.template.spec.containers[0].args
content : --enable-metrics=false
2024-03-14 14:52:14 +00:00
- it : should create a DaemonSet with argument `--controller-class=k8s.io/ingress-nginx-internal` if `controller.ingressClassResource.controllerValue` is "k8s.io/ingress-nginx-internal"
set :
controller.kind : DaemonSet
controller.ingressClassResource.controllerValue : k8s.io/ingress-nginx-internal
asserts :
- contains :
path : spec.template.spec.containers[0].args
content : --controller-class=k8s.io/ingress-nginx-internal
2024-02-02 06:55:15 +00:00
- it : should create a DaemonSet with resource limits if `controller.resources.limits` is set
set :
controller.kind : DaemonSet
controller.resources.limits.cpu : 500m
controller.resources.limits.memory : 512Mi
asserts :
- equal :
path : spec.template.spec.containers[0].resources.limits.cpu
value : 500m
- equal :
path : spec.template.spec.containers[0].resources.limits.memory
value : 512Mi