-
Notifications
You must be signed in to change notification settings - Fork 50
Azure: Allow to deploy cluster in existing vNets #371
Conversation
I opened this PR as work in progress to do some review upfront. |
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.
Looks good overall, having a few minor suggestions.
...ers/provider-azure/charts/internal/cloud-provider-config/templates/cloud-provider-config.tpl
Show resolved
Hide resolved
controllers/provider-azure/pkg/internal/infrastructure/terraform.go
Outdated
Show resolved
Hide resolved
controllers/provider-azure/charts/internal/azure-infra/values.yaml
Outdated
Show resolved
Hide resolved
Tests and validations were added meanwhile. |
Meanwhile there is a MCM release with gardener/machine-controller-manager#344 included. It is also already used by the extension: #382 @AndreasBurger, @rfranzke Could you please have another look? Thank you :) |
Please rebase and fix the CI issues |
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, small question on the object meta. ptal
@@ -23,6 +23,7 @@ import ( | |||
// InfrastructureConfig infrastructure configuration resource | |||
type InfrastructureConfig struct { | |||
metav1.TypeMeta | |||
metav1.ObjectMeta |
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.
Why do we now get object meta here?
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.
We use the Infrastructure
resource namespace as name for the Shoot resource group. We need to ensure via validation that the existing vNet is not in the Shoot resource group. See https://github.com/gardener/gardener-extensions/pull/371/files#diff-847ec4dd7a0cc53cfc92b04acd2dd206R70
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.
Hm, I don't understand. The Infrastructure
resource is defined in Gardener's extension API, and here you define an embedded InfrastructureConfig
resource that is part of the Infrastructure
object. Why does it have to have the namespace again? That's not convenient for the end-user and not needed. Can't you simply pass the namespace name to your validation function?
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.
Yep, I agree. I have modified it to pass the shoot resourceGroup name (=shoot technical name) to the Validation function. Thank you!
@@ -23,7 +23,8 @@ import ( | |||
|
|||
// InfrastructureConfig infrastructure configuration resource | |||
type InfrastructureConfig struct { | |||
metav1.TypeMeta `json:",inline"` | |||
metav1.TypeMeta `json:",inline"` | |||
metav1.ObjectMeta `json:"metadata"` |
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.
Why do we now get object meta here?
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.
same as above.
Allow to deploy Azure Shoot clusters in an existing vNet which exists in a different resource group.
Allow to deploy Azure Shoot clusters in an existing vNet which exists in a different resource group.
What this PR does / why we need it:
We need to support Azure cluster deployed in existing vnets.
Which issue(s) this PR fixes:
Fixes partly: #136
Special notes for your reviewer:
Release note: