{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/15089","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/15089/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/15089/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/15089/events","html_url":"https://github.com/kubernetes/kubernetes/issues/15089","id":109849558,"number":15089,"title":"Leverage docker labels to construct container statuses without consulting pod spec ","user":{"login":"yujuhong","id":10524058,"avatar_url":"https://avatars.githubusercontent.com/u/10524058?v=3","gravatar_id":"","url":"https://api.github.com/users/yujuhong","html_url":"https://github.com/yujuhong","followers_url":"https://api.github.com/users/yujuhong/followers","following_url":"https://api.github.com/users/yujuhong/following{/other_user}","gists_url":"https://api.github.com/users/yujuhong/gists{/gist_id}","starred_url":"https://api.github.com/users/yujuhong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yujuhong/subscriptions","organizations_url":"https://api.github.com/users/yujuhong/orgs","repos_url":"https://api.github.com/users/yujuhong/repos","events_url":"https://api.github.com/users/yujuhong/events{/privacy}","received_events_url":"https://api.github.com/users/yujuhong/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/kind/enhancement","name":"kind/enhancement","color":"c7def8"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/priority/P2","name":"priority/P2","color":"fbca04"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/team/node","name":"team/node","color":"d2b48c"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/kubernetes/kubernetes/milestones/16","html_url":"https://github.com/kubernetes/kubernetes/milestones/v1.2-candidate","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/milestones/16/labels","id":1278500,"number":16,"title":"v1.2-candidate","description":"Things to consider for next minor release.","creator":{"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},"open_issues":112,"closed_issues":3,"state":"open","created_at":"2015-08-29T03:54:34Z","updated_at":"2015-10-09T23:09:48Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2015-10-05T17:47:03Z","updated_at":"2015-10-10T00:14:10Z","closed_at":null,"body":"Kubelet reconciles the difference between the pod status and the desired pod specs. When generating status for a pod (`GetPodStatus`), kubelet relies on several pieces of information from the apiserver:\r\n - PodSpec:\r\n     * container name\r\n     * termination message path\r\n - PodStatus:\r\n     * container restart count\r\n\r\n(*edit: this list may be incomplete*)\r\n\r\nWe can eliminate this dependency by writing the information as docker labels onto the container. The benefits of doing so include 1) kubelet can populate and maintain a container/pod status cache, representing what's running on the node, regardless of whether it has access to the pod spec yet or not; 2) this should simplify a lot of logic in pod spec.\r\n(Note that `rkt` doesn't have this dependency as it writes relevant bits in the systemd unit file)  \r\n\r\nAlternatively, kubelet can store a checkpoint of pods assigned to itself, and load the checkpoint when kubelet restarts. We may need to do this eventually, but in the meantime, docker labels seem like a good idea.\r\n\r\nThe original docker label issue: #3764\r\n\r\n@kubernetes/goog-node, WDYT?"},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/147014853","html_url":"https://github.com/kubernetes/kubernetes/issues/15089#issuecomment-147014853","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/15089","id":147014853,"user":{"login":"yifan-gu","id":3278588,"avatar_url":"https://avatars.githubusercontent.com/u/3278588?v=3","gravatar_id":"","url":"https://api.github.com/users/yifan-gu","html_url":"https://github.com/yifan-gu","followers_url":"https://api.github.com/users/yifan-gu/followers","following_url":"https://api.github.com/users/yifan-gu/following{/other_user}","gists_url":"https://api.github.com/users/yifan-gu/gists{/gist_id}","starred_url":"https://api.github.com/users/yifan-gu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yifan-gu/subscriptions","organizations_url":"https://api.github.com/users/yifan-gu/orgs","repos_url":"https://api.github.com/users/yifan-gu/repos","events_url":"https://api.github.com/users/yifan-gu/events{/privacy}","received_events_url":"https://api.github.com/users/yifan-gu/received_events","type":"User","site_admin":false},"created_at":"2015-10-10T00:14:10Z","updated_at":"2015-10-10T00:14:10Z","body":"sgtm. FWIW, appc has similar concept called [annotations]https://github.com/appc/spec/blob/master/spec/pods.md Once we have apis to read them from rkt, we don't have to store everything in service files."}}