{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/33425552","id":33425552,"diff_hunk":"@@ -0,0 +1,151 @@\n+# Daemon Controller in Kubernetes\n+\n+**Author**: Ananya Kumar (@AnanyaKumar)\n+\n+**Status**: Draft proposal; prototype in progress.\n+\n+This document presents the design of a daemon controller for Kubernetes, outlines relevant Kubernetes concepts, describes use cases, and lays out milestones for its development.\n+\n+## Motivation\n+\n+In Kubernetes, a Replication Controller ensures that the specified number of a specified pod are running in the cluster at all times (pods are restarted if they are killed). With the Replication Controller, users cannot control which nodes their pods run on - Kubernetes decides how to schedule the pods onto nodes. However, many users want control over how certain pods are scheduled. In particular, many users have requested for a way to run a daemon on every node in the cluster, or on a certain set of nodes in the cluster. This is essential for use cases such as building a sharded datastore, or running a logger on every node. In comes the daemon controller, a way to conveniently create and manage daemon-like workloads in Kubernetes.  \n+\n+## Use Cases\n+\n+The daemon controller can be used for user-specified system services, cluster level applications with strong node ties, and Kubernetes node services. Below are example use cases in each category.\n+\n+### User-Specified System Services:\n+Logging: Some users want a way to collect statistics about nodes in a cluster and send those logs to an external database. For example, system administrators might want to know if their machines are performing as expected, if they need to add more machines to the cluster, or if they should switch cloud providers. The daemon controller can be used to run a data collection service (for example fluentd) and send the data to a service like ElasticSearch for analysis.\n+\n+### Cluster-Level Applications\n+Datastore: Users might want to implement a sharded datastore in their cluster. A few nodes in the cluster, labeled ‘datastore’, might be responsible for storing data shards, and pods running on these nodes might serve data. This architecture requires a way to bind pods to specific nodes, so it cannot be achieved using a Replication Controller. A daemon controller is a convenient way to implement such a datastore. At Google, D is an example of such an application.\n+\n+For other uses, see the related [feature request](https://github.com/GoogleCloudPlatform/kubernetes/issues/1518)\n+\n+## Functionality\n+\n+The Daemon Controller will support standard API features:\n+- create\n+  - The spec for daemon controllers will have a pod template field.  Note that daemon controllers will not have a nodename field.\n+  - Using the pod’s node selector field, Daemon controllers can be restricted to operate over nodes that have a certain label. For example, suppose that in a cluster some nodes are labeled ‘database’. You can use a daemon controller to launch a datastore pod on exactly those nodes labeled ‘database’.\n+  - The spec for pod templates that run with the Daemon Controller is the same as the spec for pod templates that run with the Replication Controller, except there will not be a ‘replicas’ field (exactly 1 daemon will be launched per node).\n+  - We will not guarantee that daemon pods show up on nodes before regular pods - run ordering is out of scope for this controller","path":"docs/proposals/daemon-controller.md","position":32,"original_position":32,"commit_id":"e495dad61a4fbf283d22eee5baa2bf68c258eedc","original_commit_id":"36a97c071860a90caa4f30ef497f447788309074","user":{"login":"bprashanth","id":10927820,"avatar_url":"https://avatars.githubusercontent.com/u/10927820?v=3","gravatar_id":"","url":"https://api.github.com/users/bprashanth","html_url":"https://github.com/bprashanth","followers_url":"https://api.github.com/users/bprashanth/followers","following_url":"https://api.github.com/users/bprashanth/following{/other_user}","gists_url":"https://api.github.com/users/bprashanth/gists{/gist_id}","starred_url":"https://api.github.com/users/bprashanth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bprashanth/subscriptions","organizations_url":"https://api.github.com/users/bprashanth/orgs","repos_url":"https://api.github.com/users/bprashanth/repos","events_url":"https://api.github.com/users/bprashanth/events{/privacy}","received_events_url":"https://api.github.com/users/bprashanth/received_events","type":"User","site_admin":false},"body":"In the long term I think we should guarantee order (maybe not between daemons but something like user pods will run only after daemons are started). Normal init systems do.","created_at":"2015-06-28T18:42:21Z","updated_at":"2015-06-28T18:42:21Z","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/10210#discussion_r33425552","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/10210","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/33425552"},"html":{"href":"https://github.com/GoogleCloudPlatform/kubernetes/pull/10210#discussion_r33425552"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/10210"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/10210","id":38303423,"html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/10210","diff_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/10210.diff","patch_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/10210.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/10210","number":10210,"state":"open","locked":false,"title":"Initial Daemon controller proposal","user":{"login":"rjnagal","id":5420489,"avatar_url":"https://avatars.githubusercontent.com/u/5420489?v=3","gravatar_id":"","url":"https://api.github.com/users/rjnagal","html_url":"https://github.com/rjnagal","followers_url":"https://api.github.com/users/rjnagal/followers","following_url":"https://api.github.com/users/rjnagal/following{/other_user}","gists_url":"https://api.github.com/users/rjnagal/gists{/gist_id}","starred_url":"https://api.github.com/users/rjnagal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rjnagal/subscriptions","organizations_url":"https://api.github.com/users/rjnagal/orgs","repos_url":"https://api.github.com/users/rjnagal/repos","events_url":"https://api.github.com/users/rjnagal/events{/privacy}","received_events_url":"https://api.github.com/users/rjnagal/received_events","type":"User","site_admin":false},"body":"Transcribing Daemon controller proposal from @ananyakumar","created_at":"2015-06-23T05:59:54Z","updated_at":"2015-06-28T18:42:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"43c84eeb2c73b3ae00eb911450590c510da5f692","assignee":{"login":"bgrant0607","id":7725777,"avatar_url":"https://avatars.githubusercontent.com/u/7725777?v=3","gravatar_id":"","url":"https://api.github.com/users/bgrant0607","html_url":"https://github.com/bgrant0607","followers_url":"https://api.github.com/users/bgrant0607/followers","following_url":"https://api.github.com/users/bgrant0607/following{/other_user}","gists_url":"https://api.github.com/users/bgrant0607/gists{/gist_id}","starred_url":"https://api.github.com/users/bgrant0607/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgrant0607/subscriptions","organizations_url":"https://api.github.com/users/bgrant0607/orgs","repos_url":"https://api.github.com/users/bgrant0607/repos","events_url":"https://api.github.com/users/bgrant0607/events{/privacy}","received_events_url":"https://api.github.com/users/bgrant0607/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/10210/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/10210/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/10210/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/e495dad61a4fbf283d22eee5baa2bf68c258eedc","head":{"label":"rjnagal:ux","ref":"ux","sha":"e495dad61a4fbf283d22eee5baa2bf68c258eedc","user":{"login":"rjnagal","id":5420489,"avatar_url":"https://avatars.githubusercontent.com/u/5420489?v=3","gravatar_id":"","url":"https://api.github.com/users/rjnagal","html_url":"https://github.com/rjnagal","followers_url":"https://api.github.com/users/rjnagal/followers","following_url":"https://api.github.com/users/rjnagal/following{/other_user}","gists_url":"https://api.github.com/users/rjnagal/gists{/gist_id}","starred_url":"https://api.github.com/users/rjnagal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rjnagal/subscriptions","organizations_url":"https://api.github.com/users/rjnagal/orgs","repos_url":"https://api.github.com/users/rjnagal/repos","events_url":"https://api.github.com/users/rjnagal/events{/privacy}","received_events_url":"https://api.github.com/users/rjnagal/received_events","type":"User","site_admin":false},"repo":{"id":26456544,"name":"kubernetes","full_name":"rjnagal/kubernetes","owner":{"login":"rjnagal","id":5420489,"avatar_url":"https://avatars.githubusercontent.com/u/5420489?v=3","gravatar_id":"","url":"https://api.github.com/users/rjnagal","html_url":"https://github.com/rjnagal","followers_url":"https://api.github.com/users/rjnagal/followers","following_url":"https://api.github.com/users/rjnagal/following{/other_user}","gists_url":"https://api.github.com/users/rjnagal/gists{/gist_id}","starred_url":"https://api.github.com/users/rjnagal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rjnagal/subscriptions","organizations_url":"https://api.github.com/users/rjnagal/orgs","repos_url":"https://api.github.com/users/rjnagal/repos","events_url":"https://api.github.com/users/rjnagal/events{/privacy}","received_events_url":"https://api.github.com/users/rjnagal/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rjnagal/kubernetes","description":"Container Cluster Manager","fork":true,"url":"https://api.github.com/repos/rjnagal/kubernetes","forks_url":"https://api.github.com/repos/rjnagal/kubernetes/forks","keys_url":"https://api.github.com/repos/rjnagal/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rjnagal/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rjnagal/kubernetes/teams","hooks_url":"https://api.github.com/repos/rjnagal/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/rjnagal/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/rjnagal/kubernetes/events","assignees_url":"https://api.github.com/repos/rjnagal/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/rjnagal/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/rjnagal/kubernetes/tags","blobs_url":"https://api.github.com/repos/rjnagal/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rjnagal/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rjnagal/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/rjnagal/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rjnagal/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/rjnagal/kubernetes/languages","stargazers_url":"https://api.github.com/repos/rjnagal/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/rjnagal/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/rjnagal/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/rjnagal/kubernetes/subscription","commits_url":"https://api.github.com/repos/rjnagal/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/rjnagal/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/rjnagal/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/rjnagal/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/rjnagal/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/rjnagal/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rjnagal/kubernetes/merges","archive_url":"https://api.github.com/repos/rjnagal/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rjnagal/kubernetes/downloads","issues_url":"https://api.github.com/repos/rjnagal/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/rjnagal/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/rjnagal/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/rjnagal/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rjnagal/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/rjnagal/kubernetes/releases{/id}","created_at":"2014-11-10T21:26:36Z","updated_at":"2015-01-07T07:19:38Z","pushed_at":"2015-06-25T05:30:34Z","git_url":"git://github.com/rjnagal/kubernetes.git","ssh_url":"git@github.com:rjnagal/kubernetes.git","clone_url":"https://github.com/rjnagal/kubernetes.git","svn_url":"https://github.com/rjnagal/kubernetes","homepage":null,"size":88522,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"GoogleCloudPlatform:master","ref":"master","sha":"2803b86a42bf187afa816a7ce14fec754cc2af51","user":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":20580498,"name":"kubernetes","full_name":"GoogleCloudPlatform/kubernetes","owner":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleCloudPlatform/kubernetes","description":"Container Cluster Manager from Google","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/releases{/id}","created_at":"2014-06-06T22:56:04Z","updated_at":"2015-06-28T16:13:18Z","pushed_at":"2015-06-28T16:21:45Z","git_url":"git://github.com/GoogleCloudPlatform/kubernetes.git","ssh_url":"git@github.com:GoogleCloudPlatform/kubernetes.git","clone_url":"https://github.com/GoogleCloudPlatform/kubernetes.git","svn_url":"https://github.com/GoogleCloudPlatform/kubernetes","homepage":"http://kubernetes.io","size":303705,"stargazers_count":8644,"watchers_count":8644,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1892,"mirror_url":null,"open_issues_count":1490,"forks":1892,"open_issues":1490,"watchers":8644,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/10210"},"html":{"href":"https://github.com/GoogleCloudPlatform/kubernetes/pull/10210"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/10210"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/10210/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/10210/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/10210/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/e495dad61a4fbf283d22eee5baa2bf68c258eedc"}}}}