From efc89b1ac3f10eceaed57fc7e551adef7572db9f Mon Sep 17 00:00:00 2001 From: Eran Ifrach Date: Mon, 2 Sep 2024 17:47:26 +0300 Subject: [PATCH] NO-ISSUE: fix kind with rootless user --- hack/kind/kind.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hack/kind/kind.sh b/hack/kind/kind.sh index c572be82597..2c3d83348f5 100755 --- a/hack/kind/kind.sh +++ b/hack/kind/kind.sh @@ -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