Files
k8s-manifests/portfolio/postsync-smoke-test.yaml
T
chemavxandClaude Opus 4.8 b124f128e6 Repoint PostSync hooks to telegram-notify-infisical (n8n/portfolio/openclaw/polymarket-bot)
Phase 3b: all 4 hooks' secretKeyRefs now read the Infisical-managed secret.
Old plaintext telegram-notify secrets stay as fallback until 3c.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 20:31:02 +00:00

55 lines
1.6 KiB
YAML

apiVersion: batch/v1
kind: Job
metadata:
name: postsync-smoke-test
namespace: portfolio
annotations:
argocd.argoproj.io/hook: PostSync
argocd.argoproj.io/hook-delete-policy: HookSucceeded
spec:
ttlSecondsAfterFinished: 600
backoffLimit: 0
template:
spec:
restartPolicy: Never
containers:
- name: smoke-test
image: curlimages/curl:latest
env:
- name: TELEGRAM_BOT_TOKEN
valueFrom:
secretKeyRef:
name: telegram-notify-infisical
key: TELEGRAM_BOT_TOKEN
- name: TELEGRAM_CHAT_ID
valueFrom:
secretKeyRef:
name: telegram-notify-infisical
key: TELEGRAM_CHAT_ID
command: ["/bin/sh", "-c"]
args:
- |
set -e
BASE="http://portfolio.portfolio.svc.cluster.local:80"
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] portfolio PostSync: $1"
exit 1
}
echo "--- [1/1] GET / (HTTP 200) ---"
curl -sf --max-time 15 --retry 3 --retry-delay 5 --retry-all-errors \
"$BASE/" > /dev/null || fail "GET / returned non-200"
echo "OK"
notify "[OK] portfolio PostSync passed"
echo "=== portfolio: all smoke tests passed ==="