Skip to content
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

Merged

Conversation

droot
Copy link
Contributor

@droot droot commented Jun 27, 2019

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

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jun 27, 2019
@k8s-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jun 27, 2019
Copy link
Member

@mengqiy mengqiy left a 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
Copy link
Member

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.

@mengqiy
Copy link
Member

mengqiy commented Jun 27, 2019

And please also fix the linter failure.

@droot droot force-pushed the feature/enable-conversion-webhook branch from d5d4e71 to bbfa3a4 Compare June 27, 2019 22:31
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
@droot droot force-pushed the feature/enable-conversion-webhook branch from bbfa3a4 to 0f2e574 Compare June 27, 2019 23:58
@mengqiy
Copy link
Member

mengqiy commented Jun 28, 2019

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 28, 2019
@k8s-ci-robot k8s-ci-robot merged commit 21c5daf into kubernetes-sigs:master Jun 28, 2019
DirectXMan12 pushed a commit that referenced this pull request Jan 31, 2020
Add a script to test installation script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants