From d3abf1089d61379487823ebb4ef6bb547cb3d571 Mon Sep 17 00:00:00 2001 From: Jonathan Funk Date: Fri, 25 Oct 2024 13:47:06 -0700 Subject: [PATCH] update params --- .github/scripts/sysdig_installed.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/scripts/sysdig_installed.sh b/.github/scripts/sysdig_installed.sh index 90781e6f3..9494b069a 100755 --- a/.github/scripts/sysdig_installed.sh +++ b/.github/scripts/sysdig_installed.sh @@ -1,5 +1,6 @@ #!/bin/bash # Fetches the sysdig team crd and checks at least 1 user is present in the config +# IMPORTANT NOTE: requires a serviceaccount with get/list on sysdig-team # ENV: # OC_NAMESPACE # OC_SERVER @@ -23,7 +24,7 @@ oc login --token=$OC_TEMP_TOKEN --server=$OC_SERVER oc project $OC_NAMESPACE # Safeguard! -sysdig_config=$(oc -n $NAMESPACE get sysdig-team -ojson) +sysdig_config=$(oc get sysdig-team -n $OC_NAMESPACE -ojson) num_users=$(echo $sysdig_config | jq -r '.items[0].spec.team.users | length') if [ $num_users -eq 0 ]; then echo "No users found in sysdig-team"