Add isolated kind dependency testbed
This commit is contained in:
parent
74ac822d43
commit
5759938f3f
1 changed files with 1155 additions and 0 deletions
39
tests/kind/provider/nerdctl
Executable file
39
tests/kind/provider/nerdctl
Executable file
|
|
@ -0,0 +1,39 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
if [[ "${1:-}" = run ]]; then
|
||||
shift
|
||||
arguments=()
|
||||
for argument in "$@"; do
|
||||
if [[ "$argument" = kind ]]; then
|
||||
arguments+=(nuthatch-kind)
|
||||
else
|
||||
arguments+=("$argument")
|
||||
fi
|
||||
done
|
||||
exec "$NUTHATCH_REAL_NERDCTL" run --memory 20g --memory-swap 28g --cpus 8 "${arguments[@]}"
|
||||
fi
|
||||
|
||||
# kind otherwise gives every rootless namespace the same bridge and IPv6 subnet.
|
||||
if [[ "${1:-}" = network ]]; then
|
||||
arguments=()
|
||||
for argument in "$@"; do
|
||||
case "$argument" in
|
||||
kind)
|
||||
arguments+=(nuthatch-kind)
|
||||
;;
|
||||
fc00:f853:ccd:e793::/64)
|
||||
arguments+=(fc00:f853:ccd:e794::/64)
|
||||
;;
|
||||
--subnet=fc00:f853:ccd:e793::/64)
|
||||
arguments+=(--subnet=fc00:f853:ccd:e794::/64)
|
||||
;;
|
||||
*)
|
||||
arguments+=("$argument")
|
||||
;;
|
||||
esac
|
||||
done
|
||||
exec "$NUTHATCH_REAL_NERDCTL" "${arguments[@]}"
|
||||
fi
|
||||
|
||||
exec "$NUTHATCH_REAL_NERDCTL" "$@"
|
||||
Loading…
Reference in a new issue