Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Allow for binding frontends to specific addresses #602
This is both a question and a sort of request for help.
I'm running Kubernetes on a single-node cluster (using Minikube) as a means of better orchestrating deployments, and have been trying to integrate Voyager as an ingress for both HTTP and TCP services. My use-case is fairly peculiar since I'm not running behind any kind of load-balancer, and as such am relegated to using
To give you a better picture, I segregate services by type into different namespaces, but use Voyager as a means of handling ingress traffic and terminating TLS for all services that allow communication to the outside world. A sample
apiVersion: voyager.appscode.com/v1beta1 kind: Ingress metadata: name: ingress namespace: default labels: app: voyager annotations: ingress.appscode.com/type: HostPort spec: rules: - host: deuill.org http: address: 203.0.113.101 paths: - backend: serviceName: deuill.web servicePort: 80 - host: mail.deuill.org tcp: address: 203.0.113.102 port: 25 backend: serviceName: postfix.mail servicePort: 25
What I'm essentially looking for, as alluded by specifying
I've been working on getting a patch here, for my use at least, but cannot seem to find a way of getting the values through.
So, a number of questions:
Thank you in advance!
Hi @deuill , thanks for the question. This is a feature no one has requested before. But we can support it if you have a working pr. Your pr seems ok from a quick review.
I think the address should be an array, since HAProxy can bind to multiple IPs. If the array is empty then, you can initialize it to
I have one questions regarding validation. If a port has address defined in one Ingress rule, then do all other rules using the same port must specify some address? This needs to validated and also the parser logic needs to take this into account when merging rules (currently only looks at port #). My guess is that HAProxy can't handle 2 frontend like below in same haproxy.conf:
Thank you for the quick reply and assistance, indeed allowing for multiple IPs and defaulting to a sane value in the code rather than relying on the template would work much better.
I initially went with naming the field
With regards to clashing frontend definitions, that's a very good observation and a case I did not think about. I agree that HAProxy will probably reject configuration like that, but I'll check nevertheless and see what the fix is.