Skip to content

Conversation

@weng271190436
Copy link

@weng271190436 weng271190436 commented Jan 9, 2026


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:

cd /home/weiweng/azure-cli-extensions/src/fleet
python3 setup.py bdist_wheel

# Remove the existing fleet extension (if installed)
az extension remove --name fleet

# Install from the local wheel
az extension add --source /home/weiweng/azure-cli-extensions/src/fleet/dist/fleet-1.9.0-py3-none-any.whl

# Verify installation
az extension show --name fleet

# Test the get-credentials command with the conversion logic
az fleet get-credentials -g weiweng-testgroup -n weiweng-testfleet --overwrite-existing
kubectl get po -A

# Test the namespace get-credentials command with the conversion logic
az fleet namespace get-credentials -f weiweng-testfleet -n testns -g weiweng-testgroup
kubectl get po -n testns
image

Copied logic from similar AKS PR:
#9288

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally? (pip install wheel==0.30.0 required)
  • My extension version conforms to the Extension version schema

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.json automatically.
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.

Copilot AI review requested due to automatic review settings January 9, 2026 18:20
@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Jan 9, 2026

️✔️Azure CLI Extensions Breaking Change Test
️✔️Non Breaking Changes

@yonzhan
Copy link
Collaborator

yonzhan commented Jan 9, 2026

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link

github-actions bot commented Jan 9, 2026

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).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

@github-actions
Copy link

github-actions bot commented Jan 9, 2026

Copy link
Contributor

Copilot AI left a 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

@github-actions github-actions bot added release-version-block Updates do not qualify release version rules. NOTE: please do not edit it manually. and removed release-version-block Updates do not qualify release version rules. NOTE: please do not edit it manually. labels Jan 9, 2026
Signed-off-by: Wei Weng <Wei.Weng@microsoft.com>
@weng271190436 weng271190436 force-pushed the weiweng/add-fleet-credentials-conversion branch from c14d668 to 0e9b205 Compare January 9, 2026 20:51
@yonzhan yonzhan requested a review from kairu-ms January 10, 2026 01:30
@weng271190436
Copy link
Author

Hi @kairu-ms, would you be able to take a look at this PR?

@kairu-ms
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

kairu-ms
kairu-ms previously approved these changes Jan 15, 2026
@weng271190436
Copy link
Author

/azp run

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 9511 in repo Azure/azure-cli-extensions

@yonzhan
Copy link
Collaborator

yonzhan commented Jan 15, 2026

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

Wei Weng added 2 commits January 15, 2026 17:04
Signed-off-by: Wei Weng <Wei.Weng@microsoft.com>
Signed-off-by: Wei Weng <Wei.Weng@microsoft.com>
@weng271190436
Copy link
Author

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants