File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{{- if $.Values.server.enabled }}
22{{- range $service := (list "frontend" "internal-frontend") }}
33{{- $serviceValues := index $.Values.server $service }}
4+ {{- if or (not (hasKey $serviceValues "enabled")) $serviceValues.enabled }}
45apiVersion : v1
56kind : Service
67metadata :
3940---
4041{{- end }}
4142{{- end }}
43+ {{- end }}
4244
4345{{- if $.Values.server.enabled }}
4446{{- range $service := (list "frontend" "internal-frontend" "matching" "history" "worker") }}
99101---
100102{{- end }}
101103{{- end }}
102- {{- end }}
104+ {{- end }}
Original file line number Diff line number Diff line change @@ -51,6 +51,40 @@ tests:
5151 containsDocument :
5252 kind : Service
5353 apiVersion : v1
54+ - it : doesn't create frontend services when frontend is disabled
55+ template : templates/server-service.yaml
56+ set :
57+ server :
58+ frontend :
59+ enabled : false
60+ asserts :
61+ - not : true
62+ containsDocument :
63+ kind : Service
64+ apiVersion : v1
65+ name : RELEASE-NAME-temporal-frontend
66+ - not : true
67+ containsDocument :
68+ kind : Service
69+ apiVersion : v1
70+ name : RELEASE-NAME-temporal-frontend-headless
71+ - it : doesn't create internal-frontend services when internal-frontend is disabled
72+ template : templates/server-service.yaml
73+ set :
74+ server :
75+ internal-frontend :
76+ enabled : false
77+ asserts :
78+ - not : true
79+ containsDocument :
80+ kind : Service
81+ apiVersion : v1
82+ name : RELEASE-NAME-temporal-internal-frontend
83+ - not : true
84+ containsDocument :
85+ kind : Service
86+ apiVersion : v1
87+ name : RELEASE-NAME-temporal-internal-frontend-headless
5488 - it : app protocol default in frontend service
5589 template : templates/server-service.yaml
5690 documentSelector :
You can’t perform that action at this time.
0 commit comments