mirror of
https://gitea.com/gitea/helm-actions.git
synced 2026-07-16 03:04:50 +00:00
feat: customize init command (#166)
add feature to customize the reach gitea commands. See: https://gitea.com/gitea/helm-actions/src/branch/feat/customize-init-command/docs/connectionCommandOverride.mdReviewed-on: https://gitea.com/gitea/helm-actions/pulls/166 Co-authored-by: Daan <dselen@nerthus.nl>
This commit is contained in:
@ -66,14 +66,21 @@ spec:
|
||||
- mountPath: /data
|
||||
name: data-runner
|
||||
{{- end }}
|
||||
- name: init-gitea
|
||||
- name: reach-gitea
|
||||
image: "{{ include "gitea.actions.init.image" . }}"
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- |
|
||||
{{- if .Values.init.preConnectionCommandOverride }}
|
||||
{{ .Values.init.preConnectionCommandOverride }}
|
||||
{{- end }}
|
||||
echo 'Trying to reach Gitea on {{ include "gitea.actions.local_root_url" . }}'
|
||||
{{- if .Values.init.connectionCommandOverride }}
|
||||
until timeout 10 {{ .Values.init.connectionCommandOverride }} {{ include "gitea.actions.local_root_url" . }}; do
|
||||
{{- else }}
|
||||
until timeout 10 wget --no-check-certificate --spider {{ include "gitea.actions.local_root_url" . }}; do
|
||||
{{- end }}
|
||||
sleep 3
|
||||
echo "Trying again in 3 seconds..."
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user