{"action":"created","comment":{"url":"https://api.github.com/repos/openshift/origin/pulls/comments/27501393","id":27501393,"diff_hunk":"@@ -0,0 +1,47 @@\n+package bundlesecret\n+\n+import (\n+\t\"encoding/base64\"\n+\t\"flag\"\n+\t\"fmt\"\n+\t\"github.com/GoogleCloudPlatform/kubernetes/pkg/util\"\n+\t\"github.com/openshift/origin/pkg/cmd/util/clientcmd\"\n+\t\"github.com/spf13/cobra\"\n+\t\"io\"\n+\t\"io/ioutil\"\n+\t\"os\"\n+\t\"path/filepath\"\n+)\n+\n+// NewCmdBundleSecret creates a new bunde-secret command. The bundle-secret command will walk a given directory\n+// and load its filenames into kubernetes secret keys with values that are base64 encoded\n+func NewCmdBundleSecret(f *clientcmd.Factory, parentName, name string, out io.Writer) *cobra.Command {\n+\tcmd := &cobra.Command{\n+\t\tUse:   \"bundle-secret\",\n+\t\tShort: \"bundle data from an OpenShift dir to load kubernetes secret\",\n+\t\tLong:  \"bundle data from an OpenShift dir to load kubernetes secret\",\n+\t\tRun: func(cmd *cobra.Command, args []string) {\n+\t\t\t//need to handle errors with certidir\n+\t\t\tcertdir := flag.Arg(0)\n+\t\t\tfilepath.Walk(certdir, walkpath)\n+\t\t},\n+\t}\n+\treturn cmd\n+}\n+\n+func walkpath(path string, info os.FileInfo, err error) error {","path":"pkg/cmd/experimental/bundlesecret/bundle-secret.go","position":32,"original_position":32,"commit_id":"46c9e2b9f949b40d5b38717284231a73a2ea28f0","original_commit_id":"46c9e2b9f949b40d5b38717284231a73a2ea28f0","user":{"login":"derekwaynecarr","id":6233452,"avatar_url":"https://avatars.githubusercontent.com/u/6233452?v=3","gravatar_id":"","url":"https://api.github.com/users/derekwaynecarr","html_url":"https://github.com/derekwaynecarr","followers_url":"https://api.github.com/users/derekwaynecarr/followers","following_url":"https://api.github.com/users/derekwaynecarr/following{/other_user}","gists_url":"https://api.github.com/users/derekwaynecarr/gists{/gist_id}","starred_url":"https://api.github.com/users/derekwaynecarr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/derekwaynecarr/subscriptions","organizations_url":"https://api.github.com/users/derekwaynecarr/orgs","repos_url":"https://api.github.com/users/derekwaynecarr/repos","events_url":"https://api.github.com/users/derekwaynecarr/events{/privacy}","received_events_url":"https://api.github.com/users/derekwaynecarr/received_events","type":"User","site_admin":false},"body":"walkpath recurses the entire subtree, we only want to do first level children right now.  it looks like you can return a special case SkipDir value to prevent it from recursing, we should look to do that.\r\n\r\nalso from a naming convention, it should be walkPath","created_at":"2015-03-31T17:23:16Z","updated_at":"2015-03-31T17:23:16Z","html_url":"https://github.com/openshift/origin/pull/1518#discussion_r27501393","pull_request_url":"https://api.github.com/repos/openshift/origin/pulls/1518","_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments/27501393"},"html":{"href":"https://github.com/openshift/origin/pull/1518#discussion_r27501393"},"pull_request":{"href":"https://api.github.com/repos/openshift/origin/pulls/1518"}}},"pull_request":{"url":"https://api.github.com/repos/openshift/origin/pulls/1518","id":32337229,"html_url":"https://github.com/openshift/origin/pull/1518","diff_url":"https://github.com/openshift/origin/pull/1518.diff","patch_url":"https://github.com/openshift/origin/pull/1518.patch","issue_url":"https://api.github.com/repos/openshift/origin/issues/1518","number":1518,"state":"open","locked":false,"title":"WIP: bundle-secret cmd","user":{"login":"sallyom","id":11166065,"avatar_url":"https://avatars.githubusercontent.com/u/11166065?v=3","gravatar_id":"","url":"https://api.github.com/users/sallyom","html_url":"https://github.com/sallyom","followers_url":"https://api.github.com/users/sallyom/followers","following_url":"https://api.github.com/users/sallyom/following{/other_user}","gists_url":"https://api.github.com/users/sallyom/gists{/gist_id}","starred_url":"https://api.github.com/users/sallyom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sallyom/subscriptions","organizations_url":"https://api.github.com/users/sallyom/orgs","repos_url":"https://api.github.com/users/sallyom/repos","events_url":"https://api.github.com/users/sallyom/events{/privacy}","received_events_url":"https://api.github.com/users/sallyom/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-03-31T16:00:18Z","updated_at":"2015-03-31T17:23:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"557b55392d881214cf9bb9ce945c0f92bf8c850d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openshift/origin/pulls/1518/commits","review_comments_url":"https://api.github.com/repos/openshift/origin/pulls/1518/comments","review_comment_url":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openshift/origin/issues/1518/comments","statuses_url":"https://api.github.com/repos/openshift/origin/statuses/46c9e2b9f949b40d5b38717284231a73a2ea28f0","head":{"label":"sallyom:bundle_secret","ref":"bundle_secret","sha":"46c9e2b9f949b40d5b38717284231a73a2ea28f0","user":{"login":"sallyom","id":11166065,"avatar_url":"https://avatars.githubusercontent.com/u/11166065?v=3","gravatar_id":"","url":"https://api.github.com/users/sallyom","html_url":"https://github.com/sallyom","followers_url":"https://api.github.com/users/sallyom/followers","following_url":"https://api.github.com/users/sallyom/following{/other_user}","gists_url":"https://api.github.com/users/sallyom/gists{/gist_id}","starred_url":"https://api.github.com/users/sallyom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sallyom/subscriptions","organizations_url":"https://api.github.com/users/sallyom/orgs","repos_url":"https://api.github.com/users/sallyom/repos","events_url":"https://api.github.com/users/sallyom/events{/privacy}","received_events_url":"https://api.github.com/users/sallyom/received_events","type":"User","site_admin":false},"repo":{"id":31256674,"name":"origin","full_name":"sallyom/origin","owner":{"login":"sallyom","id":11166065,"avatar_url":"https://avatars.githubusercontent.com/u/11166065?v=3","gravatar_id":"","url":"https://api.github.com/users/sallyom","html_url":"https://github.com/sallyom","followers_url":"https://api.github.com/users/sallyom/followers","following_url":"https://api.github.com/users/sallyom/following{/other_user}","gists_url":"https://api.github.com/users/sallyom/gists{/gist_id}","starred_url":"https://api.github.com/users/sallyom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sallyom/subscriptions","organizations_url":"https://api.github.com/users/sallyom/orgs","repos_url":"https://api.github.com/users/sallyom/repos","events_url":"https://api.github.com/users/sallyom/events{/privacy}","received_events_url":"https://api.github.com/users/sallyom/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sallyom/origin","description":"OpenShift 3 - build, deploy, and manage your applications with Docker and Kubernetes","fork":true,"url":"https://api.github.com/repos/sallyom/origin","forks_url":"https://api.github.com/repos/sallyom/origin/forks","keys_url":"https://api.github.com/repos/sallyom/origin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sallyom/origin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sallyom/origin/teams","hooks_url":"https://api.github.com/repos/sallyom/origin/hooks","issue_events_url":"https://api.github.com/repos/sallyom/origin/issues/events{/number}","events_url":"https://api.github.com/repos/sallyom/origin/events","assignees_url":"https://api.github.com/repos/sallyom/origin/assignees{/user}","branches_url":"https://api.github.com/repos/sallyom/origin/branches{/branch}","tags_url":"https://api.github.com/repos/sallyom/origin/tags","blobs_url":"https://api.github.com/repos/sallyom/origin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sallyom/origin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sallyom/origin/git/refs{/sha}","trees_url":"https://api.github.com/repos/sallyom/origin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sallyom/origin/statuses/{sha}","languages_url":"https://api.github.com/repos/sallyom/origin/languages","stargazers_url":"https://api.github.com/repos/sallyom/origin/stargazers","contributors_url":"https://api.github.com/repos/sallyom/origin/contributors","subscribers_url":"https://api.github.com/repos/sallyom/origin/subscribers","subscription_url":"https://api.github.com/repos/sallyom/origin/subscription","commits_url":"https://api.github.com/repos/sallyom/origin/commits{/sha}","git_commits_url":"https://api.github.com/repos/sallyom/origin/git/commits{/sha}","comments_url":"https://api.github.com/repos/sallyom/origin/comments{/number}","issue_comment_url":"https://api.github.com/repos/sallyom/origin/issues/comments{/number}","contents_url":"https://api.github.com/repos/sallyom/origin/contents/{+path}","compare_url":"https://api.github.com/repos/sallyom/origin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sallyom/origin/merges","archive_url":"https://api.github.com/repos/sallyom/origin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sallyom/origin/downloads","issues_url":"https://api.github.com/repos/sallyom/origin/issues{/number}","pulls_url":"https://api.github.com/repos/sallyom/origin/pulls{/number}","milestones_url":"https://api.github.com/repos/sallyom/origin/milestones{/number}","notifications_url":"https://api.github.com/repos/sallyom/origin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sallyom/origin/labels{/name}","releases_url":"https://api.github.com/repos/sallyom/origin/releases{/id}","created_at":"2015-02-24T11:14:44Z","updated_at":"2015-03-31T13:29:33Z","pushed_at":"2015-03-31T15:33:39Z","git_url":"git://github.com/sallyom/origin.git","ssh_url":"git@github.com:sallyom/origin.git","clone_url":"https://github.com/sallyom/origin.git","svn_url":"https://github.com/sallyom/origin","homepage":"https://openshift.github.io","size":59433,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"openshift:master","ref":"master","sha":"9f059d738d921f111fe9fb614c64c0e76b9a5bce","user":{"login":"openshift","id":792337,"avatar_url":"https://avatars.githubusercontent.com/u/792337?v=3","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://avatars.githubusercontent.com/u/792337?v=3","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":"OpenShift 3 - build, deploy, and manage your applications with Docker and Kubernetes","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}","created_at":"2014-07-30T20:04:05Z","updated_at":"2015-03-31T17:19:09Z","pushed_at":"2015-03-31T17:07:58Z","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":90308,"stargazers_count":342,"watchers_count":342,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":180,"mirror_url":null,"open_issues_count":155,"forks":180,"open_issues":155,"watchers":342,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/1518"},"html":{"href":"https://github.com/openshift/origin/pull/1518"},"issue":{"href":"https://api.github.com/repos/openshift/origin/issues/1518"},"comments":{"href":"https://api.github.com/repos/openshift/origin/issues/1518/comments"},"review_comments":{"href":"https://api.github.com/repos/openshift/origin/pulls/1518/comments"},"review_comment":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openshift/origin/pulls/1518/commits"},"statuses":{"href":"https://api.github.com/repos/openshift/origin/statuses/46c9e2b9f949b40d5b38717284231a73a2ea28f0"}}}}