feat: add Telegram notifications to PostSync smoke tests + new tests for researchowl/openclaw

- Create telegram-notify secret in n8n, portfolio, polymarket-bot, researchowl, openclaw
  namespaces (values mirrored from monitoring/grafana-telegram)
- Update existing smoke tests (n8n, portfolio, polymarket-bot) to send [OK]/[FAIL]
  Telegram notifications on success/failure
- Add postsync-smoke-test for openclaw (curl GET / on port 18789)
- Add postsync-smoke-test for researchowl (no HTTP port; checks readyReplicas via
  k8s API using a smoke-test-reader ServiceAccount + Role + RoleBinding)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-20 12:40:23 +00:00
parent 4e6703a721
commit eb46543150
11 changed files with 275 additions and 7 deletions
+27 -2
View File
@@ -15,18 +15,43 @@ spec:
containers:
- name: smoke-test
image: curlimages/curl:latest
env:
- name: TELEGRAM_BOT_TOKEN
valueFrom:
secretKeyRef:
name: telegram-notify
key: TELEGRAM_BOT_TOKEN
- name: TELEGRAM_CHAT_ID
valueFrom:
secretKeyRef:
name: telegram-notify
key: TELEGRAM_CHAT_ID
command: ["/bin/sh", "-c"]
args:
- |
set -e
BASE="http://n8n.n8n.svc.cluster.local:5678"
notify() {
curl -s --max-time 10 -X POST \
"https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \
-d "chat_id=${TELEGRAM_CHAT_ID}" \
--data-urlencode "text=$1" \
> /dev/null || true
}
fail() {
notify "[FAIL] n8n PostSync: $1"
exit 1
}
echo "--- [1/1] GET /healthz ---"
HEALTH=$(curl -sf --max-time 15 --retry 3 --retry-delay 5 --retry-all-errors \
"$BASE/healthz")
"$BASE/healthz") || fail "GET /healthz unreachable"
echo "$HEALTH"
echo "$HEALTH" | grep -qF '"status":"ok"' \
|| { echo "FAIL: n8n health check did not return status ok"; exit 1; }
|| fail "health response missing status:ok"
echo "OK"
notify "[OK] n8n PostSync passed"
echo "=== n8n: all smoke tests passed ==="