-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Fleet: az fleet get-credentials kubeconfig auto-conversion with kubelogin #9511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
Signed-off-by: Wei Weng <Wei.Weng@microsoft.com>
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). |
Signed-off-by: Wei Weng <Wei.Weng@microsoft.com>
Signed-off-by: Wei Weng <Wei.Weng@microsoft.com>
|
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! |
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.