-
Notifications
You must be signed in to change notification settings - Fork 446
Support for Azure Private DNS Zone to be present in any resource group #5452
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
Support for Azure Private DNS Zone to be present in any resource group #5452
Conversation
Hi @vishu2498. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/ok-to-test |
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.
Thanks for your work in this PR! Are you able to add a validating webhook to make sure if PrivateDNSZoneResourceGroup
is set, that PrivateDNSZoneName
is as well? I don't think PrivateDNSZoneName
is being defaulted anywhere if it's not set. Also, a couple unit tests for those webhooks would be great.
b7b9ad4
to
8cc7e3d
Compare
@willie-yao Thanks for the review on PR and suggestions. |
b8a6efc
to
465fca5
Compare
/test pull-cluster-api-provider-azure-e2e |
/assign |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5452 +/- ##
==========================================
+ Coverage 52.53% 52.55% +0.02%
==========================================
Files 272 272
Lines 29385 29423 +38
==========================================
+ Hits 15436 15463 +27
- Misses 13143 13153 +10
- Partials 806 807 +1 ☔ View full report in Codecov by Sentry. |
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.
Nice work! Just a few more comments from my end
err = validateResourceGroup(testCase.resourceGroup, | ||
field.NewPath("spec").Child("networkSpec").Child("privateDNSZoneResourceGroup")) | ||
g.Expect(err).NotTo(HaveOccurred()) |
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.
These changes won't be needed as we just want to test the new function validatePrivateDNSZoneResourceGroup
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.
Yeah this was just an additional test case. I have removed it now.
err = validateResourceGroup(testCase.resourceGroup, | ||
field.NewPath("spec").Child("networkSpec").Child("privateDNSZoneResourceGroup")) | ||
g.Expect(err).NotTo(BeNil()) | ||
g.Expect(err.Type).To(Equal(field.ErrorTypeInvalid)) | ||
g.Expect(err.Field).To(Equal("spec.networkSpec.privateDNSZoneResourceGroup")) | ||
g.Expect(err.BadValue).To(BeEquivalentTo(testCase.resourceGroup)) |
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
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.
Yup. Removed it.
/test pull-cluster-api-provider-azure-e2e-optional |
17a55f8
to
4eda13e
Compare
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
/hold for squash
Thanks for your work and patience! I'll remove the hold once you squash your commits. Pinging @nawazkh for second reviewer.
LGTM label has been added. Git tree hash: 6eb5bca0bffb8ea88f199e290ccf7496896c1b42
|
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.
Hey @vishu2498 , thank you for putting this together. This PR solves a good use case!
I have added some nits and one suggestion, please take a look.
4eda13e
to
6e62f2c
Compare
@willie-yao & @nawazkh Thanks for your suggestions. I have updated the PR as per comments & squashed the commits. Kindly re-check it. |
/test pull-cluster-api-provider-azure-e2e |
/lgtm |
LGTM label has been added. Git tree hash: 85478a0a4915f3782b079a24af38b170007169c4
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: nawazkh The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/unhold |
What type of PR is this?
/kind feature
/kind api-change
What this PR does / why we need it:
Currently, cluster ResourceGroup is always used for the Private DNS Zone.
This PR is needed to give an additional option to define any resource group for Azure Private DNS Zone. If not given in input, it will fall back to cluster resource group.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #
This PR fixes the issue: #5273
Special notes for your reviewer:
TODOs:
Release note: