{"action":"created","comment":{"url":"https://api.github.com/repos/openshift/origin/pulls/comments/150591883","pull_request_review_id":76114301,"id":150591883,"diff_hunk":"@@ -151,3 +249,165 @@ func pushEnv(environ []envVar) error {\n \t}\n \treturn nil\n }\n+\n+func setDefaultMiddleware(config *configuration.Configuration) {\n+\t// Default to openshift middleware for relevant types\n+\t// This allows custom configs based on old default configs to continue to work\n+\tif config.Middleware == nil {\n+\t\tconfig.Middleware = map[string][]configuration.Middleware{}\n+\t}\n+\tfor _, middlewareType := range []string{\"registry\", \"repository\", \"storage\"} {\n+\t\tfound := false\n+\t\tfor _, middleware := range config.Middleware[middlewareType] {\n+\t\t\tif middleware.Name != middlewareName {\n+\t\t\t\tcontinue\n+\t\t\t}\n+\t\t\tif middleware.Disabled {\n+\t\t\t\tlog.Errorf(\"wrong configuration detected, openshift %s middleware should not be disabled in the config file\", middlewareType)\n+\t\t\t\tmiddleware.Disabled = false\n+\t\t\t}\n+\t\t\tfound = true\n+\t\t\tbreak\n+\t\t}\n+\t\tif found {\n+\t\t\tcontinue\n+\t\t}\n+\t\tconfig.Middleware[middlewareType] = append(config.Middleware[middlewareType], configuration.Middleware{\n+\t\t\tName: middlewareName,\n+\t\t})\n+\t}\n+\t// TODO(legion) This check breaks the tests. Uncomment when the tests will be able to work with auth middleware.\n+\t/*\n+\t\tauthType := config.Auth.Type()\n+\t\tif authType != middlewareName {\n+\t\t\tlog.Errorf(\"wrong configuration detected, registry should use openshift auth controller: %v\", authType)\n+\t\t\tconfig.Auth = make(configuration.Auth)\n+\t\t\tconfig.Auth[middlewareName] = make(configuration.Parameters)\n+\t\t}\n+\t*/\n+}\n+\n+func getServerAddr(options configuration.Parameters) (registryAddr string, err error) {\n+\t// TODO: Deprecate this environment variable.\n+\tregistryAddr = os.Getenv(DockerRegistryURLEnvVar)\n+\tif len(registryAddr) == 0 {\n+\t\tregistryAddr = os.Getenv(OpenShiftDefaultRegistryEnvVar)","path":"pkg/dockerregistry/server/configuration/configuration.go","position":197,"original_position":197,"commit_id":"cc0e3a915c4eb8203a44d63a4476f252cb915bce","original_commit_id":"602380bc632eb0e268003bdf1f99a4ed4635fbe8","user":{"login":"miminar","id":1478803,"avatar_url":"https://avatars2.githubusercontent.com/u/1478803?v=4","gravatar_id":"","url":"https://api.github.com/users/miminar","html_url":"https://github.com/miminar","followers_url":"https://api.github.com/users/miminar/followers","following_url":"https://api.github.com/users/miminar/following{/other_user}","gists_url":"https://api.github.com/users/miminar/gists{/gist_id}","starred_url":"https://api.github.com/users/miminar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miminar/subscriptions","organizations_url":"https://api.github.com/users/miminar/orgs","repos_url":"https://api.github.com/users/miminar/repos","events_url":"https://api.github.com/users/miminar/events{/privacy}","received_events_url":"https://api.github.com/users/miminar/received_events","type":"User","site_admin":false},"body":"This should be preferred over `DockerRegistryURLEnvVar`. Since the second is deprecated.","created_at":"2017-11-13T16:33:55Z","updated_at":"2017-11-13T16:34:48Z","html_url":"https://github.com/openshift/origin/pull/17276#discussion_r150591883","pull_request_url":"https://api.github.com/repos/openshift/origin/pulls/17276","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments/150591883"},"html":{"href":"https://github.com/openshift/origin/pull/17276#discussion_r150591883"},"pull_request":{"href":"https://api.github.com/repos/openshift/origin/pulls/17276"}}},"pull_request":{"url":"https://api.github.com/repos/openshift/origin/pulls/17276","id":152205575,"html_url":"https://github.com/openshift/origin/pull/17276","diff_url":"https://github.com/openshift/origin/pull/17276.diff","patch_url":"https://github.com/openshift/origin/pull/17276.patch","issue_url":"https://api.github.com/repos/openshift/origin/issues/17276","number":17276,"state":"open","locked":false,"title":"Migrate middleware configuration to openshift section","user":{"login":"legionus","id":1690313,"avatar_url":"https://avatars3.githubusercontent.com/u/1690313?v=4","gravatar_id":"","url":"https://api.github.com/users/legionus","html_url":"https://github.com/legionus","followers_url":"https://api.github.com/users/legionus/followers","following_url":"https://api.github.com/users/legionus/following{/other_user}","gists_url":"https://api.github.com/users/legionus/gists{/gist_id}","starred_url":"https://api.github.com/users/legionus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/legionus/subscriptions","organizations_url":"https://api.github.com/users/legionus/orgs","repos_url":"https://api.github.com/users/legionus/repos","events_url":"https://api.github.com/users/legionus/events{/privacy}","received_events_url":"https://api.github.com/users/legionus/received_events","type":"User","site_admin":false},"body":"Fix tech dept: https://github.com/openshift/origin/issues/13568\r\n","created_at":"2017-11-13T10:48:26Z","updated_at":"2017-11-13T16:34:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5e6ec1cbb7c149078cc4eaad064214660e1c736a","assignee":{"login":"legionus","id":1690313,"avatar_url":"https://avatars3.githubusercontent.com/u/1690313?v=4","gravatar_id":"","url":"https://api.github.com/users/legionus","html_url":"https://github.com/legionus","followers_url":"https://api.github.com/users/legionus/followers","following_url":"https://api.github.com/users/legionus/following{/other_user}","gists_url":"https://api.github.com/users/legionus/gists{/gist_id}","starred_url":"https://api.github.com/users/legionus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/legionus/subscriptions","organizations_url":"https://api.github.com/users/legionus/orgs","repos_url":"https://api.github.com/users/legionus/repos","events_url":"https://api.github.com/users/legionus/events{/privacy}","received_events_url":"https://api.github.com/users/legionus/received_events","type":"User","site_admin":false},"assignees":[{"login":"legionus","id":1690313,"avatar_url":"https://avatars3.githubusercontent.com/u/1690313?v=4","gravatar_id":"","url":"https://api.github.com/users/legionus","html_url":"https://github.com/legionus","followers_url":"https://api.github.com/users/legionus/followers","following_url":"https://api.github.com/users/legionus/following{/other_user}","gists_url":"https://api.github.com/users/legionus/gists{/gist_id}","starred_url":"https://api.github.com/users/legionus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/legionus/subscriptions","organizations_url":"https://api.github.com/users/legionus/orgs","repos_url":"https://api.github.com/users/legionus/repos","events_url":"https://api.github.com/users/legionus/events{/privacy}","received_events_url":"https://api.github.com/users/legionus/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"mfojtik","id":44136,"avatar_url":"https://avatars2.githubusercontent.com/u/44136?v=4","gravatar_id":"","url":"https://api.github.com/users/mfojtik","html_url":"https://github.com/mfojtik","followers_url":"https://api.github.com/users/mfojtik/followers","following_url":"https://api.github.com/users/mfojtik/following{/other_user}","gists_url":"https://api.github.com/users/mfojtik/gists{/gist_id}","starred_url":"https://api.github.com/users/mfojtik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfojtik/subscriptions","organizations_url":"https://api.github.com/users/mfojtik/orgs","repos_url":"https://api.github.com/users/mfojtik/repos","events_url":"https://api.github.com/users/mfojtik/events{/privacy}","received_events_url":"https://api.github.com/users/mfojtik/received_events","type":"User","site_admin":false},{"login":"bparees","id":4974046,"avatar_url":"https://avatars2.githubusercontent.com/u/4974046?v=4","gravatar_id":"","url":"https://api.github.com/users/bparees","html_url":"https://github.com/bparees","followers_url":"https://api.github.com/users/bparees/followers","following_url":"https://api.github.com/users/bparees/following{/other_user}","gists_url":"https://api.github.com/users/bparees/gists{/gist_id}","starred_url":"https://api.github.com/users/bparees/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bparees/subscriptions","organizations_url":"https://api.github.com/users/bparees/orgs","repos_url":"https://api.github.com/users/bparees/repos","events_url":"https://api.github.com/users/bparees/events{/privacy}","received_events_url":"https://api.github.com/users/bparees/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/openshift/origin/pulls/17276/commits","review_comments_url":"https://api.github.com/repos/openshift/origin/pulls/17276/comments","review_comment_url":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openshift/origin/issues/17276/comments","statuses_url":"https://api.github.com/repos/openshift/origin/statuses/cc0e3a915c4eb8203a44d63a4476f252cb915bce","head":{"label":"legionus:dockerregistry-config-refactor-v1","ref":"dockerregistry-config-refactor-v1","sha":"cc0e3a915c4eb8203a44d63a4476f252cb915bce","user":{"login":"legionus","id":1690313,"avatar_url":"https://avatars3.githubusercontent.com/u/1690313?v=4","gravatar_id":"","url":"https://api.github.com/users/legionus","html_url":"https://github.com/legionus","followers_url":"https://api.github.com/users/legionus/followers","following_url":"https://api.github.com/users/legionus/following{/other_user}","gists_url":"https://api.github.com/users/legionus/gists{/gist_id}","starred_url":"https://api.github.com/users/legionus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/legionus/subscriptions","organizations_url":"https://api.github.com/users/legionus/orgs","repos_url":"https://api.github.com/users/legionus/repos","events_url":"https://api.github.com/users/legionus/events{/privacy}","received_events_url":"https://api.github.com/users/legionus/received_events","type":"User","site_admin":false},"repo":{"id":49266113,"name":"origin","full_name":"legionus/origin","owner":{"login":"legionus","id":1690313,"avatar_url":"https://avatars3.githubusercontent.com/u/1690313?v=4","gravatar_id":"","url":"https://api.github.com/users/legionus","html_url":"https://github.com/legionus","followers_url":"https://api.github.com/users/legionus/followers","following_url":"https://api.github.com/users/legionus/following{/other_user}","gists_url":"https://api.github.com/users/legionus/gists{/gist_id}","starred_url":"https://api.github.com/users/legionus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/legionus/subscriptions","organizations_url":"https://api.github.com/users/legionus/orgs","repos_url":"https://api.github.com/users/legionus/repos","events_url":"https://api.github.com/users/legionus/events{/privacy}","received_events_url":"https://api.github.com/users/legionus/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/legionus/origin","description":"OpenShift 3 - build, deploy, and manage your applications with Docker and Kubernetes","fork":true,"url":"https://api.github.com/repos/legionus/origin","forks_url":"https://api.github.com/repos/legionus/origin/forks","keys_url":"https://api.github.com/repos/legionus/origin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/legionus/origin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/legionus/origin/teams","hooks_url":"https://api.github.com/repos/legionus/origin/hooks","issue_events_url":"https://api.github.com/repos/legionus/origin/issues/events{/number}","events_url":"https://api.github.com/repos/legionus/origin/events","assignees_url":"https://api.github.com/repos/legionus/origin/assignees{/user}","branches_url":"https://api.github.com/repos/legionus/origin/branches{/branch}","tags_url":"https://api.github.com/repos/legionus/origin/tags","blobs_url":"https://api.github.com/repos/legionus/origin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/legionus/origin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/legionus/origin/git/refs{/sha}","trees_url":"https://api.github.com/repos/legionus/origin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/legionus/origin/statuses/{sha}","languages_url":"https://api.github.com/repos/legionus/origin/languages","stargazers_url":"https://api.github.com/repos/legionus/origin/stargazers","contributors_url":"https://api.github.com/repos/legionus/origin/contributors","subscribers_url":"https://api.github.com/repos/legionus/origin/subscribers","subscription_url":"https://api.github.com/repos/legionus/origin/subscription","commits_url":"https://api.github.com/repos/legionus/origin/commits{/sha}","git_commits_url":"https://api.github.com/repos/legionus/origin/git/commits{/sha}","comments_url":"https://api.github.com/repos/legionus/origin/comments{/number}","issue_comment_url":"https://api.github.com/repos/legionus/origin/issues/comments{/number}","contents_url":"https://api.github.com/repos/legionus/origin/contents/{+path}","compare_url":"https://api.github.com/repos/legionus/origin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/legionus/origin/merges","archive_url":"https://api.github.com/repos/legionus/origin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/legionus/origin/downloads","issues_url":"https://api.github.com/repos/legionus/origin/issues{/number}","pulls_url":"https://api.github.com/repos/legionus/origin/pulls{/number}","milestones_url":"https://api.github.com/repos/legionus/origin/milestones{/number}","notifications_url":"https://api.github.com/repos/legionus/origin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/legionus/origin/labels{/name}","releases_url":"https://api.github.com/repos/legionus/origin/releases{/id}","deployments_url":"https://api.github.com/repos/legionus/origin/deployments","created_at":"2016-01-08T10:32:30Z","updated_at":"2016-07-15T15:52:46Z","pushed_at":"2017-11-13T14:49:25Z","git_url":"git://github.com/legionus/origin.git","ssh_url":"git@github.com:legionus/origin.git","clone_url":"https://github.com/legionus/origin.git","svn_url":"https://github.com/legionus/origin","homepage":"http://www.openshift.org","size":828933,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"openshift:master","ref":"master","sha":"d076bb5669a279b16b15ceb126c3e75fca3ebb31","user":{"login":"openshift","id":792337,"avatar_url":"https://avatars3.githubusercontent.com/u/792337?v=4","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"repo":{"id":22442668,"name":"origin","full_name":"openshift/origin","owner":{"login":"openshift","id":792337,"avatar_url":"https://avatars3.githubusercontent.com/u/792337?v=4","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openshift/origin","description":"Enterprise Kubernetes for Developers","fork":false,"url":"https://api.github.com/repos/openshift/origin","forks_url":"https://api.github.com/repos/openshift/origin/forks","keys_url":"https://api.github.com/repos/openshift/origin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openshift/origin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openshift/origin/teams","hooks_url":"https://api.github.com/repos/openshift/origin/hooks","issue_events_url":"https://api.github.com/repos/openshift/origin/issues/events{/number}","events_url":"https://api.github.com/repos/openshift/origin/events","assignees_url":"https://api.github.com/repos/openshift/origin/assignees{/user}","branches_url":"https://api.github.com/repos/openshift/origin/branches{/branch}","tags_url":"https://api.github.com/repos/openshift/origin/tags","blobs_url":"https://api.github.com/repos/openshift/origin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openshift/origin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openshift/origin/git/refs{/sha}","trees_url":"https://api.github.com/repos/openshift/origin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openshift/origin/statuses/{sha}","languages_url":"https://api.github.com/repos/openshift/origin/languages","stargazers_url":"https://api.github.com/repos/openshift/origin/stargazers","contributors_url":"https://api.github.com/repos/openshift/origin/contributors","subscribers_url":"https://api.github.com/repos/openshift/origin/subscribers","subscription_url":"https://api.github.com/repos/openshift/origin/subscription","commits_url":"https://api.github.com/repos/openshift/origin/commits{/sha}","git_commits_url":"https://api.github.com/repos/openshift/origin/git/commits{/sha}","comments_url":"https://api.github.com/repos/openshift/origin/comments{/number}","issue_comment_url":"https://api.github.com/repos/openshift/origin/issues/comments{/number}","contents_url":"https://api.github.com/repos/openshift/origin/contents/{+path}","compare_url":"https://api.github.com/repos/openshift/origin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openshift/origin/merges","archive_url":"https://api.github.com/repos/openshift/origin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openshift/origin/downloads","issues_url":"https://api.github.com/repos/openshift/origin/issues{/number}","pulls_url":"https://api.github.com/repos/openshift/origin/pulls{/number}","milestones_url":"https://api.github.com/repos/openshift/origin/milestones{/number}","notifications_url":"https://api.github.com/repos/openshift/origin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openshift/origin/labels{/name}","releases_url":"https://api.github.com/repos/openshift/origin/releases{/id}","deployments_url":"https://api.github.com/repos/openshift/origin/deployments","created_at":"2014-07-30T20:04:05Z","updated_at":"2017-11-13T14:22:55Z","pushed_at":"2017-11-13T16:25:21Z","git_url":"git://github.com/openshift/origin.git","ssh_url":"git@github.com:openshift/origin.git","clone_url":"https://github.com/openshift/origin.git","svn_url":"https://github.com/openshift/origin","homepage":"http://www.openshift.org","size":879798,"stargazers_count":3627,"watchers_count":3627,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2350,"mirror_url":null,"archived":false,"open_issues_count":1510,"forks":2350,"open_issues":1510,"watchers":3627,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/17276"},"html":{"href":"https://github.com/openshift/origin/pull/17276"},"issue":{"href":"https://api.github.com/repos/openshift/origin/issues/17276"},"comments":{"href":"https://api.github.com/repos/openshift/origin/issues/17276/comments"},"review_comments":{"href":"https://api.github.com/repos/openshift/origin/pulls/17276/comments"},"review_comment":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openshift/origin/pulls/17276/commits"},"statuses":{"href":"https://api.github.com/repos/openshift/origin/statuses/cc0e3a915c4eb8203a44d63a4476f252cb915bce"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"miminar"}}