{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/73621218","id":73621218,"diff_hunk":"@@ -0,0 +1,77 @@\n+/*\n+Copyright 2016 The Kubernetes Authors.\n+\n+Licensed under the Apache License, Version 2.0 (the \"License\");\n+you may not use this file except in compliance with the License.\n+You may obtain a copy of the License at\n+\n+    http://www.apache.org/licenses/LICENSE-2.0\n+\n+Unless required by applicable law or agreed to in writing, software\n+distributed under the License is distributed on an \"AS IS\" BASIS,\n+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+See the License for the specific language governing permissions and\n+limitations under the License.\n+*/\n+\n+package cmd\n+\n+import (\n+\t\"fmt\"\n+\t\"io\"\n+\n+\t\"github.com/spf13/cobra\"\n+\n+\t\"k8s.io/kubernetes/pkg/kubectl\"\n+\tcmdutil \"k8s.io/kubernetes/pkg/kubectl/cmd/util\"\n+)\n+\n+const (\n+\tdeploymentLong = `\n+Create a deployment with the specified name.`\n+\n+\tdeploymentExample = `  # Create a new deployment named my-dep\n+  kubectl create deployment my-dep --image=busybox`\n+)\n+\n+// NewCmdCreateDeployment is a macro command to create a new deployment\n+func NewCmdCreateDeployment(f *cmdutil.Factory, cmdOut io.Writer) *cobra.Command {\n+\tcmd := &cobra.Command{\n+\t\tUse:     \"deployment NAME --image=image [--dry-run]\",\n+\t\tAliases: []string{\"dep\"},\n+\t\tShort:   \"Create a deployment with the specified name.\",\n+\t\tLong:    deploymentLong,\n+\t\tExample: deploymentExample,\n+\t\tRun: func(cmd *cobra.Command, args []string) {\n+\t\t\terr := CreateDeployment(f, cmdOut, cmd, args)\n+\t\t\tcmdutil.CheckErr(err)\n+\t\t},\n+\t}\n+\tcmdutil.AddApplyAnnotationFlags(cmd)\n+\tcmdutil.AddValidateFlags(cmd)\n+\tcmdutil.AddPrinterFlags(cmd)\n+\tcmdutil.AddGeneratorFlags(cmd, cmdutil.DeploymentBasicV1Beta1GeneratorName)\n+\tcmd.Flags().StringSlice(\"image\", []string{}, \"Image name to run.\")\n+\treturn cmd\n+}\n+\n+// CreateDeployment implements the behavior to run the create deployment command\n+func CreateDeployment(f *cmdutil.Factory, cmdOut io.Writer, cmd *cobra.Command, args []string) error {","path":"pkg/kubectl/cmd/create_deployment.go","position":59,"original_position":59,"commit_id":"771460b7936139d2767d1d50b2f01688a709555b","original_commit_id":"771460b7936139d2767d1d50b2f01688a709555b","user":{"login":"asalkeld","id":420707,"avatar_url":"https://avatars.githubusercontent.com/u/420707?v=3","gravatar_id":"","url":"https://api.github.com/users/asalkeld","html_url":"https://github.com/asalkeld","followers_url":"https://api.github.com/users/asalkeld/followers","following_url":"https://api.github.com/users/asalkeld/following{/other_user}","gists_url":"https://api.github.com/users/asalkeld/gists{/gist_id}","starred_url":"https://api.github.com/users/asalkeld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asalkeld/subscriptions","organizations_url":"https://api.github.com/users/asalkeld/orgs","repos_url":"https://api.github.com/users/asalkeld/repos","events_url":"https://api.github.com/users/asalkeld/events{/privacy}","received_events_url":"https://api.github.com/users/asalkeld/received_events","type":"User","site_admin":false},"body":"OK, I did it a different way - not stressed which one is preferred.","created_at":"2016-08-04T23:34:13Z","updated_at":"2016-08-04T23:34:13Z","html_url":"https://github.com/kubernetes/kubernetes/pull/27109#discussion_r73621218","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/27109","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/73621218"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/27109#discussion_r73621218"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/27109"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/27109","id":73151509,"html_url":"https://github.com/kubernetes/kubernetes/pull/27109","diff_url":"https://github.com/kubernetes/kubernetes/pull/27109.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/27109.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/27109","number":27109,"state":"open","locked":false,"title":"Add service and deployment create sub-commands to kubectl","user":{"login":"asalkeld","id":420707,"avatar_url":"https://avatars.githubusercontent.com/u/420707?v=3","gravatar_id":"","url":"https://api.github.com/users/asalkeld","html_url":"https://github.com/asalkeld","followers_url":"https://api.github.com/users/asalkeld/followers","following_url":"https://api.github.com/users/asalkeld/following{/other_user}","gists_url":"https://api.github.com/users/asalkeld/gists{/gist_id}","starred_url":"https://api.github.com/users/asalkeld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asalkeld/subscriptions","organizations_url":"https://api.github.com/users/asalkeld/orgs","repos_url":"https://api.github.com/users/asalkeld/repos","events_url":"https://api.github.com/users/asalkeld/events{/privacy}","received_events_url":"https://api.github.com/users/asalkeld/received_events","type":"User","site_admin":false},"body":"```release-note\r\nAdded new commands kubectl create service & kubectl create deployment\r\n```\r\nPartial #25382\r\n","created_at":"2016-06-09T03:03:29Z","updated_at":"2016-08-04T23:34:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6e221c0bf64198e25f481cc86aa17a170c212b65","assignee":{"login":"fabianofranz","id":158611,"avatar_url":"https://avatars.githubusercontent.com/u/158611?v=3","gravatar_id":"","url":"https://api.github.com/users/fabianofranz","html_url":"https://github.com/fabianofranz","followers_url":"https://api.github.com/users/fabianofranz/followers","following_url":"https://api.github.com/users/fabianofranz/following{/other_user}","gists_url":"https://api.github.com/users/fabianofranz/gists{/gist_id}","starred_url":"https://api.github.com/users/fabianofranz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabianofranz/subscriptions","organizations_url":"https://api.github.com/users/fabianofranz/orgs","repos_url":"https://api.github.com/users/fabianofranz/repos","events_url":"https://api.github.com/users/fabianofranz/events{/privacy}","received_events_url":"https://api.github.com/users/fabianofranz/received_events","type":"User","site_admin":false},"assignees":[{"login":"fabianofranz","id":158611,"avatar_url":"https://avatars.githubusercontent.com/u/158611?v=3","gravatar_id":"","url":"https://api.github.com/users/fabianofranz","html_url":"https://github.com/fabianofranz","followers_url":"https://api.github.com/users/fabianofranz/followers","following_url":"https://api.github.com/users/fabianofranz/following{/other_user}","gists_url":"https://api.github.com/users/fabianofranz/gists{/gist_id}","starred_url":"https://api.github.com/users/fabianofranz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabianofranz/subscriptions","organizations_url":"https://api.github.com/users/fabianofranz/orgs","repos_url":"https://api.github.com/users/fabianofranz/repos","events_url":"https://api.github.com/users/fabianofranz/events{/privacy}","received_events_url":"https://api.github.com/users/fabianofranz/received_events","type":"User","site_admin":false},{"login":"smarterclayton","id":1163175,"avatar_url":"https://avatars.githubusercontent.com/u/1163175?v=3","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}],"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/27109/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/27109/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/27109/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/771460b7936139d2767d1d50b2f01688a709555b","head":{"label":"asalkeld:more-create-commands","ref":"more-create-commands","sha":"771460b7936139d2767d1d50b2f01688a709555b","user":{"login":"asalkeld","id":420707,"avatar_url":"https://avatars.githubusercontent.com/u/420707?v=3","gravatar_id":"","url":"https://api.github.com/users/asalkeld","html_url":"https://github.com/asalkeld","followers_url":"https://api.github.com/users/asalkeld/followers","following_url":"https://api.github.com/users/asalkeld/following{/other_user}","gists_url":"https://api.github.com/users/asalkeld/gists{/gist_id}","starred_url":"https://api.github.com/users/asalkeld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asalkeld/subscriptions","organizations_url":"https://api.github.com/users/asalkeld/orgs","repos_url":"https://api.github.com/users/asalkeld/repos","events_url":"https://api.github.com/users/asalkeld/events{/privacy}","received_events_url":"https://api.github.com/users/asalkeld/received_events","type":"User","site_admin":false},"repo":{"id":58418755,"name":"kubernetes","full_name":"asalkeld/kubernetes","owner":{"login":"asalkeld","id":420707,"avatar_url":"https://avatars.githubusercontent.com/u/420707?v=3","gravatar_id":"","url":"https://api.github.com/users/asalkeld","html_url":"https://github.com/asalkeld","followers_url":"https://api.github.com/users/asalkeld/followers","following_url":"https://api.github.com/users/asalkeld/following{/other_user}","gists_url":"https://api.github.com/users/asalkeld/gists{/gist_id}","starred_url":"https://api.github.com/users/asalkeld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asalkeld/subscriptions","organizations_url":"https://api.github.com/users/asalkeld/orgs","repos_url":"https://api.github.com/users/asalkeld/repos","events_url":"https://api.github.com/users/asalkeld/events{/privacy}","received_events_url":"https://api.github.com/users/asalkeld/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/asalkeld/kubernetes","description":"Container Cluster Manager from Google","fork":true,"url":"https://api.github.com/repos/asalkeld/kubernetes","forks_url":"https://api.github.com/repos/asalkeld/kubernetes/forks","keys_url":"https://api.github.com/repos/asalkeld/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/asalkeld/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/asalkeld/kubernetes/teams","hooks_url":"https://api.github.com/repos/asalkeld/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/asalkeld/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/asalkeld/kubernetes/events","assignees_url":"https://api.github.com/repos/asalkeld/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/asalkeld/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/asalkeld/kubernetes/tags","blobs_url":"https://api.github.com/repos/asalkeld/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/asalkeld/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/asalkeld/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/asalkeld/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/asalkeld/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/asalkeld/kubernetes/languages","stargazers_url":"https://api.github.com/repos/asalkeld/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/asalkeld/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/asalkeld/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/asalkeld/kubernetes/subscription","commits_url":"https://api.github.com/repos/asalkeld/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/asalkeld/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/asalkeld/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/asalkeld/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/asalkeld/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/asalkeld/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/asalkeld/kubernetes/merges","archive_url":"https://api.github.com/repos/asalkeld/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/asalkeld/kubernetes/downloads","issues_url":"https://api.github.com/repos/asalkeld/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/asalkeld/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/asalkeld/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/asalkeld/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/asalkeld/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/asalkeld/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/asalkeld/kubernetes/deployments","created_at":"2016-05-10T01:04:58Z","updated_at":"2016-05-10T01:05:12Z","pushed_at":"2016-08-04T06:14:00Z","git_url":"git://github.com/asalkeld/kubernetes.git","ssh_url":"git@github.com:asalkeld/kubernetes.git","clone_url":"https://github.com/asalkeld/kubernetes.git","svn_url":"https://github.com/asalkeld/kubernetes","homepage":"http://kubernetes.io","size":300350,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"kubernetes:master","ref":"master","sha":"40b1e20efd5250e4ab3987ca72fecc039ff324a9","user":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"repo":{"id":20580498,"name":"kubernetes","full_name":"kubernetes/kubernetes","owner":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kubernetes/kubernetes","description":"Production-Grade Container Scheduling and Management","fork":false,"url":"https://api.github.com/repos/kubernetes/kubernetes","forks_url":"https://api.github.com/repos/kubernetes/kubernetes/forks","keys_url":"https://api.github.com/repos/kubernetes/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes/kubernetes/teams","hooks_url":"https://api.github.com/repos/kubernetes/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes/kubernetes/events","assignees_url":"https://api.github.com/repos/kubernetes/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes/kubernetes/tags","blobs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes/kubernetes/languages","stargazers_url":"https://api.github.com/repos/kubernetes/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/kubernetes/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/kubernetes/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/kubernetes/kubernetes/subscription","commits_url":"https://api.github.com/repos/kubernetes/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes/kubernetes/merges","archive_url":"https://api.github.com/repos/kubernetes/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes/kubernetes/downloads","issues_url":"https://api.github.com/repos/kubernetes/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/kubernetes/kubernetes/deployments","created_at":"2014-06-06T22:56:04Z","updated_at":"2016-08-04T20:44:08Z","pushed_at":"2016-08-04T23:30:08Z","git_url":"git://github.com/kubernetes/kubernetes.git","ssh_url":"git@github.com:kubernetes/kubernetes.git","clone_url":"https://github.com/kubernetes/kubernetes.git","svn_url":"https://github.com/kubernetes/kubernetes","homepage":"http://kubernetes.io","size":515094,"stargazers_count":15956,"watchers_count":15956,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":5054,"mirror_url":null,"open_issues_count":4088,"forks":5054,"open_issues":4088,"watchers":15956,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/27109"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/27109"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/27109"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/27109/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/27109/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/27109/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/771460b7936139d2767d1d50b2f01688a709555b"}}}}
{"actor":{"display_login":"asalkeld"}}