-
Notifications
You must be signed in to change notification settings - Fork 98
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
Support multiple gateways #599
Conversation
ssl_certificate {{ $s.SSL.Certificate }}; | ||
ssl_certificate_key {{ $s.SSL.CertificateKey }}; | ||
|
||
if ($ssl_server_name != $host) { | ||
return 421; | ||
} | ||
{{ else }} | ||
listen {{ $s.Port }}; |
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.
Why add the else block here?
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.
before, for non-SSL servers, NKG didn't generate any listen directive. For that case, NGINX uses the default listen *:80
.
in this PR, we start using different ports (different than 80 and 443), so omitting the listen directive non-SSL no longer works, so that's why I added an explicit listen
directive here.
@pleshakov creative approach to handling multiple gateways. I'm not sure it's worth the effort and additional complexity to add this for testing purposes only. However, if there's a strong use case for supporting multiple gateways outside of testing, I think this solution is worth exploring. |
I definitely would not do something for testing and exercise it on a regular basis and not claim it as being supported. Unless it is a total hack or something is manipulated outside of the system processes itself (such as some test script injects some tweak outside of using the API as an example) |
@brianehlert good to know. I think the question, then, is whether we want to support multiple gateways. Is there a use case for it when we only have one data plane? |
I think it all depends on perspective. But the immediate answer is 'we don't yet know' |
closing this draft PR. support for multiple Gateways will be implemented in #634 |
This is a prototype to support multiple Gateways via single a NKG deployment primarily done to unblock running conformance tests. See #305
Note: This is a prototype where number one priority was to get things done and prove the idea. So little thinking was devoted to the design, etc.
This PR:
What is needed to merge to main:
tests
folder, add documentation.After merging to main:
How to run it locally:
(1) Build NKG image:
(2) Build tester image
(3) Create cluster
(4) Load NKG image to Kind cluster:
(5) Install NKG:
(6) Double check NGK is running:
(7) Run tests:
Note: the only test we can pass now is GatewayObservedGenerationBump (maybe a few more - my search was not too thorough), so in
conformance_test.go
it is the only one enabled , the rest is skipped.Below are the Gateways that were created during the test run. Note that the NKG reported their IP addresses, which are ClusterIPs of the corresponding provisioned (by NKG) Services: