application-gateway-kubernetes-ingress icon indicating copy to clipboard operation
application-gateway-kubernetes-ingress copied to clipboard

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

Open flo-kn opened this issue 1 year ago • 0 comments
trafficstars

Checklist

  • [ ] The title of the PR is clear and informative
  • [ ] If applicable, the changes made in the PR have proper test coverage
  • [ ] Issues addressed by the PR are mentioned in the description followed by Fixes.

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

flo-kn avatar Feb 06 '24 15:02 flo-kn