-
Notifications
You must be signed in to change notification settings - Fork 82
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
Detect Cloud Instance by Region as Fallback #875
Detect Cloud Instance by Region as Fallback #875
Conversation
if cloudConfiguration == nil { | ||
cloudConfiguration = &azure.CloudConfiguration{Name: helper.CloudInstanceNameFromRegion(backupBucket.Spec.Region)} | ||
} | ||
|
||
azCloudConfiguration, err := azureclient.AzureCloudConfigurationFromCloudConfiguration(cloudConfiguration) |
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.
Can't these functions be grouped up in a single function ? Can we imagine using one but not the other ? Like get either a cloudinstance *string or a region *string
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.
Unfortunately, there is one case where they are both required. However, I agree that duplicating these lines of code tenfold is not the way to go.
I've tried my hand at refactoring it a bit, but unfortunately there is some inherent ugliness here due to the way the upstream cloud-instance structs are defined. Not sure if I have hit the mark, honestly 🤔
86e5548
to
9bd8736
Compare
9bd8736
to
8a80713
Compare
8a80713
to
cdc3f6b
Compare
cdc3f6b
to
ec9d4fa
Compare
/test |
Testrun: e2e-v7wnl +---------------------+---------------------------+---------+----------+ | NAME | STEP | PHASE | DURATION | +---------------------+---------------------------+---------+----------+ | bastion-test | bastion-test | Failed | 3m27s | | infrastructure-test | infrastructure-test | Omitted | 0s | | infrastructure-test | infra-flow-test | Omitted | 0s | | infrastructure-test | infra-flow-migration-test | Omitted | 0s | +---------------------+---------------------------+---------+----------+ |
fall back to the AWS-way of doing things if no explicit CloudConfiguration is given. We keep the Configuration for possible future support of arbitrary cloud instances (these would then _have_ to provide a future version of the CloudConfiguration).
terraform is basically deprecated at this point
6e16453
to
ab8ac4f
Compare
/test |
Testrun: e2e-s2rfw +---------------------+---------------------------+---------+----------+ | NAME | STEP | PHASE | DURATION | +---------------------+---------------------------+---------+----------+ | bastion-test | bastion-test | Failed | 2m45s | | infrastructure-test | infrastructure-test | Omitted | 0s | | infrastructure-test | infra-flow-test | Omitted | 0s | | infrastructure-test | infra-flow-migration-test | Omitted | 0s | +---------------------+---------------------------+---------+----------+ |
ab8ac4f
to
448cfd2
Compare
/test |
Testrun: e2e-f8qzt +---------------------+---------------------------+---------+----------+ | NAME | STEP | PHASE | DURATION | +---------------------+---------------------------+---------+----------+ | bastion-test | bastion-test | Failed | 6m2s | | infrastructure-test | infrastructure-test | Omitted | 0s | | infrastructure-test | infra-flow-test | Omitted | 0s | | infrastructure-test | infra-flow-migration-test | Omitted | 0s | +---------------------+---------------------------+---------+----------+ |
448cfd2
to
273e6ea
Compare
/test |
Testrun: e2e-8pd2s +---------------------+---------------------------+-----------+----------+ | NAME | STEP | PHASE | DURATION | +---------------------+---------------------------+-----------+----------+ | bastion-test | bastion-test | Succeeded | 8m33s | | infrastructure-test | infrastructure-test | Succeeded | 31m9s | | infrastructure-test | infra-flow-test | Succeeded | 30m54s | | infrastructure-test | infra-flow-migration-test | Succeeded | 29m46s | +---------------------+---------------------------+-----------+----------+ |
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.
/lgtm
How to categorize this PR?
/area usability
/kind enhancement
/platform azure
What this PR does / why we need it:
With the changes in this PR, the extension will look at the name of the region configured in the shoot to determine the correct cloud instance to connect to iff there is no explicit CloudConfiguration provided.
Release note: