From f0070ef64bcb8fa91ac16acdd11f923235a552fa Mon Sep 17 00:00:00 2001 From: luhahn Date: Wed, 9 Jun 2021 19:42:49 +0800 Subject: [PATCH] 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 Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/165 Reviewed-by: Andrew Thornton Reviewed-by: Lunny Xiao Co-authored-by: luhahn Co-committed-by: luhahn --- templates/gitea/init.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/gitea/init.yaml b/templates/gitea/init.yaml index 2b4b59d..c97c166 100644 --- a/templates/gitea/init.yaml +++ b/templates/gitea/init.yaml @@ -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