{"action":"created","issue":{"url":"https://api.github.com/repos/appc/spec/issues/648","repository_url":"https://api.github.com/repos/appc/spec","labels_url":"https://api.github.com/repos/appc/spec/issues/648/labels{/name}","comments_url":"https://api.github.com/repos/appc/spec/issues/648/comments","events_url":"https://api.github.com/repos/appc/spec/issues/648/events","html_url":"https://github.com/appc/spec/issues/648","id":172013777,"number":648,"title":"Add the ability to create empty dir when the host path doesn't exist in the volume when `kind=host`","user":{"login":"yifan-gu","id":3278588,"avatar_url":"https://avatars.githubusercontent.com/u/3278588?v=3","gravatar_id":"","url":"https://api.github.com/users/yifan-gu","html_url":"https://github.com/yifan-gu","followers_url":"https://api.github.com/users/yifan-gu/followers","following_url":"https://api.github.com/users/yifan-gu/following{/other_user}","gists_url":"https://api.github.com/users/yifan-gu/gists{/gist_id}","starred_url":"https://api.github.com/users/yifan-gu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yifan-gu/subscriptions","organizations_url":"https://api.github.com/users/yifan-gu/orgs","repos_url":"https://api.github.com/users/yifan-gu/repos","events_url":"https://api.github.com/users/yifan-gu/events{/privacy}","received_events_url":"https://api.github.com/users/yifan-gu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-18T22:14:45Z","updated_at":"2016-08-19T12:38:32Z","closed_at":null,"body":"Ref https://github.com/kubernetes/kubernetes/issues/26816\r\n\r\nDocker has the ability to create empty dir for if the hostpath in the volume doesn't exist on the host (`kind=host`), and some kubernetes e2e tests / examples reply on this functionality, so it would be preferable if rkt provides such ability as an option. \r\n\r\nOne way to achieve this is to add an optional boolean in the volume type saying \"Create empty dir if the path doesn't exist\". e.g.\r\n\r\n```go\r\ntype Volume struct {\r\n\tName ACName `json:\"name\"`\r\n\tKind string `json:\"kind\"`\r\n\r\n\t// currently used only by \"host\"\r\n\t// TODO(jonboulle): factor out?\r\n\tSource    string `json:\"source,omitempty\"`\r\n\tReadOnly  *bool  `json:\"readOnly,omitempty\"`\r\n\tRecursive *bool  `json:\"recursive,omitempty\"`\r\n    // Automatically create an empty dir if the path doesn't exist.\r\n    CreateIfNotExisted *bool `json:create,omitempty\"`\r\n\r\n\t// currently used only by \"empty\"\r\n\tMode *string `json:\"mode,omitempty\"`\r\n\tUID  *int    `json:\"uid,omitempty\"`\r\n\tGID  *int    `json:\"gid,omitempty\"`\r\n}\r\n```\r\n\r\ncc @jonboulle @sgotti @iaguis @alban @lucab @s-urbaniak \r\n"},"comment":{"url":"https://api.github.com/repos/appc/spec/issues/comments/241007221","html_url":"https://github.com/appc/spec/issues/648#issuecomment-241007221","issue_url":"https://api.github.com/repos/appc/spec/issues/648","id":241007221,"user":{"login":"jonboulle","id":2601015,"avatar_url":"https://avatars.githubusercontent.com/u/2601015?v=3","gravatar_id":"","url":"https://api.github.com/users/jonboulle","html_url":"https://github.com/jonboulle","followers_url":"https://api.github.com/users/jonboulle/followers","following_url":"https://api.github.com/users/jonboulle/following{/other_user}","gists_url":"https://api.github.com/users/jonboulle/gists{/gist_id}","starred_url":"https://api.github.com/users/jonboulle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonboulle/subscriptions","organizations_url":"https://api.github.com/users/jonboulle/orgs","repos_url":"https://api.github.com/users/jonboulle/repos","events_url":"https://api.github.com/users/jonboulle/events{/privacy}","received_events_url":"https://api.github.com/users/jonboulle/received_events","type":"User","site_admin":false},"created_at":"2016-08-19T12:38:32Z","updated_at":"2016-08-19T12:38:32Z","body":"This seems like an antipattern to me, so I'd rather push back on it in kubernetes. But even if we decide to do it, I think it should be rkt specific, not a general spec thing."}}
{"actor":{"display_login":"jonboulle"}}