Skip to content

Commit

Permalink
NO-ISSUE: fix kind with rootless user
Browse files Browse the repository at this point in the history
  • Loading branch information
eifrach committed Sep 2, 2024
1 parent 28f6c35 commit efc89b1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion hack/kind/kind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,12 @@ function install() {

function create() {
check
if ! $(id -u) -eq 0; then
PREFIX_KIND_COMMAND='systemd-run --scope --user -p "Delegate=yes"'
fi

if ! kind get clusters | grep $HUB_CLUSTER_NAME; then
kind create cluster --config $__dir/kind-config.yaml
$PREFIX_KIND_COMMAND kind create cluster --config $__dir/kind-config.yaml
else
echo "Cluster already existing. Skipping creation"
fi
Expand Down

0 comments on commit efc89b1

Please sign in to comment.