{"action":"created","comment":{"url":"https://api.github.com/repos/redhat-developer/odo/pulls/comments/220674451","pull_request_review_id":159137445,"id":220674451,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMDY3NDQ1MQ==","diff_hunk":"@@ -0,0 +1,281 @@\n+package occlient\n+\n+import (\n+\t\"fmt\"\n+\n+\tappsv1 \"github.com/openshift/api/apps/v1\"\n+\tbuildv1 \"github.com/openshift/api/build/v1\"\n+\tcorev1 \"k8s.io/api/core/v1\"\n+\tmetav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\"\n+)\n+\n+func generateSupervisordDeploymentConfig(commonObjectMeta metav1.ObjectMeta, builderImage string, imageName string, imageTag string, imageNS string, containerPorts []corev1.ContainerPort) appsv1.DeploymentConfig {\n+\n+\t// Generates and deploys a DeploymentConfig with an InitContainer to copy over the SupervisorD binary.\n+\treturn appsv1.DeploymentConfig{\n+\t\tObjectMeta: commonObjectMeta,\n+\t\tSpec: appsv1.DeploymentConfigSpec{\n+\t\t\tReplicas: 1,\n+\t\t\tSelector: map[string]string{\n+\t\t\t\t\"deploymentconfig\": commonObjectMeta.Name,\n+\t\t\t},\n+\t\t\tTemplate: &corev1.PodTemplateSpec{\n+\t\t\t\tObjectMeta: metav1.ObjectMeta{\n+\t\t\t\t\tLabels: map[string]string{\n+\t\t\t\t\t\t\"deploymentconfig\": commonObjectMeta.Name,\n+\t\t\t\t\t},\n+\t\t\t\t\t// https://github.com/redhat-developer/odo/pull/622#issuecomment-413410736\n+\t\t\t\t\tAnnotations: map[string]string{\n+\t\t\t\t\t\t\"alpha.image.policy.openshift.io/resolve-names\": \"*\",\n+\t\t\t\t\t},\n+\t\t\t\t},\n+\t\t\t\tSpec: corev1.PodSpec{\n+\n+\t\t\t\t\t// The application container\n+\t\t\t\t\tContainers: []corev1.Container{\n+\t\t\t\t\t\t{\n+\t\t\t\t\t\t\tImage: builderImage,\n+\t\t\t\t\t\t\tName:  commonObjectMeta.Name,\n+\t\t\t\t\t\t\tPorts: containerPorts,\n+\t\t\t\t\t\t\t// Run the actual supervisord binary that has been mounted into the container\n+\t\t\t\t\t\t\tCommand: []string{\n+\t\t\t\t\t\t\t\t\"/var/lib/supervisord/bin/supervisord\",\n+\t\t\t\t\t\t\t},\n+\t\t\t\t\t\t\t// Using the appropriate configuration file that contains the \"run\" script for the component.\n+\t\t\t\t\t\t\t// either from: /usr/libexec/s2i/assemble or /opt/app-root/src/.s2i/bin/assemble\n+\t\t\t\t\t\t\tArgs: []string{\n+\t\t\t\t\t\t\t\t\"-c\",\n+\t\t\t\t\t\t\t\t\"/var/lib/supervisord/conf/supervisor.conf\",\n+\t\t\t\t\t\t\t},\n+\t\t\t\t\t\t\tVolumeMounts: []corev1.VolumeMount{\n+\t\t\t\t\t\t\t\t{\n+\t\t\t\t\t\t\t\t\tName:      supervisordVolumeName,\n+\t\t\t\t\t\t\t\t\tMountPath: \"/var/lib/supervisord\",\n+\t\t\t\t\t\t\t\t},\n+\t\t\t\t\t\t\t},\n+\t\t\t\t\t\t},\n+\t\t\t\t\t},\n+\n+\t\t\t\t\t// Create a volume that will be shared betwen InitContainer and the applicationContainer\n+\t\t\t\t\t// in order to pass over the SupervisorD binary\n+\t\t\t\t\tVolumes: []corev1.Volume{\n+\t\t\t\t\t\t{\n+\t\t\t\t\t\t\tName: supervisordVolumeName,\n+\t\t\t\t\t\t\tVolumeSource: corev1.VolumeSource{\n+\t\t\t\t\t\t\t\tEmptyDir: &corev1.EmptyDirVolumeSource{},\n+\t\t\t\t\t\t\t},\n+\t\t\t\t\t\t},\n+\t\t\t\t\t},\n+\t\t\t\t},\n+\t\t\t},\n+\t\t\t// We provide triggers to create an ImageStream so that the application container will use the\n+\t\t\t// correct and approriate image that's located internally within the OpenShift commonObjectMeta.Namespace\n+\t\t\tTriggers: []appsv1.DeploymentTriggerPolicy{\n+\t\t\t\t{\n+\t\t\t\t\tType: \"ConfigChange\",\n+\t\t\t\t},\n+\t\t\t\t{\n+\t\t\t\t\tType: \"ImageChange\",\n+\t\t\t\t\tImageChangeParams: &appsv1.DeploymentTriggerImageChangeParams{\n+\t\t\t\t\t\tAutomatic: true,\n+\t\t\t\t\t\tContainerNames: []string{\n+\t\t\t\t\t\t\tcommonObjectMeta.Name,\n+\t\t\t\t\t\t\t\"copy-files-to-volume\", // TODO: change to const value","path":"pkg/occlient/templates.go","position":83,"original_position":83,"commit_id":"aa2d7d1751e2acaa0ad156eea6ea988b7b71dbcb","original_commit_id":"aa2d7d1751e2acaa0ad156eea6ea988b7b71dbcb","user":{"login":"codeclimate[bot]","id":36754821,"node_id":"MDM6Qm90MzY3NTQ4MjE=","avatar_url":"https://avatars0.githubusercontent.com/in/9403?v=4","gravatar_id":"","url":"https://api.github.com/users/codeclimate%5Bbot%5D","html_url":"https://github.com/apps/codeclimate","followers_url":"https://api.github.com/users/codeclimate%5Bbot%5D/followers","following_url":"https://api.github.com/users/codeclimate%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/codeclimate%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/codeclimate%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codeclimate%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/codeclimate%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/codeclimate%5Bbot%5D/repos","events_url":"https://api.github.com/users/codeclimate%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/codeclimate%5Bbot%5D/received_events","type":"Bot","site_admin":false},"body":"TODO found","created_at":"2018-09-26T18:28:37Z","updated_at":"2018-09-26T18:28:37Z","html_url":"https://github.com/redhat-developer/odo/pull/622#discussion_r220674451","pull_request_url":"https://api.github.com/repos/redhat-developer/odo/pulls/622","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/redhat-developer/odo/pulls/comments/220674451"},"html":{"href":"https://github.com/redhat-developer/odo/pull/622#discussion_r220674451"},"pull_request":{"href":"https://api.github.com/repos/redhat-developer/odo/pulls/622"}}},"pull_request":{"url":"https://api.github.com/repos/redhat-developer/odo/pulls/622","id":206781846,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA2NzgxODQ2","html_url":"https://github.com/redhat-developer/odo/pull/622","diff_url":"https://github.com/redhat-developer/odo/pull/622.diff","patch_url":"https://github.com/redhat-developer/odo/pull/622.patch","issue_url":"https://api.github.com/repos/redhat-developer/odo/issues/622","number":622,"state":"open","locked":false,"title":"SupervisorD Go binary implementation","user":{"login":"cdrage","id":6422176,"node_id":"MDQ6VXNlcjY0MjIxNzY=","avatar_url":"https://avatars1.githubusercontent.com/u/6422176?v=4","gravatar_id":"","url":"https://api.github.com/users/cdrage","html_url":"https://github.com/cdrage","followers_url":"https://api.github.com/users/cdrage/followers","following_url":"https://api.github.com/users/cdrage/following{/other_user}","gists_url":"https://api.github.com/users/cdrage/gists{/gist_id}","starred_url":"https://api.github.com/users/cdrage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdrage/subscriptions","organizations_url":"https://api.github.com/users/cdrage/orgs","repos_url":"https://api.github.com/users/cdrage/repos","events_url":"https://api.github.com/users/cdrage/events{/privacy}","received_events_url":"https://api.github.com/users/cdrage/received_events","type":"User","site_admin":false},"body":"WIP\r\n\r\n#556","created_at":"2018-08-07T18:06:51Z","updated_at":"2018-09-26T18:28:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fc0c26575e68d26a5c22e55d4105b4fed1ca3ad1","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":844025731,"node_id":"MDU6TGFiZWw4NDQwMjU3MzE=","url":"https://api.github.com/repos/redhat-developer/odo/labels/work%20in%20progress","name":"work in progress","color":"8af2ca","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/redhat-developer/odo/pulls/622/commits","review_comments_url":"https://api.github.com/repos/redhat-developer/odo/pulls/622/comments","review_comment_url":"https://api.github.com/repos/redhat-developer/odo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/redhat-developer/odo/issues/622/comments","statuses_url":"https://api.github.com/repos/redhat-developer/odo/statuses/aa2d7d1751e2acaa0ad156eea6ea988b7b71dbcb","head":{"label":"cdrage:implement-supervisord","ref":"implement-supervisord","sha":"aa2d7d1751e2acaa0ad156eea6ea988b7b71dbcb","user":{"login":"cdrage","id":6422176,"node_id":"MDQ6VXNlcjY0MjIxNzY=","avatar_url":"https://avatars1.githubusercontent.com/u/6422176?v=4","gravatar_id":"","url":"https://api.github.com/users/cdrage","html_url":"https://github.com/cdrage","followers_url":"https://api.github.com/users/cdrage/followers","following_url":"https://api.github.com/users/cdrage/following{/other_user}","gists_url":"https://api.github.com/users/cdrage/gists{/gist_id}","starred_url":"https://api.github.com/users/cdrage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdrage/subscriptions","organizations_url":"https://api.github.com/users/cdrage/orgs","repos_url":"https://api.github.com/users/cdrage/repos","events_url":"https://api.github.com/users/cdrage/events{/privacy}","received_events_url":"https://api.github.com/users/cdrage/received_events","type":"User","site_admin":false},"repo":{"id":126372930,"node_id":"MDEwOlJlcG9zaXRvcnkxMjYzNzI5MzA=","name":"odo","full_name":"cdrage/odo","private":false,"owner":{"login":"cdrage","id":6422176,"node_id":"MDQ6VXNlcjY0MjIxNzY=","avatar_url":"https://avatars1.githubusercontent.com/u/6422176?v=4","gravatar_id":"","url":"https://api.github.com/users/cdrage","html_url":"https://github.com/cdrage","followers_url":"https://api.github.com/users/cdrage/followers","following_url":"https://api.github.com/users/cdrage/following{/other_user}","gists_url":"https://api.github.com/users/cdrage/gists{/gist_id}","starred_url":"https://api.github.com/users/cdrage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdrage/subscriptions","organizations_url":"https://api.github.com/users/cdrage/orgs","repos_url":"https://api.github.com/users/cdrage/repos","events_url":"https://api.github.com/users/cdrage/events{/privacy}","received_events_url":"https://api.github.com/users/cdrage/received_events","type":"User","site_admin":false},"html_url":"https://github.com/cdrage/odo","description":"OpenShift Command line for Developers","fork":true,"url":"https://api.github.com/repos/cdrage/odo","forks_url":"https://api.github.com/repos/cdrage/odo/forks","keys_url":"https://api.github.com/repos/cdrage/odo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cdrage/odo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cdrage/odo/teams","hooks_url":"https://api.github.com/repos/cdrage/odo/hooks","issue_events_url":"https://api.github.com/repos/cdrage/odo/issues/events{/number}","events_url":"https://api.github.com/repos/cdrage/odo/events","assignees_url":"https://api.github.com/repos/cdrage/odo/assignees{/user}","branches_url":"https://api.github.com/repos/cdrage/odo/branches{/branch}","tags_url":"https://api.github.com/repos/cdrage/odo/tags","blobs_url":"https://api.github.com/repos/cdrage/odo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cdrage/odo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cdrage/odo/git/refs{/sha}","trees_url":"https://api.github.com/repos/cdrage/odo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cdrage/odo/statuses/{sha}","languages_url":"https://api.github.com/repos/cdrage/odo/languages","stargazers_url":"https://api.github.com/repos/cdrage/odo/stargazers","contributors_url":"https://api.github.com/repos/cdrage/odo/contributors","subscribers_url":"https://api.github.com/repos/cdrage/odo/subscribers","subscription_url":"https://api.github.com/repos/cdrage/odo/subscription","commits_url":"https://api.github.com/repos/cdrage/odo/commits{/sha}","git_commits_url":"https://api.github.com/repos/cdrage/odo/git/commits{/sha}","comments_url":"https://api.github.com/repos/cdrage/odo/comments{/number}","issue_comment_url":"https://api.github.com/repos/cdrage/odo/issues/comments{/number}","contents_url":"https://api.github.com/repos/cdrage/odo/contents/{+path}","compare_url":"https://api.github.com/repos/cdrage/odo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cdrage/odo/merges","archive_url":"https://api.github.com/repos/cdrage/odo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cdrage/odo/downloads","issues_url":"https://api.github.com/repos/cdrage/odo/issues{/number}","pulls_url":"https://api.github.com/repos/cdrage/odo/pulls{/number}","milestones_url":"https://api.github.com/repos/cdrage/odo/milestones{/number}","notifications_url":"https://api.github.com/repos/cdrage/odo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cdrage/odo/labels{/name}","releases_url":"https://api.github.com/repos/cdrage/odo/releases{/id}","deployments_url":"https://api.github.com/repos/cdrage/odo/deployments","created_at":"2018-03-22T17:36:50Z","updated_at":"2018-09-13T13:56:23Z","pushed_at":"2018-09-26T18:28:00Z","git_url":"git://github.com/cdrage/odo.git","ssh_url":"git@github.com:cdrage/odo.git","clone_url":"https://github.com/cdrage/odo.git","svn_url":"https://github.com/cdrage/odo","homepage":"","size":92167,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"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":0,"watchers":0,"default_branch":"master"}},"base":{"label":"redhat-developer:master","ref":"master","sha":"11fcb1b8564db1d2623cc8bd672f09dc5c1d9936","user":{"login":"redhat-developer","id":11033755,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExMDMzNzU1","avatar_url":"https://avatars0.githubusercontent.com/u/11033755?v=4","gravatar_id":"","url":"https://api.github.com/users/redhat-developer","html_url":"https://github.com/redhat-developer","followers_url":"https://api.github.com/users/redhat-developer/followers","following_url":"https://api.github.com/users/redhat-developer/following{/other_user}","gists_url":"https://api.github.com/users/redhat-developer/gists{/gist_id}","starred_url":"https://api.github.com/users/redhat-developer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redhat-developer/subscriptions","organizations_url":"https://api.github.com/users/redhat-developer/orgs","repos_url":"https://api.github.com/users/redhat-developer/repos","events_url":"https://api.github.com/users/redhat-developer/events{/privacy}","received_events_url":"https://api.github.com/users/redhat-developer/received_events","type":"Organization","site_admin":false},"repo":{"id":118630356,"node_id":"MDEwOlJlcG9zaXRvcnkxMTg2MzAzNTY=","name":"odo","full_name":"redhat-developer/odo","private":false,"owner":{"login":"redhat-developer","id":11033755,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExMDMzNzU1","avatar_url":"https://avatars0.githubusercontent.com/u/11033755?v=4","gravatar_id":"","url":"https://api.github.com/users/redhat-developer","html_url":"https://github.com/redhat-developer","followers_url":"https://api.github.com/users/redhat-developer/followers","following_url":"https://api.github.com/users/redhat-developer/following{/other_user}","gists_url":"https://api.github.com/users/redhat-developer/gists{/gist_id}","starred_url":"https://api.github.com/users/redhat-developer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redhat-developer/subscriptions","organizations_url":"https://api.github.com/users/redhat-developer/orgs","repos_url":"https://api.github.com/users/redhat-developer/repos","events_url":"https://api.github.com/users/redhat-developer/events{/privacy}","received_events_url":"https://api.github.com/users/redhat-developer/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/redhat-developer/odo","description":"OpenShift Command line for Developers","fork":false,"url":"https://api.github.com/repos/redhat-developer/odo","forks_url":"https://api.github.com/repos/redhat-developer/odo/forks","keys_url":"https://api.github.com/repos/redhat-developer/odo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/redhat-developer/odo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/redhat-developer/odo/teams","hooks_url":"https://api.github.com/repos/redhat-developer/odo/hooks","issue_events_url":"https://api.github.com/repos/redhat-developer/odo/issues/events{/number}","events_url":"https://api.github.com/repos/redhat-developer/odo/events","assignees_url":"https://api.github.com/repos/redhat-developer/odo/assignees{/user}","branches_url":"https://api.github.com/repos/redhat-developer/odo/branches{/branch}","tags_url":"https://api.github.com/repos/redhat-developer/odo/tags","blobs_url":"https://api.github.com/repos/redhat-developer/odo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/redhat-developer/odo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/redhat-developer/odo/git/refs{/sha}","trees_url":"https://api.github.com/repos/redhat-developer/odo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/redhat-developer/odo/statuses/{sha}","languages_url":"https://api.github.com/repos/redhat-developer/odo/languages","stargazers_url":"https://api.github.com/repos/redhat-developer/odo/stargazers","contributors_url":"https://api.github.com/repos/redhat-developer/odo/contributors","subscribers_url":"https://api.github.com/repos/redhat-developer/odo/subscribers","subscription_url":"https://api.github.com/repos/redhat-developer/odo/subscription","commits_url":"https://api.github.com/repos/redhat-developer/odo/commits{/sha}","git_commits_url":"https://api.github.com/repos/redhat-developer/odo/git/commits{/sha}","comments_url":"https://api.github.com/repos/redhat-developer/odo/comments{/number}","issue_comment_url":"https://api.github.com/repos/redhat-developer/odo/issues/comments{/number}","contents_url":"https://api.github.com/repos/redhat-developer/odo/contents/{+path}","compare_url":"https://api.github.com/repos/redhat-developer/odo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/redhat-developer/odo/merges","archive_url":"https://api.github.com/repos/redhat-developer/odo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/redhat-developer/odo/downloads","issues_url":"https://api.github.com/repos/redhat-developer/odo/issues{/number}","pulls_url":"https://api.github.com/repos/redhat-developer/odo/pulls{/number}","milestones_url":"https://api.github.com/repos/redhat-developer/odo/milestones{/number}","notifications_url":"https://api.github.com/repos/redhat-developer/odo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/redhat-developer/odo/labels{/name}","releases_url":"https://api.github.com/repos/redhat-developer/odo/releases{/id}","deployments_url":"https://api.github.com/repos/redhat-developer/odo/deployments","created_at":"2018-01-23T15:36:17Z","updated_at":"2018-09-26T12:08:29Z","pushed_at":"2018-09-26T18:28:02Z","git_url":"git://github.com/redhat-developer/odo.git","ssh_url":"git@github.com:redhat-developer/odo.git","clone_url":"https://github.com/redhat-developer/odo.git","svn_url":"https://github.com/redhat-developer/odo","homepage":"","size":92153,"stargazers_count":225,"watchers_count":225,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":47,"mirror_url":null,"archived":false,"open_issues_count":146,"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":47,"open_issues":146,"watchers":225,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/redhat-developer/odo/pulls/622"},"html":{"href":"https://github.com/redhat-developer/odo/pull/622"},"issue":{"href":"https://api.github.com/repos/redhat-developer/odo/issues/622"},"comments":{"href":"https://api.github.com/repos/redhat-developer/odo/issues/622/comments"},"review_comments":{"href":"https://api.github.com/repos/redhat-developer/odo/pulls/622/comments"},"review_comment":{"href":"https://api.github.com/repos/redhat-developer/odo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/redhat-developer/odo/pulls/622/commits"},"statuses":{"href":"https://api.github.com/repos/redhat-developer/odo/statuses/aa2d7d1751e2acaa0ad156eea6ea988b7b71dbcb"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"codeclimate"}}