fix DNS health check: use system resolver instead of hardcoded 10.0.20.101
The check was querying Technitium DNS directly at 10.0.20.101:53, which refuses connections from non-cluster hosts. Use the system resolver (no @server flag) so it works from any host or pod environment. [ci skip] Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
81bfccaefc
commit
bef0c073d5
1 changed files with 3 additions and 2 deletions
|
|
@ -1032,11 +1032,12 @@ check_dns() {
|
|||
local internal_ok=false external_ok=false detail=""
|
||||
|
||||
# Try dig first (available locally), fall back to python3 (pod environment)
|
||||
# Use system resolver (no @server) so it works from any host or pod
|
||||
if command -v dig &>/dev/null; then
|
||||
if dig @10.0.20.101 viktorbarzin.me +short +time=3 +tries=1 &>/dev/null; then
|
||||
if dig viktorbarzin.me +short +time=3 +tries=1 2>/dev/null | grep -q .; then
|
||||
internal_ok=true
|
||||
fi
|
||||
if dig @10.0.20.101 google.com +short +time=3 +tries=1 &>/dev/null; then
|
||||
if dig google.com +short +time=3 +tries=1 2>/dev/null | grep -q .; then
|
||||
external_ok=true
|
||||
fi
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue