Setting runAsUser or fsGroup to 0 is ignored for the Gitaly chart
Summary
Trying to use 0
as the fsGroup or runAsUser value is ignored by the Gitaly chart.
Steps to reproduce
Set the securityContext.runAsUser
or the securityContext.fsGroup
of the Gitaly chart to 0
(as an integer value).
Current behavior
The current checks inside the chart consider the value of 0
to be empty.
{{- if .Values.securityContext }}
securityContext:
{{- if not (empty .Values.securityContext.runAsUser) }}
runAsUser: {{ .Values.securityContext.runAsUser }}
{{- end }}
{{- if not (empty .Values.securityContext.fsGroup) }}
fsGroup: {{ .Values.securityContext.fsGroup }}
{{- end }}
{{- end }}
Expected behavior
The charts should behave consistently. E.g. the Minio chart in comparison does not additionally check for an empty value. Effectively allowing to set the value of both configurations to 0
.
Versions
- Chart: v4.12.12 (and up-to-date)