Fleet: az fleet get-credentials kubeconfig auto-conversion with kubelogin#9511
Conversation
️✔️Azure CLI Extensions Breaking Change Test
|
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
|
There was a problem hiding this comment.
Pull request overview
This pull request adds automatic kubeconfig conversion using kubelogin for the az fleet get-credentials command. The change eliminates the need for users to manually run kubelogin convert-kubeconfig -l azurecli after retrieving fleet hub credentials.
Key changes:
- Version bump from 1.8.2 to 1.8.3
- Auto-detection and execution of kubelogin to convert kubeconfig to use Azure CLI authentication
- Added informational warnings when kubelogin is not installed or conversion fails
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| src/fleet/setup.py | Version bump to 1.8.3 |
| src/fleet/HISTORY.rst | Added changelog entry for automatic kubelogin conversion feature |
| src/fleet/azext_fleet/custom.py | Added kubelogin auto-conversion logic with subprocess execution, error handling, and user warnings |
c14d668 to
0e9b205
Compare
|
Hi @kairu-ms, would you be able to take a look at this PR? |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
/azp run |
|
Commenter does not have sufficient privileges for PR 9511 in repo Azure/azure-cli-extensions |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
Hi @kairu-ms thank you for your review. The tests were not passing because the recordings were stale. Regnerated the recordings. Can you look again? Thanks! |
200fe3c to
45e5eaa
Compare
Signed-off-by: Wei Weng <Wei.Weng@microsoft.com>
45e5eaa to
62c5374
Compare
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
Signed-off-by: Wei Weng <Wei.Weng@microsoft.com>
62c5374 to
05551d0
Compare
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
[Release] Update index.json for extension [ fleet-1.8.3 ] : https://dev.azure.com/msazure/One/_build/results?buildId=150728834&view=results |
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
az fleet get-credentials
az fleet namespace get-credentials
Tested with:
Copied logic from similar AKS PR:
#9288
General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (pip install wheel==0.30.0required)For new extensions:
About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update
src/index.jsonautomatically.You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify
src/index.json.