File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,5 +13,5 @@ maintainers:
1313 - name : mavimo
14141515type : application
16- version : 1.3.7
16+ version : 1.3.8
1717appVersion : " 1.0.0"
Original file line number Diff line number Diff line change @@ -230,6 +230,15 @@ true
230230{{- end }}
231231{{- end }}
232232
233+ {{- define " host.rapid_response_password" }}
234+ {{- $feature_respond := get .Values.features (include " host.respond_key" .Values.features ) }}
235+ {{- if ne (dig " rapid_response" " password" " " $feature_respond ) " " }}
236+ {{- $feature_respond .rapid_response.password }}
237+ {{- else }}
238+ {{- dig " rapid_response" " password" " " .Values.host.additional_settings }}
239+ {{- end }}
240+ {{- end }}
241+
233242{{- define " host.monitor_key" }}
234243{{- if hasKey . " monitoring" }}
235244{{- print " monitoring" }}
Original file line number Diff line number Diff line change @@ -9,5 +9,5 @@ metadata:
99 {{- include "host.labels" . | nindent 4 }}
1010type : Opaque
1111data :
12- password : {{ (dig "rapid_response" "password" "" .Values.host.additional_settings ) | b64enc | quote }}
12+ password : {{ (include "host.rapid_response_password" . ) | b64enc | quote }}
1313{{- end }}
Original file line number Diff line number Diff line change @@ -27,3 +27,21 @@ tests:
2727 path : data.password
2828 decodeBase64 : true
2929 value : " abc123"
30+
31+ - it : Test Rapid Response secret is created with correct password
32+ set :
33+ features :
34+ respond :
35+ rapid_response :
36+ enabled : true
37+ password : abc123
38+ asserts :
39+ - containsDocument :
40+ kind : Secret
41+ apiVersion : v1
42+ name : release-name-shield-host-rapid-response
43+ namespace : shield-namespace
44+ - equal :
45+ path : data.password
46+ decodeBase64 : true
47+ value : " abc123"
You can’t perform that action at this time.
0 commit comments