Files
helm-actions/docs/connectionCommandOverride.md

1.4 KiB

Using a custom connectionCommand

By default, before the container starts it tries to reach the given giteaRootURL.
Normally this is done by the busybox image using the wget binary.

However, due to Issue #162 there has been a change made where we can customize that command.

Using the values.yaml file by default it calls wget --spider --no-check-certificate <your giteaRootURL> with a timeout of 10 seconds.
But with a custom init section like detailed below we can make our check compliant with whatever certificate you have.

Assuming:

enabled: true
giteaRootURL: https://gitea.com
existingSecret: foo
existingSecretKey: bar

init:
  image:
    registry: ""
    repository: alpine
    # Overrides the image tag whose default is the chart appVersion.
    tag: "3.24"
    digest: ""
    pullPolicy: IfNotPresent
    fullOverride: ""
    connectionCommandOverride: "apk add curl && curl -I"

This now creates the following template section:

        - name: init-gitea
          image: "alpine:latest"
          command:
            - sh
            - -c
            - |
              echo 'Trying to reach Gitea on https://gitea.com'
              until timeout 10 apk add curl && curl -I https://gitea.com; do
                sleep 3
                echo "Trying again in 3 seconds..."
              done
              echo "Gitea has been reached!"