{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/97682055","pull_request_review_id":18299447,"id":97682055,"diff_hunk":"@@ -133,12 +132,17 @@ func (a *acrProvider) Provide() credentialprovider.DockerConfig {\n \t\treturn cfg\n \t}\n \tfor ix := range *res.Value {\n-\t\t// TODO: I don't think this will work for national clouds\n-\t\tcfg[fmt.Sprintf(\"%s.azurecr.io\", *(*res.Value)[ix].Name)] = entry\n+\t\tloginServer := getLoginServer((*res.Value)[ix])\n+\t\tglog.V(4).Infof(\"Adding Azure Container Registry docker credential for %s\", loginServer)\n+\t\tcfg[loginServer] = entry\n \t}\n \treturn cfg\n }\n \n+func getLoginServer(registry containerregistry.Registry) string {\n+\treturn *(*registry.RegistryProperties).LoginServer","path":"pkg/credentialprovider/azure/azure_credentials.go","position":22,"original_position":22,"commit_id":"1c72f2b9def5ddddbaaf721ab6bca32b86784d6d","original_commit_id":"1c72f2b9def5ddddbaaf721ab6bca32b86784d6d","user":{"login":"liggitt","id":980082,"avatar_url":"https://avatars.githubusercontent.com/u/980082?v=3","gravatar_id":"","url":"https://api.github.com/users/liggitt","html_url":"https://github.com/liggitt","followers_url":"https://api.github.com/users/liggitt/followers","following_url":"https://api.github.com/users/liggitt/following{/other_user}","gists_url":"https://api.github.com/users/liggitt/gists{/gist_id}","starred_url":"https://api.github.com/users/liggitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liggitt/subscriptions","organizations_url":"https://api.github.com/users/liggitt/orgs","repos_url":"https://api.github.com/users/liggitt/repos","events_url":"https://api.github.com/users/liggitt/events{/privacy}","received_events_url":"https://api.github.com/users/liggitt/received_events","type":"User","site_admin":false},"body":"looks like the old default was wrong. should this return `(string, error)` and error if LoginServer is unset?","created_at":"2017-01-25T00:00:35Z","updated_at":"2017-01-25T00:00:37Z","html_url":"https://github.com/kubernetes/kubernetes/pull/40142#discussion_r97682055","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/40142","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/97682055"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/40142#discussion_r97682055"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/40142"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/40142","id":102258459,"html_url":"https://github.com/kubernetes/kubernetes/pull/40142","diff_url":"https://github.com/kubernetes/kubernetes/pull/40142.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/40142.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/40142","number":40142,"state":"open","locked":false,"title":"azure: azure container registry: fix login server","user":{"login":"colemickens","id":327028,"avatar_url":"https://avatars.githubusercontent.com/u/327028?v=3","gravatar_id":"","url":"https://api.github.com/users/colemickens","html_url":"https://github.com/colemickens","followers_url":"https://api.github.com/users/colemickens/followers","following_url":"https://api.github.com/users/colemickens/following{/other_user}","gists_url":"https://api.github.com/users/colemickens/gists{/gist_id}","starred_url":"https://api.github.com/users/colemickens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colemickens/subscriptions","organizations_url":"https://api.github.com/users/colemickens/orgs","repos_url":"https://api.github.com/users/colemickens/repos","events_url":"https://api.github.com/users/colemickens/events{/privacy}","received_events_url":"https://api.github.com/users/colemickens/received_events","type":"User","site_admin":false},"body":"**What this PR does / why we need it**:\r\n\r\nFixes the Azure Container Registry integration\r\n\r\n**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #\r\nn/a\r\n\r\n**Special notes for your reviewer**:\r\n\r\nBefore this change, if I created an ACR with name `colemicktest`, then the login server would be `colemicktest-microsoft.azurecr.io`. This code was concating to form `colemicktest.azurecr.io` which does not work.\r\n\r\nThe fix is to reach into RegistryProperties and read out the login server domain name directly.\r\n\r\nAlso, this should eliminate that existed when ACR gets to sovereign clouds.\r\n\r\n**Release note**:\r\n<!--  Steps to write your release note:\r\n1. Use the release-note-* labels to set the release note state (if you have access) \r\n2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. \r\n-->\r\n```release-note\r\nazure: fix Azure Container Registry integration\r\n```\r\n","created_at":"2017-01-19T12:36:37Z","updated_at":"2017-01-25T00:00:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c8a7c7e9c37bae37b079397922baaeaa3b0e0ec0","assignee":{"login":"erictune","id":8105590,"avatar_url":"https://avatars.githubusercontent.com/u/8105590?v=3","gravatar_id":"","url":"https://api.github.com/users/erictune","html_url":"https://github.com/erictune","followers_url":"https://api.github.com/users/erictune/followers","following_url":"https://api.github.com/users/erictune/following{/other_user}","gists_url":"https://api.github.com/users/erictune/gists{/gist_id}","starred_url":"https://api.github.com/users/erictune/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erictune/subscriptions","organizations_url":"https://api.github.com/users/erictune/orgs","repos_url":"https://api.github.com/users/erictune/repos","events_url":"https://api.github.com/users/erictune/events{/privacy}","received_events_url":"https://api.github.com/users/erictune/received_events","type":"User","site_admin":false},"assignees":[{"login":"erictune","id":8105590,"avatar_url":"https://avatars.githubusercontent.com/u/8105590?v=3","gravatar_id":"","url":"https://api.github.com/users/erictune","html_url":"https://github.com/erictune","followers_url":"https://api.github.com/users/erictune/followers","following_url":"https://api.github.com/users/erictune/following{/other_user}","gists_url":"https://api.github.com/users/erictune/gists{/gist_id}","starred_url":"https://api.github.com/users/erictune/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erictune/subscriptions","organizations_url":"https://api.github.com/users/erictune/orgs","repos_url":"https://api.github.com/users/erictune/repos","events_url":"https://api.github.com/users/erictune/events{/privacy}","received_events_url":"https://api.github.com/users/erictune/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/40142/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/40142/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/40142/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/1c72f2b9def5ddddbaaf721ab6bca32b86784d6d","head":{"label":"colemickens:colemickens-acr-login-server","ref":"colemickens-acr-login-server","sha":"1c72f2b9def5ddddbaaf721ab6bca32b86784d6d","user":{"login":"colemickens","id":327028,"avatar_url":"https://avatars.githubusercontent.com/u/327028?v=3","gravatar_id":"","url":"https://api.github.com/users/colemickens","html_url":"https://github.com/colemickens","followers_url":"https://api.github.com/users/colemickens/followers","following_url":"https://api.github.com/users/colemickens/following{/other_user}","gists_url":"https://api.github.com/users/colemickens/gists{/gist_id}","starred_url":"https://api.github.com/users/colemickens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colemickens/subscriptions","organizations_url":"https://api.github.com/users/colemickens/orgs","repos_url":"https://api.github.com/users/colemickens/repos","events_url":"https://api.github.com/users/colemickens/events{/privacy}","received_events_url":"https://api.github.com/users/colemickens/received_events","type":"User","site_admin":false},"repo":{"id":45073694,"name":"kubernetes","full_name":"colemickens/kubernetes","owner":{"login":"colemickens","id":327028,"avatar_url":"https://avatars.githubusercontent.com/u/327028?v=3","gravatar_id":"","url":"https://api.github.com/users/colemickens","html_url":"https://github.com/colemickens","followers_url":"https://api.github.com/users/colemickens/followers","following_url":"https://api.github.com/users/colemickens/following{/other_user}","gists_url":"https://api.github.com/users/colemickens/gists{/gist_id}","starred_url":"https://api.github.com/users/colemickens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colemickens/subscriptions","organizations_url":"https://api.github.com/users/colemickens/orgs","repos_url":"https://api.github.com/users/colemickens/repos","events_url":"https://api.github.com/users/colemickens/events{/privacy}","received_events_url":"https://api.github.com/users/colemickens/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/colemickens/kubernetes","description":"Container Cluster Manager from Google","fork":true,"url":"https://api.github.com/repos/colemickens/kubernetes","forks_url":"https://api.github.com/repos/colemickens/kubernetes/forks","keys_url":"https://api.github.com/repos/colemickens/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/colemickens/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/colemickens/kubernetes/teams","hooks_url":"https://api.github.com/repos/colemickens/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/colemickens/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/colemickens/kubernetes/events","assignees_url":"https://api.github.com/repos/colemickens/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/colemickens/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/colemickens/kubernetes/tags","blobs_url":"https://api.github.com/repos/colemickens/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/colemickens/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/colemickens/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/colemickens/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/colemickens/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/colemickens/kubernetes/languages","stargazers_url":"https://api.github.com/repos/colemickens/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/colemickens/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/colemickens/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/colemickens/kubernetes/subscription","commits_url":"https://api.github.com/repos/colemickens/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/colemickens/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/colemickens/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/colemickens/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/colemickens/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/colemickens/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/colemickens/kubernetes/merges","archive_url":"https://api.github.com/repos/colemickens/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/colemickens/kubernetes/downloads","issues_url":"https://api.github.com/repos/colemickens/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/colemickens/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/colemickens/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/colemickens/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/colemickens/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/colemickens/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/colemickens/kubernetes/deployments","created_at":"2015-10-27T22:21:42Z","updated_at":"2016-11-04T04:56:12Z","pushed_at":"2017-01-24T23:49:10Z","git_url":"git://github.com/colemickens/kubernetes.git","ssh_url":"git@github.com:colemickens/kubernetes.git","clone_url":"https://github.com/colemickens/kubernetes.git","svn_url":"https://github.com/colemickens/kubernetes","homepage":"http://kubernetes.io","size":380594,"stargazers_count":1,"watchers_count":1,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"kubernetes:master","ref":"master","sha":"da7d17c8dd16e89a6a385a25bbe4ef5ade41ba55","user":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"repo":{"id":20580498,"name":"kubernetes","full_name":"kubernetes/kubernetes","owner":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kubernetes/kubernetes","description":"Production-Grade Container Scheduling and Management","fork":false,"url":"https://api.github.com/repos/kubernetes/kubernetes","forks_url":"https://api.github.com/repos/kubernetes/kubernetes/forks","keys_url":"https://api.github.com/repos/kubernetes/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes/kubernetes/teams","hooks_url":"https://api.github.com/repos/kubernetes/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes/kubernetes/events","assignees_url":"https://api.github.com/repos/kubernetes/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes/kubernetes/tags","blobs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes/kubernetes/languages","stargazers_url":"https://api.github.com/repos/kubernetes/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/kubernetes/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/kubernetes/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/kubernetes/kubernetes/subscription","commits_url":"https://api.github.com/repos/kubernetes/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes/kubernetes/merges","archive_url":"https://api.github.com/repos/kubernetes/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes/kubernetes/downloads","issues_url":"https://api.github.com/repos/kubernetes/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/kubernetes/kubernetes/deployments","created_at":"2014-06-06T22:56:04Z","updated_at":"2017-01-24T23:55:41Z","pushed_at":"2017-01-24T23:56:59Z","git_url":"git://github.com/kubernetes/kubernetes.git","ssh_url":"git@github.com:kubernetes/kubernetes.git","clone_url":"https://github.com/kubernetes/kubernetes.git","svn_url":"https://github.com/kubernetes/kubernetes","homepage":"http://kubernetes.io","size":513073,"stargazers_count":20115,"watchers_count":20115,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":6831,"mirror_url":null,"open_issues_count":5533,"forks":6831,"open_issues":5533,"watchers":20115,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/40142"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/40142"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/40142"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/40142/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/40142/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/40142/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/1c72f2b9def5ddddbaaf721ab6bca32b86784d6d"}}}}
{"actor":{"display_login":"liggitt"}}