Files
helm-gitea/templates
David Chatterton 3cc94ca9a6
All checks were successful
changelog / changelog (push) Successful in 7s
check-and-test / check-and-test (push) Successful in 1m31s
fix(valkey): suppress search domain queries for valkeys headless service [Close #972] (#982)
### Description of the change

I've added the root label to the valkey domain that is searched by nc in the `configure_gitea.sh` script.

Here is an example of what the `test_valkey_connection` function will look like to the `configure-gitea` container:
```
function test_valkey_connection() {
  local RETRY=0
  local MAX=30

  echo 'Wait for valkey to become avialable...'
  until [ "${RETRY}" -ge "${MAX}" ]; do
    nc -vz -w2 gitea-dev-valkey-cluster-headless.gitea-dev.svc.cluster.local. 6379 && break
    RETRY=$[${RETRY}+1]
    echo "...not ready yet (${RETRY}/${MAX})"
  done

  if [ "${RETRY}" -ge "${MAX}" ]; then
    echo "Valkey not reachable after '${MAX}' attempts!"
    exit 1
  fi
}
```

### Benefits

If a search domain is set in resolve.conf, nc will append that root domain to the lookup, causing the lookup to fail. This will allow users to have a search domain set without causing the configure script to fail.

### Possible drawbacks

I don't believe there are any drawbacks, but let me know if I'm wrong.

### Applicable issues

gitea/helm-gitea#972

Reviewed-on: https://gitea.com/gitea/helm-gitea/pulls/982
Reviewed-by: Markus Pesch <volker.raschek@noreply.gitea.com>
Co-authored-by: David Chatterton <david@davidchatterton.com>
Co-committed-by: David Chatterton <david@davidchatterton.com>
2026-01-23 22:49:58 +00:00
..