k8s/digest-ping-test.yaml
# One-off connectivity test for the digest CronJob. Sends a "ping" event that is only logged by the
# bot: nothing is posted to WhatsApp. Run: kubectl apply -f k8s/digest-ping-test.yaml
apiVersion: batch/v1
kind: Job
metadata:
name: ts03-ping-test
namespace: waha
spec:
backoffLimit: 0
activeDeadlineSeconds: 120
ttlSecondsAfterFinished: 3600
template:
spec:
restartPolicy: Never
hostAliases: # pin the Mac: CoreDNS lost host.k3d.internal
- ip: "192.168.5.2"
hostnames: ["host.k3d.internal"]
containers:
- name: ping
image: curlimages/curl:latest
imagePullPolicy: IfNotPresent
env:
- name: HOOK_SECRET
valueFrom:
secretKeyRef:
name: waha-secrets
key: HOOK_SECRET
command: ["sh", "-c"]
args:
- >-
curl -sS --fail --max-time 20 -X POST
-H 'Content-Type: application/json'
-d '{"event":"ts03.ping"}'
-w 'HTTP %{http_code}\n'
"http://host.k3d.internal:5055/hook/${HOOK_SECRET}"
Questions or corrections: [email protected]