Skip to content

Commit

Permalink
adding removing subscription references and using get_clusters function
Browse files Browse the repository at this point in the history
  • Loading branch information
JordanHoey96 committed Nov 20, 2024
1 parent dcb008b commit e59e1cf
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scripts/aks/resource-details.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ business_area_entry=$(jq -r '. | last | .business_area' issues_list.json)
#declare associative array
declare -A sku_sizes

source scripts/aks/set-subscription.sh
source scripts/aks/common-functions.sh
source scripts/common/common-functions.sh

#Function to add SKU and node count to array.
#Create new entry if SKU does not already exist. Update entry if SKU already exists in array.
function countSku() {
Expand All @@ -31,7 +33,7 @@ function nodeSummary() {
}
#Get nodepool details from Azure, node count, nodepool name, nodepool SKU...
function get_costs() {
CLUSTERS=$(az resource list --resource-type Microsoft.ContainerService/managedClusters --query "[?tags.autoShutdown == 'true']" -o json)
CLUSTERS=$(get_clusters)

while read cluster; do
RESOURCE_GROUP=$(jq -r '.resourceGroup' <<<$cluster)
Expand Down Expand Up @@ -76,7 +78,6 @@ while read i; do
PROJECT="SDS"
fi
SELECTED_ENV=$i
subscription
get_costs
done < <(jq -r 'last | .environment[]' issues_list.json || jq -r 'last | .environment' issues_list.json)

Expand Down

0 comments on commit e59e1cf

Please sign in to comment.