-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Issue 3159: Added support for AzureStackHub and Azure private cloud identification #8738
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?
Issue 3159: Added support for AzureStackHub and Azure private cloud identification #8738
Conversation
Signed-off-by: Ryan Schaaf <ryanschaaf@datamachines.com>
Signed-off-by: Ryan Schaaf <ryanschaaf@datamachines.com>
@ywk253100 do you have any additional thoughts on this PR? |
Signed-off-by: Ryan Schaaf <ryanschaaf@datamachines.com>
Signed-off-by: Ryan Schaaf <ryanschaaf@datamachines.com>
Signed-off-by: Ryan Schaaf <ryanschaaf@datamachines.com>
pkg/util/azure/util.go
Outdated
@@ -49,8 +50,8 @@ const ( | |||
CredentialKeySendCertChain = "AZURE_CLIENT_SEND_CERTIFICATE_CHAIN" // #nosec | |||
CredentialKeyUsername = "AZURE_USERNAME" // #nosec | |||
CredentialKeyPassword = "AZURE_PASSWORD" // #nosec | |||
|
|||
credentialFile = "credentialsFile" | |||
CredentialResourceManagerEndpoint = "AZURE_RESOURCE_MANAGER_ENDPOINT" // #nosec |
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.
Let's rename it as CredentialKeyResourceManagerEndpoint
to follow the same pattern with other variables.
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.
Done!
I'm OK to the changes. |
Signed-off-by: Ryan Schaaf <ryanschaaf@datamachines.com>
Signed-off-by: Ryan Schaaf <ryanschaaf@datamachines.com>
@@ -1,13 +1,13 @@ | |||
module github.com/vmware-tanzu/velero | |||
|
|||
go 1.23.0 | |||
go 1.23.1 |
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.
This is coming from kubernetes-sigs/cloud-provider-azure@5548c42 ("sigs.k8s.io/cloud-provider-azure/pkg/azclient")
Filed issue there to hopefully starve off future unnecessary bumps.
Signed-off-by: Ryan Schaaf <ryanschaaf@datamachines.com>
Signed-off-by: Ryan Schaaf <ryanschaaf@datamachines.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8738 +/- ##
==========================================
+ Coverage 59.56% 59.58% +0.01%
==========================================
Files 370 370
Lines 40229 40246 +17
==========================================
+ Hits 23964 23981 +17
Misses 14766 14766
Partials 1499 1499 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…ate-cloud-support
…ate-cloud-support
@anshulahuja98 - I was able to take this branch to an AzureStackHub environment and unfortunately the |
@schaafito can we consider using an older SDK version? Or do we need to the latest SDK with older API version. |
Thank you for contributing to Velero!
Please add a summary of your change
Added support for AzureStackHub and private Azure cloud environments by updating the
getCloudConfiguration()
logic to fall-through to the kubernetes cloud-provider-azure module logic for identifying private cloud environments. This fall-through supports bothAZURE_RESOURCE_MANAGER_ENDPOINT
cloud discovery as well asAZURE_ENVIRONMENT_FILEPATH
discovery.The private cloud logic can (partially) be tested on any Azure environment by setting the
AZURE_CLOUD_NAME
toAZURESTACKCLOUD
and providing a validazurestackcloud.json
configuration file as documented here. You can set the cloud endpoints to valid endpoints for a public cloud offering to test fallthrough logic.The bulk of the documentation updates will need to be done on the velero-plugin-for-microsoft-azure project which I plan during the PR cycle to recompile the plugin with these changes. The proposed documentation changes can be seen on my branch
I provided unit tests for both endpoint and filepath cloud discovery, as well as tested in my own Azure environments to confirm functionality.
Note: This feature requires golang1.23 support so I bumped those as well. I see an open PR #8717 which I suspect will need to be merged before this.
Does your change fix a particular issue?
Fixes #3159
Please indicate you've done the following:
make new-changelog
) or comment/kind changelog-not-required
on this PR.site/content/docs/main
.