-
Notifications
You must be signed in to change notification settings - Fork 256
HIVE-2690: Soften webhook validation for Azure baseDomainResourceGroupName #2802
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
Conversation
|
@huangmingxia: This pull request references HIVE-2690 which is a valid jira issue. In response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
57df09d to
85915dd
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2802 +/- ##
==========================================
+ Coverage 50.35% 50.39% +0.04%
==========================================
Files 279 279
Lines 34180 34190 +10
==========================================
+ Hits 17210 17231 +21
+ Misses 15617 15595 -22
- Partials 1353 1364 +11
🚀 New features to boost your workflow:
|
|
|
||
| allErrs = append(allErrs, validateClusterPlatform(specPath.Child("platform"), cd.Spec.Platform)...) | ||
|
|
||
| if cd.Spec.Platform.Azure != nil && cd.Spec.ManageDNS && cd.Spec.Platform.Azure.BaseDomainResourceGroupName == "" { |
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.
I'm curious why you moved this out of validateClusterPlatform?
Oh, is it because we don't currently have access to cd.Spec.ManageDNS there?
I guess the cleanest alternative is making validateClusterPlatform accept the cd instead of cd.Spec.Platform.
I can't decide whether it's worth doing that for the sake of keeping all more of the platform validation together in one spot.
This file isn't beautifully organized in the first place...
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.
Thank you :)
Yes, validateClusterPlatform does not have access to cd.Spec.ManageDNS, it only receives the platform fields.
I guess the cleanest alternative is making validateClusterPlatform accept the cd instead of cd.Spec.Platform.
That would certainly work, but at the time I was concerned it might change the function’s structure, so I didn’t go with that approach.
2uasimojo
left a comment
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
I can't decide whether it's worth refactoring to try to keep more of the platform validation together. I'll leave it up to you. Unhold or re-push :)
/hold
|
@2uasimojo Thanks for your insight! I’m happy to try refactoring this part :) |
…pName Require baseDomainResourceGroupName only when manageDNS=true, not for private clusters
85915dd to
821e897
Compare
|
@huangmingxia: all tests passed! Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
2uasimojo
left a comment
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, that works!
/lgtm
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: 2uasimojo, huangmingxia 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 |
|
/hold cancel |
This PR relaxes the Azure webhook validation to only require baseDomainResourceGroupName when manageDNS is enabled.