-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Description
Please add support for a --gh-token (or similar) parameter in the az aks install-cli command to allow users to pass a GitHub personal access token (PAT). This would enable authenticated requests to the GitHub API, helping to avoid the 403: rate limit exceeded error that frequently affects CI/CD pipelines and automated environments.
Currently, az aks install-cli makes a call to the GitHub API to fetch the latest release of kubelogin:
latest_release_url = 'https://api.github.com/repos/Azure/kubelogin/releases/latest'
When this command is used frequently (e.g., in CI/CD systems or Docker image builds), it quickly hits GitHub's unauthenticated API rate limit of 60 requests per hour per IP address. This results in intermittent build failures and pipeline instability.
Proposed Solution
Introduce a new optional parameter, e.g.:
az aks install-cli --gh-token <GITHUB_TOKEN>
When provided, the CLI should use this token to make authenticated requests to GitHub (e.g., by setting an Authorization: token <GITHUB_TOKEN> header).