Improve kubelogin Latest‑Version Retrieval to Handle GitHub API Rate Limits
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
**Summary**
kubelogin version retrieval in the Azure CLI is failing when GitHub’s public API rate limit (60 requests per IP) is reached. When this happens, the installation failed instead of trying alternative stable endpoints.
**Requested Enhancement**
Add fallback logic so that if the public GitHub API rate limit is hit and kubelogin version retrieval fails due to rate limiting or other errors, the it should also try the alternative endpoints.
Current GitHub latest release API : `https://api.github.com/repos/Azure/kubelogin/releases/latest`
Fallback Direct version file download: `https://github.com/Azure/kubelogin/releases/latest/download/kubelogin-version.txt`
`curl -fsSL https://github.com/Azure/kubelogin/releases/latest/download/kubelogin-version.txt`
**Reference**
- https://github.com/Azure/kubelogin/discussions/748
- https://github.com/Azure/kubelogin/pull/749
**Why This Matters**
- GitHub’s unauthenticated API limit of 60 requests per IP is frequently hit in CI/CD environments.
- This causes kubelogin acquisition to fail even though alternative endpoints are available.
- Adding fallback URLs will make Azure CLI authentication flows more reliable and resilient.
Contributor guide
Assessment
This issue has not been assessed yet.