{"action":"created","comment":{"url":"https://api.github.com/repos/cilium/cilium/pulls/comments/120157877","pull_request_review_id":42098313,"id":120157877,"diff_hunk":"@@ -147,6 +147,63 @@ single node Cilium deployments used for basic testing / learning, Cilium can\n use a local store implemented as a golang hash map, avoiding the need to setup\n a dedicated KV store.\n \n+******\n+Labels\n+******\n+\n+Labels are a generic, flexible and highly scaleable way of addressing a large\n+set of resources as they allow for arbitrary grouping and creation of sets.\n+Whenever something needs to be descried, addressed or selected this is done\n+based on labels:\n+\n+- Endpoints are assigned labels as derived from container runtime or the\n+  orchestration system.\n+- Network policies select endpoints based on labels and allow consumers based\n+  on labels.\n+- Network policies themselves are described and addressed by labels.\n+\n+Basic Label: Key/Value Pair\n+---------------------------\n+\n+A label is a pair of strings consisting of a ``key`` and ``value``. A label can\n+be formatted as a single string with the format ``key=value``. The key portion\n+is mandatory and must be unique. This is typically achieved by using the\n+reverse domain name notion, e.g. ``io.cilium.mykey=myvalue``. The value portion\n+is optional and can be omitted, e.g. ``io.cilium.mykey``.\n+\n+Key names should typically consist of the character set ``[a-z0-9-.]``.\n+\n+When using labels to select resources, both the key and the value must match,\n+e.g. when a policy should be applied to all endpoints will label\n+``my.corp.foo`` then the label ``my.corp.foo=value`` will not match the\n+selector.\n+\n+Label Source\n+------------\n+\n+A label can be derived from various sources. For example, a Cilium endpoint can\n+derive the labels associated to a container by the local container runtime in\n+addition to the labels associated with the pod as provided by Kubernetes. The\n+container runtime is not aware of the orchestration system which may result in\n+possibly conflicting key names.\n+\n+To resolve this potential conflict, Cilium attached a label source prefix to","path":"Documentation/architecture.rst","position":44,"original_position":44,"commit_id":"bab943fcb3aa217699f5a194e1e448f0541fceae","original_commit_id":"bab943fcb3aa217699f5a194e1e448f0541fceae","user":{"login":"tgraf","id":1417913,"avatar_url":"https://avatars2.githubusercontent.com/u/1417913?v=3","gravatar_id":"","url":"https://api.github.com/users/tgraf","html_url":"https://github.com/tgraf","followers_url":"https://api.github.com/users/tgraf/followers","following_url":"https://api.github.com/users/tgraf/following{/other_user}","gists_url":"https://api.github.com/users/tgraf/gists{/gist_id}","starred_url":"https://api.github.com/users/tgraf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgraf/subscriptions","organizations_url":"https://api.github.com/users/tgraf/orgs","repos_url":"https://api.github.com/users/tgraf/repos","events_url":"https://api.github.com/users/tgraf/events{/privacy}","received_events_url":"https://api.github.com/users/tgraf/received_events","type":"User","site_admin":false},"body":"Fixed","created_at":"2017-06-05T17:07:52Z","updated_at":"2017-06-05T17:07:52Z","html_url":"https://github.com/cilium/cilium/pull/905#discussion_r120157877","pull_request_url":"https://api.github.com/repos/cilium/cilium/pulls/905","_links":{"self":{"href":"https://api.github.com/repos/cilium/cilium/pulls/comments/120157877"},"html":{"href":"https://github.com/cilium/cilium/pull/905#discussion_r120157877"},"pull_request":{"href":"https://api.github.com/repos/cilium/cilium/pulls/905"}}},"pull_request":{"url":"https://api.github.com/repos/cilium/cilium/pulls/905","id":123900864,"html_url":"https://github.com/cilium/cilium/pull/905","diff_url":"https://github.com/cilium/cilium/pull/905.diff","patch_url":"https://github.com/cilium/cilium/pull/905.patch","issue_url":"https://api.github.com/repos/cilium/cilium/issues/905","number":905,"state":"open","locked":false,"title":"Rework label source concept","user":{"login":"tgraf","id":1417913,"avatar_url":"https://avatars2.githubusercontent.com/u/1417913?v=3","gravatar_id":"","url":"https://api.github.com/users/tgraf","html_url":"https://github.com/tgraf","followers_url":"https://api.github.com/users/tgraf/followers","following_url":"https://api.github.com/users/tgraf/following{/other_user}","gists_url":"https://api.github.com/users/tgraf/gists{/gist_id}","starred_url":"https://api.github.com/users/tgraf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgraf/subscriptions","organizations_url":"https://api.github.com/users/tgraf/orgs","repos_url":"https://api.github.com/users/tgraf/repos","events_url":"https://api.github.com/users/tgraf/events{/privacy}","received_events_url":"https://api.github.com/users/tgraf/received_events","type":"User","site_admin":false},"body":"Summary:\r\n - Consolidates `pkg/k8s` and `pkg/k8s/types`\r\n - Moves label source definitions into `pkg/labels`\r\n - Renames `cilium:` label source to `container:`\r\n - Introduces concept of a SelectLabel which defaults to `any:`\r\n - Introduces concept of a `unspec:` label source for labels with unspecified source\r\n - Add documentation around label concept and selection","created_at":"2017-06-05T01:30:31Z","updated_at":"2017-06-05T17:07:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"760a6a0631442632f14b4d48395bff4de207fa99","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":{"url":"https://api.github.com/repos/cilium/cilium/milestones/3","html_url":"https://github.com/cilium/cilium/milestone/3","labels_url":"https://api.github.com/repos/cilium/cilium/milestones/3/labels","id":2503216,"number":3,"title":"0.10","description":"","creator":{"login":"tgraf","id":1417913,"avatar_url":"https://avatars2.githubusercontent.com/u/1417913?v=3","gravatar_id":"","url":"https://api.github.com/users/tgraf","html_url":"https://github.com/tgraf","followers_url":"https://api.github.com/users/tgraf/followers","following_url":"https://api.github.com/users/tgraf/following{/other_user}","gists_url":"https://api.github.com/users/tgraf/gists{/gist_id}","starred_url":"https://api.github.com/users/tgraf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgraf/subscriptions","organizations_url":"https://api.github.com/users/tgraf/orgs","repos_url":"https://api.github.com/users/tgraf/repos","events_url":"https://api.github.com/users/tgraf/events{/privacy}","received_events_url":"https://api.github.com/users/tgraf/received_events","type":"User","site_admin":false},"open_issues":58,"closed_issues":6,"state":"open","created_at":"2017-05-05T20:50:43Z","updated_at":"2017-06-05T16:12:47Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/cilium/cilium/pulls/905/commits","review_comments_url":"https://api.github.com/repos/cilium/cilium/pulls/905/comments","review_comment_url":"https://api.github.com/repos/cilium/cilium/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cilium/cilium/issues/905/comments","statuses_url":"https://api.github.com/repos/cilium/cilium/statuses/bab943fcb3aa217699f5a194e1e448f0541fceae","head":{"label":"cilium:rework-label-source","ref":"rework-label-source","sha":"bab943fcb3aa217699f5a194e1e448f0541fceae","user":{"login":"cilium","id":21054566,"avatar_url":"https://avatars3.githubusercontent.com/u/21054566?v=3","gravatar_id":"","url":"https://api.github.com/users/cilium","html_url":"https://github.com/cilium","followers_url":"https://api.github.com/users/cilium/followers","following_url":"https://api.github.com/users/cilium/following{/other_user}","gists_url":"https://api.github.com/users/cilium/gists{/gist_id}","starred_url":"https://api.github.com/users/cilium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cilium/subscriptions","organizations_url":"https://api.github.com/users/cilium/orgs","repos_url":"https://api.github.com/users/cilium/repos","events_url":"https://api.github.com/users/cilium/events{/privacy}","received_events_url":"https://api.github.com/users/cilium/received_events","type":"Organization","site_admin":false},"repo":{"id":48109239,"name":"cilium","full_name":"cilium/cilium","owner":{"login":"cilium","id":21054566,"avatar_url":"https://avatars3.githubusercontent.com/u/21054566?v=3","gravatar_id":"","url":"https://api.github.com/users/cilium","html_url":"https://github.com/cilium","followers_url":"https://api.github.com/users/cilium/followers","following_url":"https://api.github.com/users/cilium/following{/other_user}","gists_url":"https://api.github.com/users/cilium/gists{/gist_id}","starred_url":"https://api.github.com/users/cilium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cilium/subscriptions","organizations_url":"https://api.github.com/users/cilium/orgs","repos_url":"https://api.github.com/users/cilium/repos","events_url":"https://api.github.com/users/cilium/events{/privacy}","received_events_url":"https://api.github.com/users/cilium/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cilium/cilium","description":"Linux Native, HTTP Aware Networking and Security for Containers","fork":false,"url":"https://api.github.com/repos/cilium/cilium","forks_url":"https://api.github.com/repos/cilium/cilium/forks","keys_url":"https://api.github.com/repos/cilium/cilium/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cilium/cilium/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cilium/cilium/teams","hooks_url":"https://api.github.com/repos/cilium/cilium/hooks","issue_events_url":"https://api.github.com/repos/cilium/cilium/issues/events{/number}","events_url":"https://api.github.com/repos/cilium/cilium/events","assignees_url":"https://api.github.com/repos/cilium/cilium/assignees{/user}","branches_url":"https://api.github.com/repos/cilium/cilium/branches{/branch}","tags_url":"https://api.github.com/repos/cilium/cilium/tags","blobs_url":"https://api.github.com/repos/cilium/cilium/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cilium/cilium/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cilium/cilium/git/refs{/sha}","trees_url":"https://api.github.com/repos/cilium/cilium/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cilium/cilium/statuses/{sha}","languages_url":"https://api.github.com/repos/cilium/cilium/languages","stargazers_url":"https://api.github.com/repos/cilium/cilium/stargazers","contributors_url":"https://api.github.com/repos/cilium/cilium/contributors","subscribers_url":"https://api.github.com/repos/cilium/cilium/subscribers","subscription_url":"https://api.github.com/repos/cilium/cilium/subscription","commits_url":"https://api.github.com/repos/cilium/cilium/commits{/sha}","git_commits_url":"https://api.github.com/repos/cilium/cilium/git/commits{/sha}","comments_url":"https://api.github.com/repos/cilium/cilium/comments{/number}","issue_comment_url":"https://api.github.com/repos/cilium/cilium/issues/comments{/number}","contents_url":"https://api.github.com/repos/cilium/cilium/contents/{+path}","compare_url":"https://api.github.com/repos/cilium/cilium/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cilium/cilium/merges","archive_url":"https://api.github.com/repos/cilium/cilium/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cilium/cilium/downloads","issues_url":"https://api.github.com/repos/cilium/cilium/issues{/number}","pulls_url":"https://api.github.com/repos/cilium/cilium/pulls{/number}","milestones_url":"https://api.github.com/repos/cilium/cilium/milestones{/number}","notifications_url":"https://api.github.com/repos/cilium/cilium/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cilium/cilium/labels{/name}","releases_url":"https://api.github.com/repos/cilium/cilium/releases{/id}","deployments_url":"https://api.github.com/repos/cilium/cilium/deployments","created_at":"2015-12-16T12:33:31Z","updated_at":"2017-06-05T11:34:29Z","pushed_at":"2017-06-05T17:03:18Z","git_url":"git://github.com/cilium/cilium.git","ssh_url":"git@github.com:cilium/cilium.git","clone_url":"https://github.com/cilium/cilium.git","svn_url":"https://github.com/cilium/cilium","homepage":"","size":28926,"stargazers_count":611,"watchers_count":611,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":74,"mirror_url":null,"open_issues_count":111,"forks":74,"open_issues":111,"watchers":611,"default_branch":"master"}},"base":{"label":"cilium:master","ref":"master","sha":"4a1a1f27f3505de361aac9a3b2c2f74c210a6086","user":{"login":"cilium","id":21054566,"avatar_url":"https://avatars3.githubusercontent.com/u/21054566?v=3","gravatar_id":"","url":"https://api.github.com/users/cilium","html_url":"https://github.com/cilium","followers_url":"https://api.github.com/users/cilium/followers","following_url":"https://api.github.com/users/cilium/following{/other_user}","gists_url":"https://api.github.com/users/cilium/gists{/gist_id}","starred_url":"https://api.github.com/users/cilium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cilium/subscriptions","organizations_url":"https://api.github.com/users/cilium/orgs","repos_url":"https://api.github.com/users/cilium/repos","events_url":"https://api.github.com/users/cilium/events{/privacy}","received_events_url":"https://api.github.com/users/cilium/received_events","type":"Organization","site_admin":false},"repo":{"id":48109239,"name":"cilium","full_name":"cilium/cilium","owner":{"login":"cilium","id":21054566,"avatar_url":"https://avatars3.githubusercontent.com/u/21054566?v=3","gravatar_id":"","url":"https://api.github.com/users/cilium","html_url":"https://github.com/cilium","followers_url":"https://api.github.com/users/cilium/followers","following_url":"https://api.github.com/users/cilium/following{/other_user}","gists_url":"https://api.github.com/users/cilium/gists{/gist_id}","starred_url":"https://api.github.com/users/cilium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cilium/subscriptions","organizations_url":"https://api.github.com/users/cilium/orgs","repos_url":"https://api.github.com/users/cilium/repos","events_url":"https://api.github.com/users/cilium/events{/privacy}","received_events_url":"https://api.github.com/users/cilium/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cilium/cilium","description":"Linux Native, HTTP Aware Networking and Security for Containers","fork":false,"url":"https://api.github.com/repos/cilium/cilium","forks_url":"https://api.github.com/repos/cilium/cilium/forks","keys_url":"https://api.github.com/repos/cilium/cilium/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cilium/cilium/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cilium/cilium/teams","hooks_url":"https://api.github.com/repos/cilium/cilium/hooks","issue_events_url":"https://api.github.com/repos/cilium/cilium/issues/events{/number}","events_url":"https://api.github.com/repos/cilium/cilium/events","assignees_url":"https://api.github.com/repos/cilium/cilium/assignees{/user}","branches_url":"https://api.github.com/repos/cilium/cilium/branches{/branch}","tags_url":"https://api.github.com/repos/cilium/cilium/tags","blobs_url":"https://api.github.com/repos/cilium/cilium/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cilium/cilium/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cilium/cilium/git/refs{/sha}","trees_url":"https://api.github.com/repos/cilium/cilium/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cilium/cilium/statuses/{sha}","languages_url":"https://api.github.com/repos/cilium/cilium/languages","stargazers_url":"https://api.github.com/repos/cilium/cilium/stargazers","contributors_url":"https://api.github.com/repos/cilium/cilium/contributors","subscribers_url":"https://api.github.com/repos/cilium/cilium/subscribers","subscription_url":"https://api.github.com/repos/cilium/cilium/subscription","commits_url":"https://api.github.com/repos/cilium/cilium/commits{/sha}","git_commits_url":"https://api.github.com/repos/cilium/cilium/git/commits{/sha}","comments_url":"https://api.github.com/repos/cilium/cilium/comments{/number}","issue_comment_url":"https://api.github.com/repos/cilium/cilium/issues/comments{/number}","contents_url":"https://api.github.com/repos/cilium/cilium/contents/{+path}","compare_url":"https://api.github.com/repos/cilium/cilium/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cilium/cilium/merges","archive_url":"https://api.github.com/repos/cilium/cilium/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cilium/cilium/downloads","issues_url":"https://api.github.com/repos/cilium/cilium/issues{/number}","pulls_url":"https://api.github.com/repos/cilium/cilium/pulls{/number}","milestones_url":"https://api.github.com/repos/cilium/cilium/milestones{/number}","notifications_url":"https://api.github.com/repos/cilium/cilium/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cilium/cilium/labels{/name}","releases_url":"https://api.github.com/repos/cilium/cilium/releases{/id}","deployments_url":"https://api.github.com/repos/cilium/cilium/deployments","created_at":"2015-12-16T12:33:31Z","updated_at":"2017-06-05T11:34:29Z","pushed_at":"2017-06-05T17:03:18Z","git_url":"git://github.com/cilium/cilium.git","ssh_url":"git@github.com:cilium/cilium.git","clone_url":"https://github.com/cilium/cilium.git","svn_url":"https://github.com/cilium/cilium","homepage":"","size":28926,"stargazers_count":611,"watchers_count":611,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":74,"mirror_url":null,"open_issues_count":111,"forks":74,"open_issues":111,"watchers":611,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cilium/cilium/pulls/905"},"html":{"href":"https://github.com/cilium/cilium/pull/905"},"issue":{"href":"https://api.github.com/repos/cilium/cilium/issues/905"},"comments":{"href":"https://api.github.com/repos/cilium/cilium/issues/905/comments"},"review_comments":{"href":"https://api.github.com/repos/cilium/cilium/pulls/905/comments"},"review_comment":{"href":"https://api.github.com/repos/cilium/cilium/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cilium/cilium/pulls/905/commits"},"statuses":{"href":"https://api.github.com/repos/cilium/cilium/statuses/bab943fcb3aa217699f5a194e1e448f0541fceae"}}}}
{"actor":{"display_login":"tgraf"}}