Skip to content

Update diagnostics commands to work with clusters with local accounts disabled#5539

Merged
zhoxing-ms merged 10 commits into
Azure:mainfrom
peterbom:feature/kollect-aad
Nov 24, 2022
Merged

Update diagnostics commands to work with clusters with local accounts disabled#5539
zhoxing-ms merged 10 commits into
Azure:mainfrom
peterbom:feature/kollect-aad

Conversation

@peterbom
Copy link
Copy Markdown
Contributor

@peterbom peterbom commented Nov 10, 2022

Previously the kollect and kanalyze commands attempted to gain cluster access by listing admin credentials. This does not work if the cluster has local accounts disabled.

These changes make use of normal non-admin user credentials. However, if a cluster is AAD-enabled, these credentials will initially require interactive login. We can make use of kubelogin to convert the credentials to allow non-interactive use. The bulk of the code changes here are to check whether this binary is accessible to the user and either downloading or failing with an appropriate error.

cc: @Tatsinnit


This checklist is used to make sure that common guidelines for a pull request are followed.

Related command

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?

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.
The precondition is to put your code inside this repository and upgrade the version in the pull request but do not modify src/index.json.

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Nov 10, 2022

AKS

Copy link
Copy Markdown
Member

@FumingZhang FumingZhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR looks good to me, but I suppose it would be better if you could write a live test case to test the whole process.

Copy link
Copy Markdown
Member

@FumingZhang FumingZhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, queued a pipeline to test the newly added test case.

Copy link
Copy Markdown
Member

@Tatsinnit Tatsinnit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️☕️🙏 thanks for this addition, looks good to me as well.

@peterbom
Copy link
Copy Markdown
Contributor Author

LGTM, queued a pipeline to test the newly added test case.

@FumingZhang: Pipeline is now passing

Copy link
Copy Markdown
Member

@FumingZhang FumingZhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zhoxing-ms zhoxing-ms merged commit 3c5a707 into Azure:main Nov 24, 2022
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.

5 participants