-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
✨ enable conversion webhook in webhook builder #504
✨ enable conversion webhook in webhook builder #504
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: droot 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 |
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.
One nit. Other pieces look good.
@@ -247,32 +248,45 @@ func CheckConvertibility(scheme *runtime.Scheme, obj runtime.Object) error { | |||
} | |||
|
|||
if len(gvks) == 1 { | |||
return nil // single version | |||
return false, nil // single version | |||
} | |||
|
|||
if len(hubs) == 0 && len(spokes) == 0 { | |||
// multiple version detected with no conversion implementation. This is |
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.
IMO we should log something in this case, since builtin types won't be sent to the webhoo; If it happens it usually means CRD conversion are configured by the CRD types doesn't implement Hub and Convertible interfaces.
Feel free to address this in a followup PR.
And please also fix the linter failure. |
d5d4e71
to
bbfa3a4
Compare
Main changes: - Disable conversion webhook by default and enable only if a type implements convertible - Enhanced the test coverage to include spoke to spoke conversion
bbfa3a4
to
0f2e574
Compare
/lgtm |
Add a script to test installation script
Main changes:
implements convertible