Azure / application-gateway-kubernetes-ingress

This is an ingress controller that can be run on Azure Kubernetes Service (AKS) to allow an Azure Application Gateway to act as the ingress for an AKS cluster.
https://azure.github.io/application-gateway-kubernetes-ingress
MIT License
667 stars 413 forks source link

docs: fix `--query` parameter in install guide #1592

Open flo-kn opened 5 months ago

flo-kn commented 5 months ago

Checklist

Description

closes https://github.com/Azure/application-gateway-kubernetes-ingress/issues/1591

The json output format of the az aks get-version command might have changed since the creation of this guide. Here is an attempt to fix it by adjusting the --query parameter in order to follow up on the change so that variable kubernetesVersion get populated.

Fixes

before:

"...orchestrators[-1].orchestratorVersion..."

now:

patchedVersions=$(az aks get-versions --location $location --query "values[?isDefault==\`true\`].patchVersions" -o json)
kubernetesVersion=$(echo $patchedVersions | jq -r 'map(keys[]) | sort_by(split(".") | map(tonumber)) | .[-1]')

with in intermediate step to get the latest isDefault patchedVersion from the patchedVersions list using jq. Reason: The subsequent deployment template requires the version in the format major.minor.patch