-
Notifications
You must be signed in to change notification settings - Fork 17
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
Update config to remove need for multiple Ingress objects #236
base: main
Are you sure you want to change the base?
Conversation
This code removes supercluster deployed Ingress and it modified the code to allow the `SimplePayment` mission to pass with a catch-all nginx proxy. Proxy config I used is: ``` server { listen 80 default_server; server_name _; resolver 10.96.0.10 ipv6=off; location ~ ^/(.+)-([0-9]+)/core$ { proxy_pass http://$1-$2.$1.stellar-supercluster.svc.cluster.local:11626/; } location ~ ^/(.+)-([0-9]+)/core/(.*)$ { proxy_pass http://$1-$2.$1.stellar-supercluster.svc.cluster.local:11626/$3$is_args$args; } location ~ ^/(.+)-([0-9]+)/history$ { proxy_pass http://$1-$2.$1.stellar-supercluster.svc.cluster.local:80/; } location ~ ^/(.+)-([0-9]+)/history/(.*)$ { proxy_pass http://$1-$2.$1.stellar-supercluster.svc.cluster.local:80/$3; } } ``` To allow me to target pods directly I had to modify serviceName in the StatefulSet
@jacekn I pushed a commit to unify service name to matching the statefulset name. However, your proxy routing rule needs to be modified to adapt to different namespaces. i.e.
Because PeerDns name follows the pattern: I've tested it with I believe this should unblock your testing now. Let me know if you need any more help. |
@jayz22 thank you! I tested things but for me it didn't fully work. First I had to update
That allowed me to build the code. However during the SimplePayment mission I noticed that statefulset called |
That is a headless service ( Also thought about deployment, I think we need to have the proxy server as part of supercluster mission (in this code base). Because this is a public project and someone else could be running their own supercluster missions in a different cluster and it needs work out of the box. |
I think it's needed, at least that my understanding. The SimplePayment mission, from what I remember will:
So when I run SSC on my laptop I believe steps 2-5 need access to the core http port |
Sure, the headless service is needed, but only for exposing the statefulset's internal DNS name. From what I understood, you are creating an proxy which routes external requests to internal services. e.g.
will be resolved to the internal service
The headless does not have an external name, so it should be irrelevant for your proxy. If it is, then there is probably something going wrong with your setup. Anyways I've pushed another change to unify the headless service name to be same as the StatefulSet. You might need to iron out some small details but as far as naming consistency goes, this should work. Here is what I observe regular service (
|
@jayz22 thank you very much, the code works great. I had to make one small adjustment to the test but other than that it worked: diff --git a/src/FSLibrary.Tests/Tests.fs b/src/FSLibrary.Tests/Tests.fs
index eae2c06..939bee5 100644
--- a/src/FSLibrary.Tests/Tests.fs
+++ b/src/FSLibrary.Tests/Tests.fs
@@ -137,7 +137,7 @@ type Tests(output: ITestOutputHelper) =
let peer1DNS = (nCfg.PeerDnsName coreSet 1).StringName
let peer2DNS = (nCfg.PeerDnsName coreSet 2).StringName
let nonceStr = nCfg.networkNonce.ToString()
- let domain = nonceStr + "-sts-core." + ctx.namespaceProperty + ".svc.cluster.local"
+ let domain = nonceStr + "-sts-test." + ctx.namespaceProperty + ".svc.cluster.local"
Assert.Equal(nonceStr + "-sts-test-0." + domain, peer0DNS)
Assert.Equal(nonceStr + "-sts-test-1." + domain, peer1DNS)
Assert.Equal(nonceStr + "-sts-test-2." + domain, peer2DNS) I also tested the code with ingress creation uncommented. It worked as well. I used the following proxy config:
|
Glad to hear! And 👍 on the ingress config change that captures the namespace properly. I'm very curious on the performance impact on the coreDNS with this change. From what I understand, your approach removes the need to keep track of ingress objects which will help the coreDNS performance during mission startup. Whereas the actual pods count remains the same which means the (steady state) hit to coreDNS for dns resolution will likely stay the same. Curious of the overall impact, I hope this at least significantly reduces the peak/startup load you observed previously. |
Wow, this looks really promising! I'm also wondering if you saw any changes in the steady-state rps (i.e. showing more range after the initial peak) or are they too small to matter. |
This code removes supercluster deployed Ingress and it modified the code to allow the
SimplePayment
mission to pass with a catch-all nginx proxy.Proxy config I used is:
To allow me to target pods directly I had to modify serviceName in the StatefulSet