#!/usr/bin/env bash set -euo pipefail export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig NODES=(gandalf.prole.org merlin.prole.org myrddin.prole.org pi.prole.org) for node in "${NODES[@]}"; do safe="${node//./-}" echo "==> Checking $node ..." kubectl -n gitlab run "jcheck-${safe}" \ --image=ubuntu:22.04 \ --restart=Never \ --overrides="{\"spec\":{\"nodeName\":\"${node}\",\"tolerations\":[{\"operator\":\"Exists\"}],\"volumes\":[{\"name\":\"jlib\",\"hostPath\":{\"path\":\"/opt/gitlab-jemalloc\",\"type\":\"DirectoryOrCreate\"}}],\"containers\":[{\"name\":\"jcheck-${safe}\",\"image\":\"ubuntu:22.04\",\"command\":[\"bash\",\"-c\",\"ls -lh /jlib/ 2>&1 && od -A x -t x1z /jlib/libjemalloc.so.2 2>/dev/null | grep -c 'musl' || true; strings /usr/bin/ls 2>/dev/null | head -1 || true; readelf -d /jlib/libjemalloc.so.2 2>/dev/null | grep NEEDED || echo no-readelf\"],\"volumeMounts\":[{\"name\":\"jlib\",\"mountPath\":\"/jlib\"}]}]}}" \ --attach --rm --timeout=30s 2>&1 || true done