{"action":"created","issue":{"url":"https://api.github.com/repos/redhat-developer/odo/issues/556","repository_url":"https://api.github.com/repos/redhat-developer/odo","labels_url":"https://api.github.com/repos/redhat-developer/odo/issues/556/labels{/name}","comments_url":"https://api.github.com/repos/redhat-developer/odo/issues/556/comments","events_url":"https://api.github.com/repos/redhat-developer/odo/issues/556/events","html_url":"https://github.com/redhat-developer/odo/issues/556","id":336985626,"node_id":"MDU6SXNzdWUzMzY5ODU2MjY=","number":556,"title":"Use InitContainer to inject SupervisorD to container.","user":{"login":"kadel","id":57206,"node_id":"MDQ6VXNlcjU3MjA2","avatar_url":"https://avatars1.githubusercontent.com/u/57206?v=4","gravatar_id":"","url":"https://api.github.com/users/kadel","html_url":"https://github.com/kadel","followers_url":"https://api.github.com/users/kadel/followers","following_url":"https://api.github.com/users/kadel/following{/other_user}","gists_url":"https://api.github.com/users/kadel/gists{/gist_id}","starred_url":"https://api.github.com/users/kadel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kadel/subscriptions","organizations_url":"https://api.github.com/users/kadel/orgs","repos_url":"https://api.github.com/users/kadel/repos","events_url":"https://api.github.com/users/kadel/events{/privacy}","received_events_url":"https://api.github.com/users/kadel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-06-29T12:46:39Z","updated_at":"2018-06-29T16:58:31Z","closed_at":null,"author_association":"MEMBER","body":"## Problem\r\nRight new we are using BuildConfig and https://github.com/kadel/bootstrap-supervisored-s2i to inject supervisor to s2i image.\r\nThis process is slow and creates unnecessary BuildConfig.\r\n\r\n## Solution\r\nUse initContainer and Go implementation of supervisor (https://github.com/ochinchina/supervisord)\r\n\r\nInitContainer will copy supervisor binary with config file into the shared volume.\r\nThis volume is shared between initContainer and application container.\r\n\r\nYou can see an example of initContainer and volumes  aproach at this small PoC - https://gist.github.com/kadel/35fa7c64c79a845edfe85ada2706019b\r\n\r\nChanges to `BootstrapSupervisoredS2I`\r\n - BuildConfig is no longer needed.\r\n - DeploymentConfig should have new emptyDir volume (supervisor volume) that is mounted to the \"application container\"\r\n - add second initContainer with mounted supervisor volume \r\n     - new InitContainer will just copy all necessary files like supervisor binary, config files and other helper scripts into the supervisor volume\r\n \r\nTo start Supervisor config file should have one record similarly how we are doing it currently - https://github.com/kadel/bootstrap-supervisored-s2i/blob/master/configs/supervisord.d/run.conf\r\nWe will add more later on.\r\n\r\nScript that triggers assemble and restats application after `odo push` will have to be updated.\r\n\r\nChange will inpact local and binary components, git component will remain the same (with BuildConfig).\r\n"},"comment":{"url":"https://api.github.com/repos/redhat-developer/odo/issues/comments/401413913","html_url":"https://github.com/redhat-developer/odo/issues/556#issuecomment-401413913","issue_url":"https://api.github.com/repos/redhat-developer/odo/issues/556","id":401413913,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMTQxMzkxMw==","user":{"login":"cmoulliard","id":463790,"node_id":"MDQ6VXNlcjQ2Mzc5MA==","avatar_url":"https://avatars2.githubusercontent.com/u/463790?v=4","gravatar_id":"","url":"https://api.github.com/users/cmoulliard","html_url":"https://github.com/cmoulliard","followers_url":"https://api.github.com/users/cmoulliard/followers","following_url":"https://api.github.com/users/cmoulliard/following{/other_user}","gists_url":"https://api.github.com/users/cmoulliard/gists{/gist_id}","starred_url":"https://api.github.com/users/cmoulliard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmoulliard/subscriptions","organizations_url":"https://api.github.com/users/cmoulliard/orgs","repos_url":"https://api.github.com/users/cmoulliard/repos","events_url":"https://api.github.com/users/cmoulliard/events{/privacy}","received_events_url":"https://api.github.com/users/cmoulliard/received_events","type":"User","site_admin":false},"created_at":"2018-06-29T16:58:31Z","updated_at":"2018-06-29T16:58:31Z","author_association":"NONE","body":"> DeploymentConfig\r\n\r\nModifications to be done are available [here](https://github.com/cmoulliard/k8s-supervisor/blob/master/odo.go#L91-L137)"}}
{"actor":{"display_login":"cmoulliard"}}