{"action":"created","issue":{"url":"https://api.github.com/repos/openshift/origin/issues/9473","repository_url":"https://api.github.com/repos/openshift/origin","labels_url":"https://api.github.com/repos/openshift/origin/issues/9473/labels{/name}","comments_url":"https://api.github.com/repos/openshift/origin/issues/9473/comments","events_url":"https://api.github.com/repos/openshift/origin/issues/9473/events","html_url":"https://github.com/openshift/origin/pull/9473","id":161540940,"number":9473,"title":"[WIP] Idling and Unidling","user":{"login":"DirectXMan12","id":119737,"avatar_url":"https://avatars.githubusercontent.com/u/119737?v=3","gravatar_id":"","url":"https://api.github.com/users/DirectXMan12","html_url":"https://github.com/DirectXMan12","followers_url":"https://api.github.com/users/DirectXMan12/followers","following_url":"https://api.github.com/users/DirectXMan12/following{/other_user}","gists_url":"https://api.github.com/users/DirectXMan12/gists{/gist_id}","starred_url":"https://api.github.com/users/DirectXMan12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DirectXMan12/subscriptions","organizations_url":"https://api.github.com/users/DirectXMan12/orgs","repos_url":"https://api.github.com/users/DirectXMan12/repos","events_url":"https://api.github.com/users/DirectXMan12/events{/privacy}","received_events_url":"https://api.github.com/users/DirectXMan12/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":15,"created_at":"2016-06-21T21:13:24Z","updated_at":"2016-06-30T20:53:12Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/openshift/origin/pulls/9473","html_url":"https://github.com/openshift/origin/pull/9473","diff_url":"https://github.com/openshift/origin/pull/9473.diff","patch_url":"https://github.com/openshift/origin/pull/9473.patch"},"body":"This PR introduces idling and unidling.\r\n\r\nIdling works by scaling scalable resources currently (DCs and RCs) down to zero, and then marking endpoints objects for associated services to indicate that traffic on those services should unidle those scalable resources.\r\n\r\nThe `oc idle` command does the actual work of associating the scalables with services (using the graph API), annotating the endpoints, and scaling the services down to zero.  The command can be passed a file containing either a list of services or a list of scalables (all within the current namespace).\r\n\r\nUnidling works by creating a new kube-proxy `Proxy` implentation, the `HybridProxy`.  The `HybridProxy` listens like a normal proxy, and forks operations out to a \"normal\" proxy or a special unidling proxy.  The unidling proxy listens for TCP connections, holds those connections, and emits a `NeedPods` event (see below), passing the traffic through once the pods come up.  UDP packets trigger the same `NeedPods` event, but are subsequently dropped on the floor.\r\n\r\nThe unidling controller then listens for these events (see below), and \"wakes up\" the appropriate scalables by scaling the back to a replica count of 1.\r\n\r\n*Below*: An alternative to using events would be to use an extra annotation on the endpoints object to trigger unidling (using annotations seems slightly more in line with how Kube works than events, IMO).  Various parties have expression opinions about whether or not events or some other mechanism should be used to trigger the unidling.  I wanted to get some feedback before going an rewriting part to use another mechanism.\r\n\r\nOnce decisions are made about the annotation names, etc, this PR should be sufficient to start work on necessary UI components.\r\n\r\nFor the next PR?:\r\n- [ ] Collecting candidates for idling based on metrics (this is waiting on reviews, etc for Oldtimer in upstream Heapster)\r\n- [ ] Recording network traffic on a service-level to help make better idling decisions (this is waiting on reviews, etc for Push Metrics in upstream Heapster)\r\n- [ ] Not using events to trigger unidling\r\n\r\nTODO/Complete:\r\n- [x] Idling a provided list of services or scalables\r\n- [x] Unidling (using events)\r\n- [x] unit tests for the unidling controller\r\n- [x] retrying controller\r\n- [x] record scale and scale back to full instead of 1\r\n\r\nThanks to @knobunc for assistance with the implementation and for the in-progress work on network metrics collection."},"comment":{"url":"https://api.github.com/repos/openshift/origin/issues/comments/229785524","html_url":"https://github.com/openshift/origin/pull/9473#issuecomment-229785524","issue_url":"https://api.github.com/repos/openshift/origin/issues/9473","id":229785524,"user":{"login":"smarterclayton","id":1163175,"avatar_url":"https://avatars.githubusercontent.com/u/1163175?v=3","gravatar_id":"","url":"https://api.github.com/users/smarterclayton","html_url":"https://github.com/smarterclayton","followers_url":"https://api.github.com/users/smarterclayton/followers","following_url":"https://api.github.com/users/smarterclayton/following{/other_user}","gists_url":"https://api.github.com/users/smarterclayton/gists{/gist_id}","starred_url":"https://api.github.com/users/smarterclayton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smarterclayton/subscriptions","organizations_url":"https://api.github.com/users/smarterclayton/orgs","repos_url":"https://api.github.com/users/smarterclayton/repos","events_url":"https://api.github.com/users/smarterclayton/events{/privacy}","received_events_url":"https://api.github.com/users/smarterclayton/received_events","type":"User","site_admin":false},"created_at":"2016-06-30T20:53:12Z","updated_at":"2016-06-30T20:53:12Z","body":"Does the origin controller not use created by?  If not, please let\n@kargakis and @bparees know that they need to be setting those.\n\nOn Jun 30, 2016, at 12:36 PM, Solly Ross <notifications@github.com> wrote:\n\nOk, we now chase both the CreatedByAnnotation from Kubernetes and the\nDeploymentConfigAnnotation from origin (preferring the former when both a\npresent) up one additional level (enough to go pod->rc->dc).\n\n—\nYou are receiving this because you were mentioned.\nReply to this email directly, view it on GitHub\n<https://github.com/openshift/origin/pull/9473#issuecomment-229765498>, or mute\nthe thread\n<https://github.com/notifications/unsubscribe/ABG_pwfkZRepif_E2oN13YcEx3YMBugLks5qRBq7gaJpZM4I7Lau>\n.\n"}}
{"actor":{"display_login":"smarterclayton"}}