Skip to content
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

Azure Monitor: Add support to customized routes #54829

Merged
merged 5 commits into from Oct 3, 2022
Merged

Conversation

ms-hujia
Copy link
Contributor

@ms-hujia ms-hujia commented Sep 7, 2022

What this PR does / why we need it:
This PR aims to make it possible to use Grafana in specific non-public Azure cloud such as Azure Stack Hub. Unlike other pre-defined clouds, they have variable configurations for authentication and service endpoints for different instances. So, it's not possible to hardcode those configurations in code or generate by rules. After this PR, user can use Grafana Azure Monitor data-source to talk with Azure Monitor service endpoints in those specific Azure clouds not defined in the well-known list.

This PR mainly changes the backend of Azure Monitor data-source. The routes will be overridden by some extra configuration from data-source if the cloud is customized cloud. For now, the extra configuration is supposed to be configured by script automatically, while add corresponding UX is also possible.

Which issue(s) this PR fixes:

N/A.

Special notes for your reviewer:
For the cloud name indicating customization, it is hard coded as AzureCustomizedCloud for now and will be updated to a new entry in azsettings if grafana/grafana-azure-sdk-go#13 is completed.

@ms-hujia ms-hujia requested a review from a team as a code owner September 7, 2022 08:40
@ms-hujia ms-hujia requested review from asimpson and andresmgot and removed request for a team September 7, 2022 08:40
@CLAassistant
Copy link

CLAassistant commented Sep 7, 2022

CLA assistant check
All committers have signed the CLA.

@grafanabot grafanabot added area/backend datasource/Azure Azure Monitor Datasource pr/external This PR is from external contributor labels Sep 7, 2022
@mellieA
Copy link
Contributor

mellieA commented Sep 17, 2022

@ms-hujia thank you for your contribution 🎉

I've moved this to the Cloud Provider Plugins project for review/comments by the dev squad.

Copy link
Contributor

@andresmgot andresmgot left a comment

Choose a reason for hiding this comment

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

Hi @ms-hujia, sorry for the delayed response! I have some small suggestions / questions here.

pkg/tsdb/azuremonitor/azuremonitor.go Outdated Show resolved Hide resolved
pkg/tsdb/azuremonitor/types/types.go Show resolved Hide resolved
@andresmgot
Copy link
Contributor

andresmgot commented Sep 29, 2022

It seems there are some weird errors in the CI, can you merge the latest status of main here to try to fix them?

Also, you have a pending review at grafana/grafana-azure-sdk-go#13 (review) we can continue with that PR before the merge this.

@andresmgot andresmgot added this to the 9.3.0 milestone Sep 29, 2022
@andresmgot andresmgot changed the title Add support to customized routes for Azure Monitor data-source Azure Monitor: Add support to customized routes Sep 29, 2022
@ms-hujia
Copy link
Contributor Author

It seems there are some weird errors in the CI, can you merge the latest status of main here to try to fix them?

Also, you have a pending review at grafana/grafana-azure-sdk-go#13 (review) we can continue with that PR before the merge this.

Sure, have rebased the branch and also fixed the comment in the PR of Azure SDK.

Copy link
Contributor

@andresmgot andresmgot left a comment

Choose a reason for hiding this comment

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

thanks @ms-hujia! we just need to upgrade the sdk here and we are ready to go

pkg/tsdb/azuremonitor/credentials.go Outdated Show resolved Hide resolved
@ms-hujia ms-hujia requested a review from a team as a code owner September 30, 2022 12:19
@ms-hujia ms-hujia requested review from sakjur, papagian and zserge and removed request for a team September 30, 2022 12:19
Copy link
Contributor

@andresmgot andresmgot left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add to changelog area/backend datasource/Azure Azure Monitor Datasource no-backport Skip backport of PR pr/external This PR is from external contributor
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

6 participants