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

Use GetCloud from grafana-azure-sdk-go to get resource graph scope and fallback to using clusterUrl for ADX scope for unknown clouds #868

Merged
merged 7 commits into from May 1, 2024

Conversation

JonCole
Copy link
Contributor

@JonCole JonCole commented Apr 19, 2024

Using GetCloud from the azure sdk package gives us a consolidated location to get information about a specific cloud, allowing easier expansion of supported clouds in the future. Also, even though Azure Public and Azure China use support special scopes, using the cluster url in the scope is the recommended practice for other clouds.

Fixes #877

@JonCole JonCole requested a review from a team as a code owner April 19, 2024 15:58
@CLAassistant
Copy link

CLAassistant commented Apr 19, 2024

CLA assistant check
All committers have signed the CLA.

return scopes, nil
scopeTmpl, ok := "", false
if scopeTmpl, ok = adxScopes[azureCloud]; !ok {
scopeTmpl = "{clusterUrl}/.default"
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd add a clarifying comment here that this is applicable for all other clouds

aangelisc
aangelisc previously approved these changes Apr 22, 2024
Copy link
Contributor

@aangelisc aangelisc left a comment

Choose a reason for hiding this comment

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

LGTM, just one nit in the comments to address 😊 there's also a merge conflict that needs resolving

@JonCole
Copy link
Contributor Author

JonCole commented Apr 23, 2024

@aangelisc thanks for the review. I have fixed the merge conflict and added the comment - please take another look.

Copy link
Contributor

@aangelisc aangelisc left a comment

Choose a reason for hiding this comment

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

Thanks @JonCole!

@aangelisc
Copy link
Contributor

Once #875 is merged then we can merge this PR 😊

@aangelisc aangelisc merged commit c6b22e8 into grafana:main May 1, 2024
6 of 7 checks passed
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.

Support retrieving scopes from SDK
3 participants