Skip to content

Commit

Permalink
Fix deletion of stackpack
Browse files Browse the repository at this point in the history
Signed-off-by: Jeroen van Erp <[email protected]>
  • Loading branch information
hierynomus committed Sep 18, 2024
1 parent 923918c commit f8436f4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/observability/stackpack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ observability_delete_stackpack() {
local service_token=$2
local cluster_name=$3

if observability_check_stackpack $url $service_token $cluster_name; then
local stackpacks stackpack_id
stackpacks=$(/usr/local/bin/sts stackpack list-instances --name kubernetes-v2 -o json --url $url --service-token $service_token)
stackpack_id=$(echo $stackpacks | jq -r '.instances[] | select(.config.kubernetes_cluster_name == "'$cluster_name'") | .id')
if [ -n "$stackpack_id" ]; then
/usr/local/bin/sts stackpack uninstall --id $stackpack_id --url $url --service-token $service_token --name kubernetes-v2
echo ">>> StackPack for cluster '${cluster_name}' deleted"
else
Expand Down

0 comments on commit f8436f4

Please sign in to comment.