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

feat(core) make service on routes optional (transparent proxying) #4286

Merged
merged 3 commits into from
Mar 11, 2019

Conversation

bungle
Copy link
Member

@bungle bungle commented Feb 6, 2019

Summary

This is first implementation of so called allow_by_default routing. E.g. routes that act as a transparent routes. Which means you don't need to create service entity, but instead you can use HTTP proxying or iptables transparent proxying rules.

@bungle bungle added the pr/discussion This PR is being debated. Probably just a few details. label Feb 6, 2019
@bungle bungle force-pushed the feat/serviceless-routes branch 2 times, most recently from bbbc13e to 7f044bd Compare February 6, 2019 19:50
@bungle bungle requested a review from james-callahan February 8, 2019 11:33
@bungle
Copy link
Member Author

bungle commented Feb 8, 2019

@james-callahan can you do a small feasability check on this? Am I on a right page, or do you see some problems? If everything is fine, I think I can move to adding tests.

kikito
kikito previously requested changes Feb 8, 2019
kong/runloop/handler.lua Outdated Show resolved Hide resolved
kong/router.lua Show resolved Hide resolved
kong/runloop/handler.lua Show resolved Hide resolved
kong/runloop/handler.lua Outdated Show resolved Hide resolved
@bungle bungle force-pushed the feat/serviceless-routes branch 2 times, most recently from 3d2d9f6 to f1f80f8 Compare February 8, 2019 12:19
Copy link
Contributor

@james-callahan james-callahan left a comment

Choose a reason for hiding this comment

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

I don't see any major issues; looks fine to me (though I haven't done a full review, just glanced)

kong/router.lua Outdated Show resolved Hide resolved
kong/runloop/handler.lua Outdated Show resolved Hide resolved
kong/runloop/handler.lua Outdated Show resolved Hide resolved
@bungle bungle force-pushed the feat/serviceless-routes branch from f1f80f8 to 236bae7 Compare February 11, 2019 10:49
kong/router.lua Outdated Show resolved Hide resolved
@bungle bungle force-pushed the feat/serviceless-routes branch 2 times, most recently from d14dd46 to 7bb0a18 Compare February 13, 2019 10:27
kong/runloop/handler.lua Outdated Show resolved Hide resolved
kong/runloop/handler.lua Show resolved Hide resolved
@bungle bungle force-pushed the feat/serviceless-routes branch 8 times, most recently from e854fc7 to 9aa28fb Compare February 14, 2019 23:07
kong/db/schema/entities/routes.lua Outdated Show resolved Hide resolved
kong/runloop/handler.lua Outdated Show resolved Hide resolved
kong/runloop/handler.lua Outdated Show resolved Hide resolved
kong/runloop/handler.lua Outdated Show resolved Hide resolved
kong/runloop/handler.lua Outdated Show resolved Hide resolved
kong/runloop/handler.lua Outdated Show resolved Hide resolved
kong/runloop/handler.lua Outdated Show resolved Hide resolved
@bungle bungle force-pushed the feat/serviceless-routes branch 7 times, most recently from 0b9dfc9 to 72ba79e Compare February 18, 2019 15:22
Copy link
Contributor

@james-callahan james-callahan left a comment

Choose a reason for hiding this comment

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

The code looks good; a few nits in tests, but they don't cause failures for now.

@bungle bungle force-pushed the feat/serviceless-routes branch 7 times, most recently from f833f45 to 7dc18a5 Compare March 11, 2019 15:51
kong/runloop/handler.lua Outdated Show resolved Hide resolved
kong/runloop/handler.lua Outdated Show resolved Hide resolved
kong/runloop/handler.lua Outdated Show resolved Hide resolved
kong/runloop/handler.lua Show resolved Hide resolved
@bungle bungle force-pushed the feat/serviceless-routes branch from 7dc18a5 to 61d2f14 Compare March 11, 2019 20:10
@bungle bungle force-pushed the feat/serviceless-routes branch from 61d2f14 to af0775f Compare March 11, 2019 20:21
@bungle bungle requested a review from thibaultcha March 11, 2019 20:21
service_scheme = uri_scheme
service_host = lower(matches[2])
end
--[[ TODO: check if these make sense here?
Copy link
Contributor

Choose a reason for hiding this comment

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

left over comment?

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 wanted to leave them here, maybe we return back to that later. I believe we need Connect for that to work, but I am not 100% sure.

@bungle bungle force-pushed the feat/serviceless-routes branch 5 times, most recently from c3fb21b to 11e7453 Compare March 11, 2019 22:48
bungle added 2 commits March 12, 2019 00:53
Make route.service optional, and when not set, route transparently
on such route.
@bungle bungle force-pushed the feat/serviceless-routes branch from 11e7453 to 6df1e40 Compare March 11, 2019 22:54
@bungle bungle dismissed stale reviews from thibaultcha and kikito March 11, 2019 23:35

changes done

@bungle bungle removed request for kikito and thibaultcha March 11, 2019 23:36
@bungle bungle merged commit 94b67b2 into next Mar 11, 2019
@bungle bungle deleted the feat/serviceless-routes branch March 11, 2019 23:40
@hishamhm hishamhm mentioned this pull request Mar 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants