{"action":"created","issue":{"url":"https://api.github.com/repos/jcmoraisjr/haproxy-ingress/issues/186","repository_url":"https://api.github.com/repos/jcmoraisjr/haproxy-ingress","labels_url":"https://api.github.com/repos/jcmoraisjr/haproxy-ingress/issues/186/labels{/name}","comments_url":"https://api.github.com/repos/jcmoraisjr/haproxy-ingress/issues/186/comments","events_url":"https://api.github.com/repos/jcmoraisjr/haproxy-ingress/issues/186/events","html_url":"https://github.com/jcmoraisjr/haproxy-ingress/issues/186","id":341159985,"node_id":"MDU6SXNzdWUzNDExNTk5ODU=","number":186,"title":"Routing tcp port traffic","user":{"login":"kblooie","id":294642,"node_id":"MDQ6VXNlcjI5NDY0Mg==","avatar_url":"https://avatars3.githubusercontent.com/u/294642?v=4","gravatar_id":"","url":"https://api.github.com/users/kblooie","html_url":"https://github.com/kblooie","followers_url":"https://api.github.com/users/kblooie/followers","following_url":"https://api.github.com/users/kblooie/following{/other_user}","gists_url":"https://api.github.com/users/kblooie/gists{/gist_id}","starred_url":"https://api.github.com/users/kblooie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kblooie/subscriptions","organizations_url":"https://api.github.com/users/kblooie/orgs","repos_url":"https://api.github.com/users/kblooie/repos","events_url":"https://api.github.com/users/kblooie/events{/privacy}","received_events_url":"https://api.github.com/users/kblooie/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-07-13T21:07:21Z","updated_at":"2018-07-16T21:51:50Z","closed_at":null,"author_association":"NONE","body":"I would like to setup ingress for both http traffic and tcp traffic routed by hostname. I've been able to route https traffic by hostname just fine. However, I'm not sure how to setup the ingress rules so that TCP traffic for the same host name on port (38888) gets routed to the service's 38888 port.\r\n\r\nIs this possible? How would I set this up?\r\n\r\nIn the example below, how do I route traffic from tcp://some.mydomain.com:38888 to some-service:38888?\r\n\r\n```apiVersion: v1\r\nkind: Service\r\nmetadata:\r\n  name: some-service\r\n  namespace: default\r\nspec:\r\n  ports:\r\n  - name: http-api\r\n    port: 8080\r\n    protocol: TCP\r\n  - name: tcp-server\r\n    port: 38888\r\n    protocol: TCP\r\n  selector:\r\n    app: some-app\r\n  type: ClusterIP\r\n---\r\napiVersion: extensions/v1beta1\r\nkind: Ingress\r\nmetadata:\r\n  annotations:\r\n    ingress.kubernetes.io/ssl-passthrough: \"true\"\r\n  name: some-ingress\r\nspec:\r\n  rules:\r\n  - host: some.mydomain.com\r\n    http:\r\n      paths:\r\n      - backend:\r\n          serviceName: some-service\r\n          servicePort: 8080\r\n        path: /\r\n```"},"comment":{"url":"https://api.github.com/repos/jcmoraisjr/haproxy-ingress/issues/comments/405393148","html_url":"https://github.com/jcmoraisjr/haproxy-ingress/issues/186#issuecomment-405393148","issue_url":"https://api.github.com/repos/jcmoraisjr/haproxy-ingress/issues/186","id":405393148,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNTM5MzE0OA==","user":{"login":"jcmoraisjr","id":1457820,"node_id":"MDQ6VXNlcjE0NTc4MjA=","avatar_url":"https://avatars3.githubusercontent.com/u/1457820?v=4","gravatar_id":"","url":"https://api.github.com/users/jcmoraisjr","html_url":"https://github.com/jcmoraisjr","followers_url":"https://api.github.com/users/jcmoraisjr/followers","following_url":"https://api.github.com/users/jcmoraisjr/following{/other_user}","gists_url":"https://api.github.com/users/jcmoraisjr/gists{/gist_id}","starred_url":"https://api.github.com/users/jcmoraisjr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcmoraisjr/subscriptions","organizations_url":"https://api.github.com/users/jcmoraisjr/orgs","repos_url":"https://api.github.com/users/jcmoraisjr/repos","events_url":"https://api.github.com/users/jcmoraisjr/events{/privacy}","received_events_url":"https://api.github.com/users/jcmoraisjr/received_events","type":"User","site_admin":false},"created_at":"2018-07-16T21:51:50Z","updated_at":"2018-07-16T21:51:50Z","author_association":"OWNER","body":"> Based on the example, it looks like I'd need a unique port number for each host.\r\n\r\nYou'll need a unique port number for each destination service.\r\n\r\n> By editing the tcp-configmap, do you bypass the need for an ingress definition?\r\n\r\nYep, tcp-configmap create the proxy without the need to create an ingress object.\r\n\r\n> Are you still able to route by host when routing TCP connections that use SSL?\r\n\r\nCurrently tcp-configmap only support L4 proxy and no hostname information is provided to loadbalance. You'll need to listen different ports for different services. SSL services will work provided that you make the offload on the backend side.\r\n\r\n> If defining multiple ports in the configmap, do you need to modify the ports available in the HAProxy deployment / daemonset?\r\n\r\nIt depends on how you configured the deployment - if you are not using host network, the port should be declared in order to kube-proxy forward incoming connections to the haproxy container.\r\n\r\nhth"}}
{"actor":{"display_login":"jcmoraisjr"}}