You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All of the existing setup scripts seem to make the assumption that the user has not changed their default azure cli output (via az configure), and is using the default 'json' format. All azure cli commands that query the response object should specify '-o json' or alternatively '-o tsv' if just trying to get the exact value without passing to jq.
This could be modified to either of the following:
To use as is with JSON, but to ensure this works for users already:
AKS_JSON=$(az aks show --name "$CLUSTER_NAME" --resource-group "$AZURE_RESOURCE_GROUP" -o json)
AZURE_LOCATION=$(jq -r ".location" <<< "$AKS_JSON")
To avoid the need to parse json with jd
AZURE_LOCATION=$(az aks show --name $CLUSTER_NAME --resource-group $AZURE_RESOURCE_GROUP -o tsv --query location)
The text was updated successfully, but these errors were encountered:
swgriffith
changed the title
Installation script all assume default azure CLI output format of JSON
Installation scripts all assume default azure CLI output format of JSON
Oct 9, 2024
All of the existing setup scripts seem to make the assumption that the user has not changed their default azure cli output (via az configure), and is using the default 'json' format. All azure cli commands that query the response object should specify '-o json' or alternatively '-o tsv' if just trying to get the exact value without passing to jq.
Example:
https://raw.githubusercontent.com/Azure/karpenter-provider-azure/main/hack/deploy/configure-values.sh
AKS_JSON=$(az aks show --name "$CLUSTER_NAME" --resource-group "$AZURE_RESOURCE_GROUP")
AZURE_LOCATION=$(jq -r ".location" <<< "$AKS_JSON")
This could be modified to either of the following:
To use as is with JSON, but to ensure this works for users already:
AKS_JSON=$(az aks show --name "$CLUSTER_NAME" --resource-group "$AZURE_RESOURCE_GROUP" -o json)
AZURE_LOCATION=$(jq -r ".location" <<< "$AKS_JSON")
To avoid the need to parse json with jd
AZURE_LOCATION=$(az aks show --name $CLUSTER_NAME --resource-group $AZURE_RESOURCE_GROUP -o tsv --query location)
The text was updated successfully, but these errors were encountered: