{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/7846","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/7846/labels{/name}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/7846/comments","events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/7846/events","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/issues/7846","id":73686296,"number":7846,"title":"Proposal: configurable proxyPort for kube-proxy","user":{"login":"jdef","id":2348332,"avatar_url":"https://avatars.githubusercontent.com/u/2348332?v=3","gravatar_id":"","url":"https://api.github.com/users/jdef","html_url":"https://github.com/jdef","followers_url":"https://api.github.com/users/jdef/followers","following_url":"https://api.github.com/users/jdef/following{/other_user}","gists_url":"https://api.github.com/users/jdef/gists{/gist_id}","starred_url":"https://api.github.com/users/jdef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdef/subscriptions","organizations_url":"https://api.github.com/users/jdef/orgs","repos_url":"https://api.github.com/users/jdef/repos","events_url":"https://api.github.com/users/jdef/events{/privacy}","received_events_url":"https://api.github.com/users/jdef/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels/priority/P2","name":"priority/P2","color":"fbca04"},{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels/team/cluster","name":"team/cluster","color":"d2b48c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-05-06T17:34:58Z","updated_at":"2015-05-07T20:43:44Z","closed_at":null,"body":"Currently the addServiceOnPort invocation specifies a random port.\r\n\r\nhttps://github.com/GoogleCloudPlatform/kubernetes/blob/release-0.16/pkg/proxy/proxier.go#L431\r\n\r\nWhen running on Mesos we need to account for all server (listening) ports. I'd like to propose a PortAllocator interface that we can leverage for this purpose:\r\n```go\r\ninterface PortAllocator {\r\n  AllocateNext() (int, error)\r\n  Release(int)\r\n}\r\n```\r\nA default implementation for allocating a `proxyPort` would simply have AllocateNext() always return 0 and Release() as a noop, maintaining current behavior. A range-based implementation would be configured with one or more port ranges and allocate from those. This would be configurable via kube-proxy flag.\r\n\r\nIt looks like someone has already started down the path of port allocation, albeit for portals.\r\nhttps://github.com/GoogleCloudPlatform/kubernetes/pull/6684"},"comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/comments/100013033","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/issues/7846#issuecomment-100013033","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/7846","id":100013033,"user":{"login":"jdef","id":2348332,"avatar_url":"https://avatars.githubusercontent.com/u/2348332?v=3","gravatar_id":"","url":"https://api.github.com/users/jdef","html_url":"https://github.com/jdef","followers_url":"https://api.github.com/users/jdef/followers","following_url":"https://api.github.com/users/jdef/following{/other_user}","gists_url":"https://api.github.com/users/jdef/gists{/gist_id}","starred_url":"https://api.github.com/users/jdef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdef/subscriptions","organizations_url":"https://api.github.com/users/jdef/orgs","repos_url":"https://api.github.com/users/jdef/repos","events_url":"https://api.github.com/users/jdef/events{/privacy}","received_events_url":"https://api.github.com/users/jdef/received_events","type":"User","site_admin":false},"created_at":"2015-05-07T20:43:43Z","updated_at":"2015-05-07T20:43:43Z","body":"We want this for ports that the proxy will listen on because that consumes\nhost port resources.\nThe k8s-mesos integration is already handling accounting for pod host\nports, allocating them from mesos resource offers. The next biggest\n\"abuser\" (allocating ports outside of resource offers) is the proxy.\n\nAlso, we can we label this \"mesos\" (port allocation is not mesos specific\nconcept, but we sure do want this).\n\n\nOn Wed, May 6, 2015 at 6:51 PM, Tim Hockin <notifications@github.com> wrote:\n\n> You want this for all ports or just public ports? The problem, of course,\n> is that once you do anything but \"dear kernel, please choose for me\" you\n> risk conflicts with any pod host ports that might be chosen\n>\n> On Wed, May 6, 2015 at 10:35 AM, James DeFelice <notifications@github.com>\n> wrote:\n>\n> > xref mesosphere/kubernetes-mesos#257\n> > <https://github.com/mesosphere/kubernetes-mesos/issues/257>\n> >\n> > —\n> > Reply to this email directly or view it on GitHub\n> > <\n> https://github.com/GoogleCloudPlatform/kubernetes/issues/7846#issuecomment-99546020\n> >\n> > .\n> >\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/GoogleCloudPlatform/kubernetes/issues/7846#issuecomment-99634583>\n> .\n>\n\n\n\n-- \nJames DeFelice\n585.241.9488 (voice)\n650.649.6071 (fax)\n"}}