{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/6520","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/6520/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/6520/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/6520/events","html_url":"https://github.com/kubernetes/kubernetes/pull/6520","id":66942906,"number":6520,"title":"Controller Plugin framework","user":{"login":"markturansky","id":8001968,"avatar_url":"https://avatars.githubusercontent.com/u/8001968?v=3","gravatar_id":"","url":"https://api.github.com/users/markturansky","html_url":"https://github.com/markturansky","followers_url":"https://api.github.com/users/markturansky/followers","following_url":"https://api.github.com/users/markturansky/following{/other_user}","gists_url":"https://api.github.com/users/markturansky/gists{/gist_id}","starred_url":"https://api.github.com/users/markturansky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markturansky/subscriptions","organizations_url":"https://api.github.com/users/markturansky/orgs","repos_url":"https://api.github.com/users/markturansky/repos","events_url":"https://api.github.com/users/markturansky/events{/privacy}","received_events_url":"https://api.github.com/users/markturansky/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/cla:%20yes","name":"cla: yes","color":"bfe5bf"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/needs-rebase","name":"needs-rebase","color":"BDBDBD"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/size/XL","name":"size/XL","color":"ee5500"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/team/cluster","name":"team/cluster","color":"d2b48c"}],"state":"open","locked":false,"assignee":{"login":"thockin","id":5595220,"avatar_url":"https://avatars.githubusercontent.com/u/5595220?v=3","gravatar_id":"","url":"https://api.github.com/users/thockin","html_url":"https://github.com/thockin","followers_url":"https://api.github.com/users/thockin/followers","following_url":"https://api.github.com/users/thockin/following{/other_user}","gists_url":"https://api.github.com/users/thockin/gists{/gist_id}","starred_url":"https://api.github.com/users/thockin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thockin/subscriptions","organizations_url":"https://api.github.com/users/thockin/orgs","repos_url":"https://api.github.com/users/thockin/repos","events_url":"https://api.github.com/users/thockin/events{/privacy}","received_events_url":"https://api.github.com/users/thockin/received_events","type":"User","site_admin":false},"milestone":null,"comments":47,"created_at":"2015-04-07T17:24:00Z","updated_at":"2015-12-03T15:22:54Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/6520","html_url":"https://github.com/kubernetes/kubernetes/pull/6520","diff_url":"https://github.com/kubernetes/kubernetes/pull/6520.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/6520.patch"},"body":"This is a sketch for discussion.  I'm curious to know if this is a desirable direction for kube-controller-manager.\r\n\r\nGoals:\r\n\r\n1.  Change controllers into plugins.  Each is similar in implementation.  Make a framework to run many plugins in kube-controller-manager.  Plugin arch copied from VolumePlugin and NetworkPlugin.\r\n2.  Be ready to support @lavalamp's Controller Framework (#5270)\r\n3.  Port 1 controller (i used EndpointsController) as an example.\r\n4.  Future enhancements:\r\n  1. Potentially change kube-controller-manager into a server to allow queries into its status.  The manager can query each of its controllers and report back on each of them.\r\n  2. Allow graceful shutdown of all controllers via stop channels (Smith's Controller Framework has a similar stop mechanism)\r\n  3. Allow set/override default sync values (defaults set by plugins, override by CLI flags)\r\n  4. Refactor CLI sync flags to allow plugin to add these somehow, as opposed to explicitly adding each.\r\n\r\nOptional:  Potentially rename all controllers to something akin to \"*Manager\" or \"*Synchronizer\" to differentiate a process from a kind.  Example:  PersistentVolumeManager is the sync loop.  PersistentVolumeController is a proposed Kind in the API that makes new PVs.\r\n\r\nGenesis: I wrote a controller in which I thought I needed to reconcile 2 objects and didn't like the duplication required.  It wasn't hard to genericize, after which I thought I'd take a shot at making all controllers work similarly.  Porting endpoints_controller was very easy to do.  \r\n\r\n@thockin @bgrant0607 "},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/161673604","html_url":"https://github.com/kubernetes/kubernetes/pull/6520#issuecomment-161673604","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/6520","id":161673604,"user":{"login":"markturansky","id":8001968,"avatar_url":"https://avatars.githubusercontent.com/u/8001968?v=3","gravatar_id":"","url":"https://api.github.com/users/markturansky","html_url":"https://github.com/markturansky","followers_url":"https://api.github.com/users/markturansky/followers","following_url":"https://api.github.com/users/markturansky/following{/other_user}","gists_url":"https://api.github.com/users/markturansky/gists{/gist_id}","starred_url":"https://api.github.com/users/markturansky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markturansky/subscriptions","organizations_url":"https://api.github.com/users/markturansky/orgs","repos_url":"https://api.github.com/users/markturansky/repos","events_url":"https://api.github.com/users/markturansky/events{/privacy}","received_events_url":"https://api.github.com/users/markturansky/received_events","type":"User","site_admin":false},"created_at":"2015-12-03T15:22:54Z","updated_at":"2015-12-03T15:22:54Z","body":"@lavalamp @thockin Is there any appetite for this?  The feedback was lukewarm to begin with.\r\n\r\nAt the very least, this PR seems low priority.  Close and re-open in the future if there's a need/desire? Add all the suggested feedback and push it through?"}}