{"action":"created","comment":{"url":"https://api.github.com/repos/openshift/origin/pulls/comments/202679245","pull_request_review_id":137421832,"id":202679245,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMjY3OTI0NQ==","diff_hunk":"@@ -8,24 +8,24 @@ import (\n \t\"strings\"\n \t\"time\"\n \n+\tcorev1 \"k8s.io/api/core/v1\"\n \t\"k8s.io/apimachinery/pkg/api/errors\"\n \tmetav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\"\n \t\"k8s.io/apimachinery/pkg/labels\"\n \t\"k8s.io/apimachinery/pkg/runtime\"\n \t\"k8s.io/apimachinery/pkg/util/wait\"\n+\t\"k8s.io/client-go/kubernetes\"\n+\tcorev1client \"k8s.io/client-go/kubernetes/typed/core/v1\"\n \t\"k8s.io/client-go/scale\"\n \t\"k8s.io/client-go/tools/record\"\n \t\"k8s.io/client-go/util/retry\"\n \tkapi \"k8s.io/kubernetes/pkg/apis/core\"\n-\tkclientset \"k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset\"\n-\tkcoreclient \"k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion\"\n \n-\tappsapi \"github.com/openshift/origin/pkg/apps/apis/apps\"\n+\timageclientv1 \"github.com/openshift/client-go/image/clientset/versioned\"","path":"pkg/apps/strategy/recreate/recreate.go","position":20,"original_position":20,"commit_id":"a76a54dd2079515b684036a7391fbd36f34eeb5a","original_commit_id":"a3afe1513fce6e4220933a518c24bd17bf01438d","user":{"login":"mfojtik","id":44136,"node_id":"MDQ6VXNlcjQ0MTM2","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},"body":"will need to check how much do we need from image client... if just Image then sure we can strip the client scope","created_at":"2018-07-16T13:21:53Z","updated_at":"2018-07-16T13:21:53Z","html_url":"https://github.com/openshift/origin/pull/20019#discussion_r202679245","pull_request_url":"https://api.github.com/repos/openshift/origin/pulls/20019","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments/202679245"},"html":{"href":"https://github.com/openshift/origin/pull/20019#discussion_r202679245"},"pull_request":{"href":"https://api.github.com/repos/openshift/origin/pulls/20019"}},"in_reply_to_id":202644965},"pull_request":{"url":"https://api.github.com/repos/openshift/origin/pulls/20019","id":195161043,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1MTYxMDQz","html_url":"https://github.com/openshift/origin/pull/20019","diff_url":"https://github.com/openshift/origin/pull/20019.diff","patch_url":"https://github.com/openshift/origin/pull/20019.patch","issue_url":"https://api.github.com/repos/openshift/origin/issues/20019","number":20019,"state":"open","locked":false,"title":"Move to external clients in deployer, lifecycle hook and strategies","user":{"login":"mfojtik","id":44136,"node_id":"MDQ6VXNlcjQ0MTM2","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},"body":"This grew a little after rebase landed. A brief summary of changes here:\r\n\r\n* deployer is lifecycle hooks switched to external clients (client-go and openshift/client-go)\r\n* pkg/apps/utils reorganized:\r\n  * `pkg/apps/util` is now external only and be used by the CLI (need to move helpers used by CLI into library-go)\r\n  * `pkg/apps/controller/util` are helpers used by controllers and strategies internally (they still deal with internal objects from informers)\r\n\r\nI would love to move the cmd/deployer to consume only openshift/api and external clients but it seems like we will still need internal types for decoding \"old\" deployment configs serialized inside replication controllers annotations (right @deads2k ?)\r\n\r\nFollow ups:\r\n\r\n- [ ] switch DecodeConfig to decode to external DC instead of internal\r\n- [ ] move code shared with CLI into library-go\r\n- [ ] fix the CLI commands below and add `pkg/apps/controller/util` into restricted imports for pkg/oc.\r\n\r\n@juanvallejo as a follow up for this, I would like to fix these commands to use `pkg/apps/utils` instead of controller utils. That will involve moving those commands to external clients (in some cases) and switching them to use external types:\r\n\r\n```\r\npkg/oc/cli/cmd/deploy.go\r\npkg/oc/cli/cmd/rollback.go\r\npkg/oc/cli/cmd/rollback_test.go\r\npkg/oc/cli/cmd/rsh.go\r\npkg/oc/cli/cmd/deploy_test.go\r\npkg/oc/cli/deploymentconfigs/status.go\r\npkg/oc/cli/describe/projectstatus.go\r\npkg/oc/cli/describe/deployments_test.go\r\npkg/oc/cli/describe/deployments.go\r\npkg/oc/cli/cmd/rollout/cancel.go\r\npkg/oc/cli/cmd/rollout/retry.go\r\npkg/oc/cli/cmd/rollout/latest.go\r\npkg/oc/cli/deploymentconfigs/prune/resolvers.go\r\npkg/oc/cli/deploymentconfigs/prune/prune.go\r\npkg/oc/cli/deploymentconfigs/prune/data.go\r\n```\r\n\r\n/cc @smarterclayton \r\n/cc @tnozicka \r\n\r\n@tnozicka as promised, this is only switch to external, no functional changes. I will rebase https://github.com/openshift/origin/pull/19841 but we can discuss it first in arch call.","created_at":"2018-06-15T12:34:20Z","updated_at":"2018-07-16T13:21:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6c8bb57aac036c351260e6c31f31790fba419564","assignee":{"login":"tnozicka","id":11869554,"node_id":"MDQ6VXNlcjExODY5NTU0","avatar_url":"https://avatars2.githubusercontent.com/u/11869554?v=4","gravatar_id":"","url":"https://api.github.com/users/tnozicka","html_url":"https://github.com/tnozicka","followers_url":"https://api.github.com/users/tnozicka/followers","following_url":"https://api.github.com/users/tnozicka/following{/other_user}","gists_url":"https://api.github.com/users/tnozicka/gists{/gist_id}","starred_url":"https://api.github.com/users/tnozicka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tnozicka/subscriptions","organizations_url":"https://api.github.com/users/tnozicka/orgs","repos_url":"https://api.github.com/users/tnozicka/repos","events_url":"https://api.github.com/users/tnozicka/events{/privacy}","received_events_url":"https://api.github.com/users/tnozicka/received_events","type":"User","site_admin":false},"assignees":[{"login":"tnozicka","id":11869554,"node_id":"MDQ6VXNlcjExODY5NTU0","avatar_url":"https://avatars2.githubusercontent.com/u/11869554?v=4","gravatar_id":"","url":"https://api.github.com/users/tnozicka","html_url":"https://github.com/tnozicka","followers_url":"https://api.github.com/users/tnozicka/followers","following_url":"https://api.github.com/users/tnozicka/following{/other_user}","gists_url":"https://api.github.com/users/tnozicka/gists{/gist_id}","starred_url":"https://api.github.com/users/tnozicka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tnozicka/subscriptions","organizations_url":"https://api.github.com/users/tnozicka/orgs","repos_url":"https://api.github.com/users/tnozicka/repos","events_url":"https://api.github.com/users/tnozicka/events{/privacy}","received_events_url":"https://api.github.com/users/tnozicka/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"smarterclayton","id":1163175,"node_id":"MDQ6VXNlcjExNjMxNzU=","avatar_url":"https://avatars0.githubusercontent.com/u/1163175?v=4","gravatar_id":"","url":"https://api.github.com/users/smarterclayton","html_url":"https://github.com/smarterclayton","followers_url":"https://api.github.com/users/smarterclayton/followers","following_url":"https://api.github.com/users/smarterclayton/following{/other_user}","gists_url":"https://api.github.com/users/smarterclayton/gists{/gist_id}","starred_url":"https://api.github.com/users/smarterclayton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smarterclayton/subscriptions","organizations_url":"https://api.github.com/users/smarterclayton/orgs","repos_url":"https://api.github.com/users/smarterclayton/repos","events_url":"https://api.github.com/users/smarterclayton/events{/privacy}","received_events_url":"https://api.github.com/users/smarterclayton/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":223051294,"node_id":"MDU6TGFiZWwyMjMwNTEyOTQ=","url":"https://api.github.com/repos/openshift/origin/labels/approved","name":"approved","color":"0ffa16","default":false},{"id":640548662,"node_id":"MDU6TGFiZWw2NDA1NDg2NjI=","url":"https://api.github.com/repos/openshift/origin/labels/size/XXL","name":"size/XXL","color":"ee0000","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/openshift/origin/pulls/20019/commits","review_comments_url":"https://api.github.com/repos/openshift/origin/pulls/20019/comments","review_comment_url":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openshift/origin/issues/20019/comments","statuses_url":"https://api.github.com/repos/openshift/origin/statuses/a76a54dd2079515b684036a7391fbd36f34eeb5a","head":{"label":"mfojtik:apps-30-rewrite-lifecycle-hooks-1","ref":"apps-30-rewrite-lifecycle-hooks-1","sha":"a76a54dd2079515b684036a7391fbd36f34eeb5a","user":{"login":"mfojtik","id":44136,"node_id":"MDQ6VXNlcjQ0MTM2","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},"repo":{"id":22954249,"node_id":"MDEwOlJlcG9zaXRvcnkyMjk1NDI0OQ==","name":"origin","full_name":"mfojtik/origin","owner":{"login":"mfojtik","id":44136,"node_id":"MDQ6VXNlcjQ0MTM2","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},"private":false,"html_url":"https://github.com/mfojtik/origin","description":"OpenShift 3 - build, deploy, and manage your applications with Docker and Kubernetes","fork":true,"url":"https://api.github.com/repos/mfojtik/origin","forks_url":"https://api.github.com/repos/mfojtik/origin/forks","keys_url":"https://api.github.com/repos/mfojtik/origin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mfojtik/origin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mfojtik/origin/teams","hooks_url":"https://api.github.com/repos/mfojtik/origin/hooks","issue_events_url":"https://api.github.com/repos/mfojtik/origin/issues/events{/number}","events_url":"https://api.github.com/repos/mfojtik/origin/events","assignees_url":"https://api.github.com/repos/mfojtik/origin/assignees{/user}","branches_url":"https://api.github.com/repos/mfojtik/origin/branches{/branch}","tags_url":"https://api.github.com/repos/mfojtik/origin/tags","blobs_url":"https://api.github.com/repos/mfojtik/origin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mfojtik/origin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mfojtik/origin/git/refs{/sha}","trees_url":"https://api.github.com/repos/mfojtik/origin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mfojtik/origin/statuses/{sha}","languages_url":"https://api.github.com/repos/mfojtik/origin/languages","stargazers_url":"https://api.github.com/repos/mfojtik/origin/stargazers","contributors_url":"https://api.github.com/repos/mfojtik/origin/contributors","subscribers_url":"https://api.github.com/repos/mfojtik/origin/subscribers","subscription_url":"https://api.github.com/repos/mfojtik/origin/subscription","commits_url":"https://api.github.com/repos/mfojtik/origin/commits{/sha}","git_commits_url":"https://api.github.com/repos/mfojtik/origin/git/commits{/sha}","comments_url":"https://api.github.com/repos/mfojtik/origin/comments{/number}","issue_comment_url":"https://api.github.com/repos/mfojtik/origin/issues/comments{/number}","contents_url":"https://api.github.com/repos/mfojtik/origin/contents/{+path}","compare_url":"https://api.github.com/repos/mfojtik/origin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mfojtik/origin/merges","archive_url":"https://api.github.com/repos/mfojtik/origin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mfojtik/origin/downloads","issues_url":"https://api.github.com/repos/mfojtik/origin/issues{/number}","pulls_url":"https://api.github.com/repos/mfojtik/origin/pulls{/number}","milestones_url":"https://api.github.com/repos/mfojtik/origin/milestones{/number}","notifications_url":"https://api.github.com/repos/mfojtik/origin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mfojtik/origin/labels{/name}","releases_url":"https://api.github.com/repos/mfojtik/origin/releases{/id}","deployments_url":"https://api.github.com/repos/mfojtik/origin/deployments","created_at":"2014-08-14T13:11:47Z","updated_at":"2018-07-16T07:35:36Z","pushed_at":"2018-07-16T07:56:13Z","git_url":"git://github.com/mfojtik/origin.git","ssh_url":"git@github.com:mfojtik/origin.git","clone_url":"https://github.com/mfojtik/origin.git","svn_url":"https://github.com/mfojtik/origin","homepage":"https://openshift.github.io","size":968414,"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":1,"mirror_url":null,"archived":false,"open_issues_count":2,"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":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"openshift:master","ref":"master","sha":"e6e672c8e9b718a932d60a32e4250b8d51675948","user":{"login":"openshift","id":792337,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc5MjMzNw==","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,"node_id":"MDEwOlJlcG9zaXRvcnkyMjQ0MjY2OA==","name":"origin","full_name":"openshift/origin","owner":{"login":"openshift","id":792337,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc5MjMzNw==","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":"2018-07-16T00:56:43Z","pushed_at":"2018-07-16T12:53:56Z","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":923460,"stargazers_count":4780,"watchers_count":4780,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2970,"mirror_url":null,"archived":false,"open_issues_count":635,"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":2970,"open_issues":635,"watchers":4780,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/20019"},"html":{"href":"https://github.com/openshift/origin/pull/20019"},"issue":{"href":"https://api.github.com/repos/openshift/origin/issues/20019"},"comments":{"href":"https://api.github.com/repos/openshift/origin/issues/20019/comments"},"review_comments":{"href":"https://api.github.com/repos/openshift/origin/pulls/20019/comments"},"review_comment":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openshift/origin/pulls/20019/commits"},"statuses":{"href":"https://api.github.com/repos/openshift/origin/statuses/a76a54dd2079515b684036a7391fbd36f34eeb5a"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"mfojtik"}}