Skip to content

Commit

Permalink
Don't include whitelisted_namespaces in config when empty (#223)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Albuquerque <[email protected]>
  • Loading branch information
danielllek and worldtiki authored Jul 29, 2021
1 parent d3c1516 commit 1bba8dd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions helm/kubemonkey/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ data:
start_hour = {{ .Values.config.startHour }}
end_hour = {{ .Values.config.endHour }}
blacklisted_namespaces = [ {{- range .Values.config.blacklistedNamespaces }} {{ . | trim | quote }}, {{- end }} ]
{{- $whitelen := len .Values.config.whitelistedNamespaces }}
{{- if gt $whitelen 0 }}
whitelisted_namespaces = [ {{- range .Values.config.whitelistedNamespaces }} {{ . | trim | quote }}, {{- end }} ]
{{- end }}
time_zone = {{ .Values.config.timeZone | quote }}
[debug]
enabled= {{ .Values.config.debug.enabled }}
Expand Down

0 comments on commit 1bba8dd

Please sign in to comment.