apiVersion: apps/v1 kind: StatefulSet metadata: name: service-seadex-cron namespace: app-notifications spec: serviceName: service-seadex-cron replicas: 1 selector: matchLabels: app: service-seadex-cron template: metadata: labels: app: service-seadex-cron spec: containers: - name: cron image: curlimages/curl:latest command: - /bin/sh - -c - | echo "{\"timestamp\":\"$(date '+%Y-%m-%dT%H:%M:%S%z')\",\"event\":\"startup\"}" while true; do echo "{\"timestamp\":\"$(date '+%Y-%m-%dT%H:%M:%S%z')\",\"event\":\"curl start\"}" curl -s -X POST --max-time 150 http://service-seadex-internal:5000/update echo echo "{\"timestamp\":\"$(date '+%Y-%m-%dT%H:%M:%S%z')\",\"event\":\"curl end\"}" sleep 43200 done