{"action":"created","issue":{"url":"https://api.github.com/repos/rancher/rancher/issues/2179","labels_url":"https://api.github.com/repos/rancher/rancher/issues/2179/labels{/name}","comments_url":"https://api.github.com/repos/rancher/rancher/issues/2179/comments","events_url":"https://api.github.com/repos/rancher/rancher/issues/2179/events","html_url":"https://github.com/rancher/rancher/issues/2179","id":108932012,"number":2179,"title":"Refactor Load Balancer code","user":{"login":"alena1108","id":1562176,"avatar_url":"https://avatars.githubusercontent.com/u/1562176?v=3","gravatar_id":"","url":"https://api.github.com/users/alena1108","html_url":"https://github.com/alena1108","followers_url":"https://api.github.com/users/alena1108/followers","following_url":"https://api.github.com/users/alena1108/following{/other_user}","gists_url":"https://api.github.com/users/alena1108/gists{/gist_id}","starred_url":"https://api.github.com/users/alena1108/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alena1108/subscriptions","organizations_url":"https://api.github.com/users/alena1108/orgs","repos_url":"https://api.github.com/users/alena1108/repos","events_url":"https://api.github.com/users/alena1108/events{/privacy}","received_events_url":"https://api.github.com/users/alena1108/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rancher/rancher/labels/kind/task","name":"kind/task","color":"009800"}],"state":"open","locked":false,"assignee":{"login":"alena1108","id":1562176,"avatar_url":"https://avatars.githubusercontent.com/u/1562176?v=3","gravatar_id":"","url":"https://api.github.com/users/alena1108","html_url":"https://github.com/alena1108","followers_url":"https://api.github.com/users/alena1108/followers","following_url":"https://api.github.com/users/alena1108/following{/other_user}","gists_url":"https://api.github.com/users/alena1108/gists{/gist_id}","starred_url":"https://api.github.com/users/alena1108/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alena1108/subscriptions","organizations_url":"https://api.github.com/users/alena1108/orgs","repos_url":"https://api.github.com/users/alena1108/repos","events_url":"https://api.github.com/users/alena1108/events{/privacy}","received_events_url":"https://api.github.com/users/alena1108/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/rancher/rancher/milestones/4","html_url":"https://github.com/rancher/rancher/milestones/Release%201.0","labels_url":"https://api.github.com/repos/rancher/rancher/milestones/4/labels","id":947265,"number":4,"title":"Release 1.0","description":"1.0 GA","creator":{"login":"will-chan","id":10134676,"avatar_url":"https://avatars.githubusercontent.com/u/10134676?v=3","gravatar_id":"","url":"https://api.github.com/users/will-chan","html_url":"https://github.com/will-chan","followers_url":"https://api.github.com/users/will-chan/followers","following_url":"https://api.github.com/users/will-chan/following{/other_user}","gists_url":"https://api.github.com/users/will-chan/gists{/gist_id}","starred_url":"https://api.github.com/users/will-chan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/will-chan/subscriptions","organizations_url":"https://api.github.com/users/will-chan/orgs","repos_url":"https://api.github.com/users/will-chan/repos","events_url":"https://api.github.com/users/will-chan/events{/privacy}","received_events_url":"https://api.github.com/users/will-chan/received_events","type":"User","site_admin":false},"open_issues":150,"closed_issues":193,"state":"open","created_at":"2015-01-22T18:32:24Z","updated_at":"2016-01-13T00:35:02Z","due_on":"2016-01-29T08:00:00Z","closed_at":null},"comments":11,"created_at":"2015-09-29T18:37:42Z","updated_at":"2016-01-13T20:48:49Z","closed_at":null,"body":"This ticket is to keep track of LB refactoring work that needs to be done.\r\n\r\n- [x] Get rid of standalone Load Balancer code. Everything should be done from services perspective. \r\n- [x]  Implement a way of uploading custom haproxy config defined by the user (https://github.com/rancher/rancher/issues/2171, https://github.com/rancher/rancher/issues/1871)\r\n- [ ]  Change the way of compose representation for the LB service\r\n- [ ] Ability to add a selector with hostname routing rules for LB (https://github.com/rancher/rancher/issues/2288)\r\n- [ ] Allow to define custom parameters for haproxy backends\r\n\r\n@ibuildthecloud @will-chan "},"comment":{"url":"https://api.github.com/repos/rancher/rancher/issues/comments/171427988","html_url":"https://github.com/rancher/rancher/issues/2179#issuecomment-171427988","issue_url":"https://api.github.com/repos/rancher/rancher/issues/2179","id":171427988,"user":{"login":"schuylr","id":12628715,"avatar_url":"https://avatars.githubusercontent.com/u/12628715?v=3","gravatar_id":"","url":"https://api.github.com/users/schuylr","html_url":"https://github.com/schuylr","followers_url":"https://api.github.com/users/schuylr/followers","following_url":"https://api.github.com/users/schuylr/following{/other_user}","gists_url":"https://api.github.com/users/schuylr/gists{/gist_id}","starred_url":"https://api.github.com/users/schuylr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schuylr/subscriptions","organizations_url":"https://api.github.com/users/schuylr/orgs","repos_url":"https://api.github.com/users/schuylr/repos","events_url":"https://api.github.com/users/schuylr/events{/privacy}","received_events_url":"https://api.github.com/users/schuylr/received_events","type":"User","site_admin":false},"created_at":"2016-01-13T20:48:49Z","updated_at":"2016-01-13T20:48:49Z","body":"Thanks for following through, @alena1108 \r\n\r\nHow would we discern custom backend haproxyConfig from the server lines? For example, this is a feasible scenario:\r\n\r\n```\r\nbackend xxx\r\n    <haproxyConfig>\r\n    server foo1 <inserted defaults> <haproxyConfig>\r\n    server foo2 <inserted defaults> <haproxyConfig>\r\n    server foo3 <inserted defaults> <haproxyConfig>\r\n```\r\n\r\nTo be more specific, I need to add a `send-proxy` directive after each `server` line.\r\n\r\nWould this be expanded in the custom parameters, like such?\r\n\r\n```\r\nrouting_rules:\r\n    - service_name: foo - the rule will apply to service foo \r\n      listen_port: 80 - the rule will get tied to listen_port 80\r\n      target_port: 8080 - traffic for service foo will be forwarded to port 8080 of foo containers\r\n      host_name: app.example.com - traffic coming to host app.example.com, will be forwarded to service foo\r\n      path: /foo/bar - traffic coming to path /foo/bar, will be forwarded to service foo\r\n   SNI: true/false - whether to use SNI routing # new feautre, more to research, most likely won't make it to v1 refactoring\r\n      priority: 42 - rule order. Today Rancher determines the order based on hostname/path length, need to let user define it\r\n      haproxy_config: {\r\n        'server': 'send-proxy' # This would be auto-appended to every server line\r\n      } custom config parameters for a backend\r\n      app_cookie: cookie stickiness rules are defined on per target service basis, not globally\r\n      lb_cookie: cookie stickiness rules are defined on per target service basis, not globally\r\n"}}