diff --git a/README.md b/README.md index c51eebc..c632647 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,16 @@ Deploy with your values, make sure the path is correct: helm upgrade --install gitea-actions gitea-charts/actions -f values.yaml ``` +Alternatively: + +```sh +helm upgrade --install gitea-actions gitea-charts/actions \ + --set enabled=true \ + --set giteaRootURL=https://gitea.com \ + --set existingSecret=foo \ + --set existingSecretKey=bar +``` + You should be good to go! ### Runner Token Secret Template diff --git a/templates/statefulset.yaml b/templates/statefulset.yaml index 19e4b51..b6f61df 100644 --- a/templates/statefulset.yaml +++ b/templates/statefulset.yaml @@ -73,7 +73,11 @@ spec: - -c - | 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 diff --git a/values.yaml b/values.yaml index 62d1190..4424029 100644 --- a/values.yaml +++ b/values.yaml @@ -126,7 +126,8 @@ statefulset: ## @param init.image.tag the init image tag ## @param init.image.digest Image digest. Allows to pin the given image tag. Useful for having control over mutable tags like `latest` ## @param init.image.pullPolicy The init image pullPolicy -## @param init.image.fullOverride Completely overrides the image registry, path/image, tag and digest. +## @param init.image.fullOverride Completely overrides the image registry, path/image, tag and digest +## @param init.image.connectionCommandOverride Possiblity to change the command with which the container tests its connection to Gitea init: image: registry: "" @@ -136,6 +137,7 @@ init: digest: "" pullPolicy: IfNotPresent fullOverride: "" + connectionCommandOverride: "" ## @section Runner Token Secret Configuration #