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

Refactor project layout to enable multiple providers #40

Merged
merged 19 commits into from
Aug 17, 2023

Conversation

levikobi
Copy link
Member

@levikobi levikobi commented Jul 24, 2023

What type of PR is this?

/kind cleanup
/kind feature

What this PR does / why we need it:
Adding support for converting multiple Ingress providers, in an extensible and testable way.

Which issue(s) this PR fixes:

Fixes #28

Does this PR introduce a user-facing change?:

None

@k8s-ci-robot k8s-ci-robot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jul 24, 2023
@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jul 24, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @levikobi. 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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jul 24, 2023
@LiorLieberman
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 24, 2023
Copy link
Member

@LiorLieberman LiorLieberman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @levikobi, thats an important piece of work!

The approach is LGTM but left some comments.

Also, any specific reason you wrapped all the errors with %w ? I did not find error types in this PR so not sure whats the value of the wrapping

pkg/i2gw/ingress2gateway.go Outdated Show resolved Hide resolved
pkg/i2gw/ingress2gateway.go Outdated Show resolved Hide resolved
@sunjayBhatia
Copy link
Member

/cc

@levikobi
Copy link
Member Author

Thanks @levikobi, thats an important piece of work!

The approach is LGTM but left some comments.

Also, any specific reason you wrapped all the errors with %w ? I did not find error types in this PR so not sure whats the value of the wrapping

As discussed offline, the %w doesn't add value right now. I will revert to %v.

@LiorLieberman
Copy link
Member

/cc

@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 30, 2023
@levikobi levikobi force-pushed the conversion-refactor branch 2 times, most recently from d54ed81 to 621bf56 Compare July 30, 2023 12:13
@LiorLieberman
Copy link
Member

Havent had time to look after the new commits yet but since we gonna have contour and istio implementing the provider specific logic first I would like another review from @howardjohn and @sunjayBhatia

/cc @howardjohn @sunjayBhatia

pkg/i2gw/ingress2gateway.go Outdated Show resolved Hide resolved
pkg/i2gw/ingress2gateway.go Outdated Show resolved Hide resolved
}
}

// TODO: Open a new issue - collate gateways objects.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please open an issue for it and then put the issue num in the parenthesis.

TODO(<issue_number>) collate gateways objects

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with this one, but I recommend also putting the person who logged the TODO right there if we can.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I gave it a second thought, and I'm actually not sure we will need to collate the different resources that providers will generate.
Say we have 2 providers that each returned one gateway, they should not be merged into a single gateway.

So basically I think we can remove this todo altogether without opening a new issue, but please let me know if you disagree.

pkg/i2gw/ingress2gateway.go Outdated Show resolved Hide resolved
pkg/i2gw/provider.go Outdated Show resolved Hide resolved
pkg/i2gw/provider.go Outdated Show resolved Hide resolved
pkg/i2gw/providers/ingressnginx/converter.go Outdated Show resolved Hide resolved
@levikobi levikobi marked this pull request as ready for review August 17, 2023 09:02
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 17, 2023
@k8s-ci-robot k8s-ci-robot requested review from bowei and Xunzhuo August 17, 2023 09:03
@levikobi levikobi requested a review from LiorLieberman August 17, 2023 09:03
@levikobi levikobi force-pushed the conversion-refactor branch 3 times, most recently from e856338 to 52d6f90 Compare August 17, 2023 11:50
@levikobi levikobi force-pushed the conversion-refactor branch from 52d6f90 to ad83255 Compare August 17, 2023 11:52
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 17, 2023
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 17, 2023
@LiorLieberman
Copy link
Member

/label tide/merge-method-squash

@k8s-ci-robot k8s-ci-robot added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Aug 17, 2023
Copy link
Member

@LiorLieberman LiorLieberman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks very much for you hard work @levikobi !

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 17, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: levikobi, LiorLieberman

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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 17, 2023
@k8s-ci-robot k8s-ci-robot merged commit 7f0b992 into kubernetes-sigs:main Aug 17, 2023
@levikobi levikobi deleted the conversion-refactor branch November 5, 2023 06:00
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. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support multiple providers in an extensible and testable way
8 participants