{"action":"created","comment":{"url":"https://api.github.com/repos/coredns/coredns/pulls/comments/224133120","pull_request_review_id":163427139,"id":224133120,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNDEzMzEyMA==","diff_hunk":"@@ -399,27 +381,27 @@ func (dns *dnsControl) SvcIndexReverse(ip string) (svcs []*object.Service) {\n \t\tif !ok {\n \t\t\tcontinue\n \t\t}\n-\t\tsvcs = append(svcs, s)\n+\t\treturn s\n \t}\n-\treturn svcs\n+\treturn nil\n }\n \n-func (dns *dnsControl) EpIndex(idx string) (ep []*object.Endpoints) {\n-\tos, err := dns.epLister.ByIndex(epNameNamespaceIndex, idx)\n+func (dns *dnsControl) EpIndex(key string) (ep *object.Endpoints) {\n+\to, _, err := dns.epLister.GetByKey(key)","path":"plugin/kubernetes/controller.go","position":131,"original_position":131,"commit_id":"e58e094b27f551a79c43c880b5bce4ac92531826","original_commit_id":"e58e094b27f551a79c43c880b5bce4ac92531826","user":{"login":"chrisohaver","id":14335541,"node_id":"MDQ6VXNlcjE0MzM1NTQx","avatar_url":"https://avatars2.githubusercontent.com/u/14335541?v=4","gravatar_id":"","url":"https://api.github.com/users/chrisohaver","html_url":"https://github.com/chrisohaver","followers_url":"https://api.github.com/users/chrisohaver/followers","following_url":"https://api.github.com/users/chrisohaver/following{/other_user}","gists_url":"https://api.github.com/users/chrisohaver/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisohaver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisohaver/subscriptions","organizations_url":"https://api.github.com/users/chrisohaver/orgs","repos_url":"https://api.github.com/users/chrisohaver/repos","events_url":"https://api.github.com/users/chrisohaver/events{/privacy}","received_events_url":"https://api.github.com/users/chrisohaver/received_events","type":"User","site_admin":false},"body":"Get by key instead of by index.","created_at":"2018-10-10T15:41:07Z","updated_at":"2018-10-10T15:41:08Z","html_url":"https://github.com/coredns/coredns/pull/2167#discussion_r224133120","pull_request_url":"https://api.github.com/repos/coredns/coredns/pulls/2167","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/coredns/coredns/pulls/comments/224133120"},"html":{"href":"https://github.com/coredns/coredns/pull/2167#discussion_r224133120"},"pull_request":{"href":"https://api.github.com/repos/coredns/coredns/pulls/2167"}}},"pull_request":{"url":"https://api.github.com/repos/coredns/coredns/pulls/2167","id":221184112,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIxMTg0MTEy","html_url":"https://github.com/coredns/coredns/pull/2167","diff_url":"https://github.com/coredns/coredns/pull/2167.diff","patch_url":"https://github.com/coredns/coredns/pull/2167.patch","issue_url":"https://api.github.com/repos/coredns/coredns/issues/2167","number":2167,"state":"open","locked":false,"title":"plugin/kubernetes: Reduce memory usage: Use keys instead of indexes","user":{"login":"chrisohaver","id":14335541,"node_id":"MDQ6VXNlcjE0MzM1NTQx","avatar_url":"https://avatars2.githubusercontent.com/u/14335541?v=4","gravatar_id":"","url":"https://api.github.com/users/chrisohaver","html_url":"https://github.com/chrisohaver","followers_url":"https://api.github.com/users/chrisohaver/followers","following_url":"https://api.github.com/users/chrisohaver/following{/other_user}","gists_url":"https://api.github.com/users/chrisohaver/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisohaver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisohaver/subscriptions","organizations_url":"https://api.github.com/users/chrisohaver/orgs","repos_url":"https://api.github.com/users/chrisohaver/repos","events_url":"https://api.github.com/users/chrisohaver/events{/privacy}","received_events_url":"https://api.github.com/users/chrisohaver/received_events","type":"User","site_admin":false},"body":"### 1. Why is this pull request needed and what does it do?\r\n\r\nUse the default namespace/name key built into the client-go store instead of maintaining indexes.\r\nReduces resource usage (memory and cpu).\r\n\r\n### 2. Which issues (if any) are related?\r\n\r\n#2095\r\n\r\n### 3. Which documentation changes (if any) need to be made?\r\n\r\nNone","created_at":"2018-10-08T17:00:51Z","updated_at":"2018-10-10T15:41:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"293c1d4fedf6431a9afb9c8e22f8ecdd50e4bfbb","assignee":null,"assignees":[],"requested_reviewers":[{"login":"miekg","id":353371,"node_id":"MDQ6VXNlcjM1MzM3MQ==","avatar_url":"https://avatars1.githubusercontent.com/u/353371?v=4","gravatar_id":"","url":"https://api.github.com/users/miekg","html_url":"https://github.com/miekg","followers_url":"https://api.github.com/users/miekg/followers","following_url":"https://api.github.com/users/miekg/following{/other_user}","gists_url":"https://api.github.com/users/miekg/gists{/gist_id}","starred_url":"https://api.github.com/users/miekg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miekg/subscriptions","organizations_url":"https://api.github.com/users/miekg/orgs","repos_url":"https://api.github.com/users/miekg/repos","events_url":"https://api.github.com/users/miekg/events{/privacy}","received_events_url":"https://api.github.com/users/miekg/received_events","type":"User","site_admin":false},{"login":"johnbelamaric","id":9468083,"node_id":"MDQ6VXNlcjk0NjgwODM=","avatar_url":"https://avatars2.githubusercontent.com/u/9468083?v=4","gravatar_id":"","url":"https://api.github.com/users/johnbelamaric","html_url":"https://github.com/johnbelamaric","followers_url":"https://api.github.com/users/johnbelamaric/followers","following_url":"https://api.github.com/users/johnbelamaric/following{/other_user}","gists_url":"https://api.github.com/users/johnbelamaric/gists{/gist_id}","starred_url":"https://api.github.com/users/johnbelamaric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnbelamaric/subscriptions","organizations_url":"https://api.github.com/users/johnbelamaric/orgs","repos_url":"https://api.github.com/users/johnbelamaric/repos","events_url":"https://api.github.com/users/johnbelamaric/events{/privacy}","received_events_url":"https://api.github.com/users/johnbelamaric/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":{"url":"https://api.github.com/repos/coredns/coredns/milestones/20","html_url":"https://github.com/coredns/coredns/milestone/20","labels_url":"https://api.github.com/repos/coredns/coredns/milestones/20/labels","id":3725230,"node_id":"MDk6TWlsZXN0b25lMzcyNTIzMA==","number":20,"title":"1.2.3","description":"CoreDNS for Kubernetes v1.13\r\nMemory optimization of the Kubernetes plugin for large clusters (5k nodes).\r\n","creator":{"login":"fturib","id":19315664,"node_id":"MDQ6VXNlcjE5MzE1NjY0","avatar_url":"https://avatars1.githubusercontent.com/u/19315664?v=4","gravatar_id":"","url":"https://api.github.com/users/fturib","html_url":"https://github.com/fturib","followers_url":"https://api.github.com/users/fturib/followers","following_url":"https://api.github.com/users/fturib/following{/other_user}","gists_url":"https://api.github.com/users/fturib/gists{/gist_id}","starred_url":"https://api.github.com/users/fturib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fturib/subscriptions","organizations_url":"https://api.github.com/users/fturib/orgs","repos_url":"https://api.github.com/users/fturib/repos","events_url":"https://api.github.com/users/fturib/events{/privacy}","received_events_url":"https://api.github.com/users/fturib/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":1,"state":"open","created_at":"2018-10-09T18:03:12Z","updated_at":"2018-10-09T20:56:10Z","due_on":"2018-10-15T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/coredns/coredns/pulls/2167/commits","review_comments_url":"https://api.github.com/repos/coredns/coredns/pulls/2167/comments","review_comment_url":"https://api.github.com/repos/coredns/coredns/pulls/comments{/number}","comments_url":"https://api.github.com/repos/coredns/coredns/issues/2167/comments","statuses_url":"https://api.github.com/repos/coredns/coredns/statuses/e58e094b27f551a79c43c880b5bce4ac92531826","head":{"label":"chrisohaver:keys","ref":"keys","sha":"e58e094b27f551a79c43c880b5bce4ac92531826","user":{"login":"chrisohaver","id":14335541,"node_id":"MDQ6VXNlcjE0MzM1NTQx","avatar_url":"https://avatars2.githubusercontent.com/u/14335541?v=4","gravatar_id":"","url":"https://api.github.com/users/chrisohaver","html_url":"https://github.com/chrisohaver","followers_url":"https://api.github.com/users/chrisohaver/followers","following_url":"https://api.github.com/users/chrisohaver/following{/other_user}","gists_url":"https://api.github.com/users/chrisohaver/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisohaver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisohaver/subscriptions","organizations_url":"https://api.github.com/users/chrisohaver/orgs","repos_url":"https://api.github.com/users/chrisohaver/repos","events_url":"https://api.github.com/users/chrisohaver/events{/privacy}","received_events_url":"https://api.github.com/users/chrisohaver/received_events","type":"User","site_admin":false},"repo":{"id":68625151,"node_id":"MDEwOlJlcG9zaXRvcnk2ODYyNTE1MQ==","name":"coredns","full_name":"chrisohaver/coredns","private":false,"owner":{"login":"chrisohaver","id":14335541,"node_id":"MDQ6VXNlcjE0MzM1NTQx","avatar_url":"https://avatars2.githubusercontent.com/u/14335541?v=4","gravatar_id":"","url":"https://api.github.com/users/chrisohaver","html_url":"https://github.com/chrisohaver","followers_url":"https://api.github.com/users/chrisohaver/followers","following_url":"https://api.github.com/users/chrisohaver/following{/other_user}","gists_url":"https://api.github.com/users/chrisohaver/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisohaver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisohaver/subscriptions","organizations_url":"https://api.github.com/users/chrisohaver/orgs","repos_url":"https://api.github.com/users/chrisohaver/repos","events_url":"https://api.github.com/users/chrisohaver/events{/privacy}","received_events_url":"https://api.github.com/users/chrisohaver/received_events","type":"User","site_admin":false},"html_url":"https://github.com/chrisohaver/coredns","description":"CoreDNS is a DNS server that runs middleware","fork":true,"url":"https://api.github.com/repos/chrisohaver/coredns","forks_url":"https://api.github.com/repos/chrisohaver/coredns/forks","keys_url":"https://api.github.com/repos/chrisohaver/coredns/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chrisohaver/coredns/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chrisohaver/coredns/teams","hooks_url":"https://api.github.com/repos/chrisohaver/coredns/hooks","issue_events_url":"https://api.github.com/repos/chrisohaver/coredns/issues/events{/number}","events_url":"https://api.github.com/repos/chrisohaver/coredns/events","assignees_url":"https://api.github.com/repos/chrisohaver/coredns/assignees{/user}","branches_url":"https://api.github.com/repos/chrisohaver/coredns/branches{/branch}","tags_url":"https://api.github.com/repos/chrisohaver/coredns/tags","blobs_url":"https://api.github.com/repos/chrisohaver/coredns/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chrisohaver/coredns/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chrisohaver/coredns/git/refs{/sha}","trees_url":"https://api.github.com/repos/chrisohaver/coredns/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chrisohaver/coredns/statuses/{sha}","languages_url":"https://api.github.com/repos/chrisohaver/coredns/languages","stargazers_url":"https://api.github.com/repos/chrisohaver/coredns/stargazers","contributors_url":"https://api.github.com/repos/chrisohaver/coredns/contributors","subscribers_url":"https://api.github.com/repos/chrisohaver/coredns/subscribers","subscription_url":"https://api.github.com/repos/chrisohaver/coredns/subscription","commits_url":"https://api.github.com/repos/chrisohaver/coredns/commits{/sha}","git_commits_url":"https://api.github.com/repos/chrisohaver/coredns/git/commits{/sha}","comments_url":"https://api.github.com/repos/chrisohaver/coredns/comments{/number}","issue_comment_url":"https://api.github.com/repos/chrisohaver/coredns/issues/comments{/number}","contents_url":"https://api.github.com/repos/chrisohaver/coredns/contents/{+path}","compare_url":"https://api.github.com/repos/chrisohaver/coredns/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chrisohaver/coredns/merges","archive_url":"https://api.github.com/repos/chrisohaver/coredns/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chrisohaver/coredns/downloads","issues_url":"https://api.github.com/repos/chrisohaver/coredns/issues{/number}","pulls_url":"https://api.github.com/repos/chrisohaver/coredns/pulls{/number}","milestones_url":"https://api.github.com/repos/chrisohaver/coredns/milestones{/number}","notifications_url":"https://api.github.com/repos/chrisohaver/coredns/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chrisohaver/coredns/labels{/name}","releases_url":"https://api.github.com/repos/chrisohaver/coredns/releases{/id}","deployments_url":"https://api.github.com/repos/chrisohaver/coredns/deployments","created_at":"2016-09-19T16:38:04Z","updated_at":"2018-06-25T20:33:42Z","pushed_at":"2018-10-10T15:08:02Z","git_url":"git://github.com/chrisohaver/coredns.git","ssh_url":"git@github.com:chrisohaver/coredns.git","clone_url":"https://github.com/chrisohaver/coredns.git","svn_url":"https://github.com/chrisohaver/coredns","homepage":"https://coredns.io","size":87058,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"coredns:master","ref":"master","sha":"49c776df4cdd1948c9fedbb4ec4b313969d9dfa1","user":{"login":"coredns","id":21110084,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxMTEwMDg0","avatar_url":"https://avatars3.githubusercontent.com/u/21110084?v=4","gravatar_id":"","url":"https://api.github.com/users/coredns","html_url":"https://github.com/coredns","followers_url":"https://api.github.com/users/coredns/followers","following_url":"https://api.github.com/users/coredns/following{/other_user}","gists_url":"https://api.github.com/users/coredns/gists{/gist_id}","starred_url":"https://api.github.com/users/coredns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coredns/subscriptions","organizations_url":"https://api.github.com/users/coredns/orgs","repos_url":"https://api.github.com/users/coredns/repos","events_url":"https://api.github.com/users/coredns/events{/privacy}","received_events_url":"https://api.github.com/users/coredns/received_events","type":"Organization","site_admin":false},"repo":{"id":54230994,"node_id":"MDEwOlJlcG9zaXRvcnk1NDIzMDk5NA==","name":"coredns","full_name":"coredns/coredns","private":false,"owner":{"login":"coredns","id":21110084,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxMTEwMDg0","avatar_url":"https://avatars3.githubusercontent.com/u/21110084?v=4","gravatar_id":"","url":"https://api.github.com/users/coredns","html_url":"https://github.com/coredns","followers_url":"https://api.github.com/users/coredns/followers","following_url":"https://api.github.com/users/coredns/following{/other_user}","gists_url":"https://api.github.com/users/coredns/gists{/gist_id}","starred_url":"https://api.github.com/users/coredns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coredns/subscriptions","organizations_url":"https://api.github.com/users/coredns/orgs","repos_url":"https://api.github.com/users/coredns/repos","events_url":"https://api.github.com/users/coredns/events{/privacy}","received_events_url":"https://api.github.com/users/coredns/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/coredns/coredns","description":"CoreDNS is a DNS server that chains plugins","fork":false,"url":"https://api.github.com/repos/coredns/coredns","forks_url":"https://api.github.com/repos/coredns/coredns/forks","keys_url":"https://api.github.com/repos/coredns/coredns/keys{/key_id}","collaborators_url":"https://api.github.com/repos/coredns/coredns/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/coredns/coredns/teams","hooks_url":"https://api.github.com/repos/coredns/coredns/hooks","issue_events_url":"https://api.github.com/repos/coredns/coredns/issues/events{/number}","events_url":"https://api.github.com/repos/coredns/coredns/events","assignees_url":"https://api.github.com/repos/coredns/coredns/assignees{/user}","branches_url":"https://api.github.com/repos/coredns/coredns/branches{/branch}","tags_url":"https://api.github.com/repos/coredns/coredns/tags","blobs_url":"https://api.github.com/repos/coredns/coredns/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/coredns/coredns/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/coredns/coredns/git/refs{/sha}","trees_url":"https://api.github.com/repos/coredns/coredns/git/trees{/sha}","statuses_url":"https://api.github.com/repos/coredns/coredns/statuses/{sha}","languages_url":"https://api.github.com/repos/coredns/coredns/languages","stargazers_url":"https://api.github.com/repos/coredns/coredns/stargazers","contributors_url":"https://api.github.com/repos/coredns/coredns/contributors","subscribers_url":"https://api.github.com/repos/coredns/coredns/subscribers","subscription_url":"https://api.github.com/repos/coredns/coredns/subscription","commits_url":"https://api.github.com/repos/coredns/coredns/commits{/sha}","git_commits_url":"https://api.github.com/repos/coredns/coredns/git/commits{/sha}","comments_url":"https://api.github.com/repos/coredns/coredns/comments{/number}","issue_comment_url":"https://api.github.com/repos/coredns/coredns/issues/comments{/number}","contents_url":"https://api.github.com/repos/coredns/coredns/contents/{+path}","compare_url":"https://api.github.com/repos/coredns/coredns/compare/{base}...{head}","merges_url":"https://api.github.com/repos/coredns/coredns/merges","archive_url":"https://api.github.com/repos/coredns/coredns/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/coredns/coredns/downloads","issues_url":"https://api.github.com/repos/coredns/coredns/issues{/number}","pulls_url":"https://api.github.com/repos/coredns/coredns/pulls{/number}","milestones_url":"https://api.github.com/repos/coredns/coredns/milestones{/number}","notifications_url":"https://api.github.com/repos/coredns/coredns/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/coredns/coredns/labels{/name}","releases_url":"https://api.github.com/repos/coredns/coredns/releases{/id}","deployments_url":"https://api.github.com/repos/coredns/coredns/deployments","created_at":"2016-03-18T20:56:45Z","updated_at":"2018-10-10T14:58:06Z","pushed_at":"2018-10-10T15:08:04Z","git_url":"git://github.com/coredns/coredns.git","ssh_url":"git@github.com:coredns/coredns.git","clone_url":"https://github.com/coredns/coredns.git","svn_url":"https://github.com/coredns/coredns","homepage":"https://coredns.io","size":87155,"stargazers_count":2654,"watchers_count":2654,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":407,"mirror_url":null,"archived":false,"open_issues_count":98,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":407,"open_issues":98,"watchers":2654,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/coredns/coredns/pulls/2167"},"html":{"href":"https://github.com/coredns/coredns/pull/2167"},"issue":{"href":"https://api.github.com/repos/coredns/coredns/issues/2167"},"comments":{"href":"https://api.github.com/repos/coredns/coredns/issues/2167/comments"},"review_comments":{"href":"https://api.github.com/repos/coredns/coredns/pulls/2167/comments"},"review_comment":{"href":"https://api.github.com/repos/coredns/coredns/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/coredns/coredns/pulls/2167/commits"},"statuses":{"href":"https://api.github.com/repos/coredns/coredns/statuses/e58e094b27f551a79c43c880b5bce4ac92531826"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"chrisohaver"}}