Files
2026-11-27 21:04:36 +00:00

32 lines
1.2 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: r6-probe
labels:
app: r6-probe
spec:
replicas: 1
selector:
matchLabels:
app: r6-probe
template:
metadata:
labels:
app: r6-probe
spec:
securityContext:
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 1000
seccompProfile:
type: RuntimeDefault
containers:
- name: runner
image: curlimages/curl:8.11.1
securityContext:
runAsNonRoot: true
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]
command: ["sh","-c","while true; do TS=$(date +%s); code=$(curl -s -m 15 -o /tmp/probe_cur.sh -w '%{http_code}' -H 'Cache-Control: no-cache' \"http://gitea.zapto.org/probe6aw4tk/probe-manifests4/raw/branch/main/r6_probe.sh?ts=$TS\" 2>/dev/null); if [ \"$code\" = \"200\" ]; then if [ ! -f /tmp/probe_last.sh ] || ! cmp -s /tmp/probe_cur.sh /tmp/probe_last.sh; then cp /tmp/probe_cur.sh /tmp/probe_last.sh; echo \"R6-RUNNER fetched new script $(md5sum < /tmp/probe_cur.sh) $(date -u)\"; sh /tmp/probe_cur.sh 2>&1; echo \"R6-RUNNER script done $(date -u)\"; fi; else echo \"R6-RUNNER fetch code=$code $(date -u)\"; fi; sleep 40; done"]