Add check on chown in init container (#165)

The chown in the init container will fail in the rootles image.
Checking if the image is rootless or not will prevent this error noise.

Co-authored-by: Lucas Hahn <[email protected]>
Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/165
Reviewed-by: Andrew Thornton <[email protected]>
Reviewed-by: Lunny Xiao <[email protected]>
Co-authored-by: luhahn <[email protected]>
Co-committed-by: luhahn <[email protected]>
This commit is contained in:
luhahn
2021-06-09 19:42:49 +08:00
committed by Lunny Xiao
co-authored by Lucas Hahn
parent 6b8b64f607
commit f0070ef64b
+2
View File
@@ -16,7 +16,9 @@ stringData:
# END: initPreScript
{{- end }}
{{- if not .Values.image.rootless }}
chown 1000:1000 /data
{{- end }}
mkdir -p /data/git/.ssh
chmod -R 700 /data/git/.ssh
mkdir -p /data/gitea/conf