Skip to content

Commit

Permalink
Add minimal help/usage to run-oneoff-pod
Browse files Browse the repository at this point in the history
  • Loading branch information
meatballhat authored and nevillelyh committed Jan 7, 2025
1 parent 2d37e35 commit eb07463
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion script/run-oneoff-pod
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,14 @@ main() {
local name="${1}"
shift

cd "$(git rev-parse --show-toplevel)"
case "${name}" in
-h | --help | help)
_usage
exit 0
;;
esac

cd "$(git rev-parse --show-toplevel)"

local podname image fuse_rpc_env overrides
podname="monobase-${name}-$(id -u -n | tr A-Z a-z)-$(date +%s)"
Expand All @@ -26,6 +32,15 @@ main() {
"${podname}"
}

_usage() {
cat <<EOF
Usage: $(basename "${0}") <pod-name> <cmd-args> [cmd-args, ...]
Run a "one-off" pod with arbitrary command using the same image as the current monobase
daemonset, environment from the fuse-rpc-env configmap, and same host path mount.
EOF
}

_get-image() {
kubectl \
--namespace=services \
Expand Down

0 comments on commit eb07463

Please sign in to comment.