File tree Expand file tree Collapse file tree 3 files changed +50
-0
lines changed Expand file tree Collapse file tree 3 files changed +50
-0
lines changed Original file line number Diff line number Diff line change 54
54
{ {- if .Values.controller.watchIngressWithoutClass } }
55
55
- --watch-ingress-without-class=true
56
56
{ {- end } }
57
+ { {- if not .Values.controller.metrics.enabled } }
58
+ - --enable-metrics={ { .Values.controller.metrics.enabled } }
59
+ { {- end } }
57
60
{ {- if .Values.controller.enableTopologyAwareRouting } }
58
61
- --enable-topology-aware-routing=true
59
62
{ {- end } }
Original file line number Diff line number Diff line change @@ -14,3 +14,34 @@ tests:
14
14
- equal :
15
15
path : metadata.name
16
16
value : RELEASE-NAME-ingress-nginx-controller
17
+
18
+ - it : should create a DaemonSet with argument `--enable-metrics=false` if `controller.metrics.enabled` is false
19
+ set :
20
+ controller.kind : DaemonSet
21
+ controller.metrics.enabled : false
22
+ asserts :
23
+ - contains :
24
+ path : spec.template.spec.containers[0].args
25
+ content : --enable-metrics=false
26
+
27
+ - it : should create a DaemonSet without argument `--enable-metrics=false` if `controller.metrics.enabled` is true
28
+ set :
29
+ controller.kind : DaemonSet
30
+ controller.metrics.enabled : true
31
+ asserts :
32
+ - notContains :
33
+ path : spec.template.spec.containers[0].args
34
+ content : --enable-metrics=false
35
+
36
+ - it : should create a DaemonSet with resource limits if `controller.resources.limits` is set
37
+ set :
38
+ controller.kind : DaemonSet
39
+ controller.resources.limits.cpu : 500m
40
+ controller.resources.limits.memory : 512Mi
41
+ asserts :
42
+ - equal :
43
+ path : spec.template.spec.containers[0].resources.limits.cpu
44
+ value : 500m
45
+ - equal :
46
+ path : spec.template.spec.containers[0].resources.limits.memory
47
+ value : 512Mi
Original file line number Diff line number Diff line change @@ -21,6 +21,22 @@ tests:
21
21
path : spec.replicas
22
22
value : 3
23
23
24
+ - it : should create a Deployment with argument `--enable-metrics=false` if `controller.metrics.enabled` is false
25
+ set :
26
+ controller.metrics.enabled : false
27
+ asserts :
28
+ - contains :
29
+ path : spec.template.spec.containers[0].args
30
+ content : --enable-metrics=false
31
+
32
+ - it : should create a Deployment without argument `--enable-metrics=false` if `controller.metrics.enabled` is true
33
+ set :
34
+ controller.metrics.enabled : true
35
+ asserts :
36
+ - notContains :
37
+ path : spec.template.spec.containers[0].args
38
+ content : --enable-metrics=false
39
+
24
40
- it : should create a Deployment with resource limits if `controller.resources.limits` is set
25
41
set :
26
42
controller.resources.limits.cpu : 500m
You can’t perform that action at this time.
0 commit comments