operationState, but kubeconform / digest checks still catch bad YAML before noisy pages.launchd probes stay continuous.Decision matrix: GitOps signal vs OpenClaw handler
| Signal | Argo CD source | Minimal Mac-side pattern |
|---|---|---|
| Sync failed | on-sync-failed template, application.status.operationState |
Parse webhook JSON, fetch Application via REST, capture message + revision |
| Health degraded | on-health-degraded, compare desired vs live |
Optional second API call for resources summary; cap payload size |
| Preflight gate | Same revision Git as Argo | kustomize build / helm template, kubeconform, optional crane manifest |
Prerequisites: Node, tokens, and egress
Install Node.js 22 LTS, then follow docs.openclaw.ai for openclaw onboard (add --install-daemon when needed). Run openclaw doctor until warnings are understood; treat unresolved items as release blockers because they surface again under webhook load.
Read ~/.openclaw/openclaw.json for the gateway bind port—verify before scripting; 127.0.0.1:18789 is a frequent default. Prefer openclaw gateway status when available, else curl the documented /health path from the same user account launchd will use.
Set ARGOCD_SERVER to the UI hostname, issue a read-only ARGOCD_TOKEN (argocd account generate-token or SSO), store it in a mode-600 file for launchd. Allow HTTPS egress to Argo, image registries, and your summary sink. Document token rotation in the same runbook as your Argo RBAC reviews.
node -v
openclaw onboard
openclaw doctor
# Inspect bind address / port (paths vary by release)
test -f "$HOME/.openclaw/openclaw.json" && cat "$HOME/.openclaw/openclaw.json" | head
Webhook and gateway wiring checklist
Terminate TLS at Caddy or nginx, forward to 127.0.0.1, preserve raw bodies and Authorization for bearer or HMAC checks before JSON.parse. If you terminate client certificates at the edge, still authenticate the Argo payload independently so a replay from another client cannot bypass your ingest rules.
service.webhook with a random HTTPS path for on-sync-failed / on-health-degraded.{{.app.metadata.name}}, operationState.message, sync.revision) into your JSON schema.GET /api/v1/applications/{name} with the read token; capture operationState (and resources if needed).phase, revision, preflightExit, excerpt), POST outbound.curl --data-binary @notify.json -H "Authorization: Bearer $INGEST_SECRET" "$WEBHOOK_URL".curl -fsS --max-time 20 \
-H "Authorization: Bearer ${ARGOCD_TOKEN}" \
"${ARGOCD_SERVER}/api/v1/applications/${APP_NAME}" \
| jq '{sync:.status.sync.status,health:.status.health.status,phase:.status.operationState.phase,msg:.status.operationState.message}'
Preflight scripts and health probe parameters
Clone the same revision Argo syncs into mktemp. Run kustomize build / helm template, pipe to kubeconform, optionally crane manifest on images. Export GIT_TERMINAL_PROMPT=0 for non-interactive clones and delete the workspace after each event so secrets never linger on disk.
GitOps link: preflight complements Argo—if it passes yet Argo stays OutOfSync, diff live cluster state; if it fails, attach the JSON summary to the ticket.
Citeable defaults (tune to your SLO):
- Probe interval: 15 s for
curl-based gateway checks fromlaunchd. - Probe timeout: 3 s per request; mark unhealthy after three consecutive failures.
- Summary POST:
curl --max-time 25with sleeps 2 / 4 / 8 s between attempts.
openclaw doctor
OC_PORT=$(jq -r '.gateway.port // 18789' "$HOME/.openclaw/openclaw.json")
curl -fsS --max-time 3 "http://127.0.0.1:${OC_PORT}/health" || exit 1
read -r -d '' SUMMARY <<'JSON'
{"schema":"macpull.argocd.sync.v1","app":"payments","revision":"abc123","phase":"Failed","preflightExit":0,"excerpt":"truncated operator message..."}
JSON
for s in 2 4 8; do
curl -fsS --max-time 25 -H "Content-Type: application/json" \
--data-binary "$SUMMARY" "$OBSERVABILITY_URL" && break
sleep "$s"
done
FAQ: authentication failures, timeouts, retries
Refresh ARGOCD_TOKEN, confirm nginx forwards Authorization, compare ingest secrets with timing-safe equals after trimming newlines.
Raise curl --max-time only on API fetches; keep webhooks fast. Match grpc-web to your CLI login; set HTTPS_PROXY consistently behind proxies.
Max three POST attempts; key by app+revision+uid; stop on 409 Conflict.
Summary. You need Node 22+, clean openclaw doctor output, TLS webhooks, read-only Argo tokens, disposable preflight dirs, and 2/4/8s summary retries. An always-on remote Mac beats laptops for listeners and launchd logs.
Buy capacity: pricing, purchase, help, blog—no login.
MacPull hosts Apple Silicon Mac Minis for OpenClaw gateways, TLS ingress, and GitOps preflight next to Argo CD webhooks.
Remote Mac for OpenClaw + Argo CD webhooks
Dedicated Apple Silicon nodes, stable TLS ingress, and room for launchd health checks alongside GitOps preflight scripts. Open pricing, purchase, help, and the blog without signing in.