{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/24533","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/24533/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/24533/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/24533/events","html_url":"https://github.com/kubernetes/kubernetes/issues/24533","id":149809903,"number":24533,"title":"`kubectl run --restart=Never` restarts (creates a Job)","user":{"login":"thockin","id":5595220,"avatar_url":"https://avatars.githubusercontent.com/u/5595220?v=3","gravatar_id":"","url":"https://api.github.com/users/thockin","html_url":"https://github.com/thockin","followers_url":"https://api.github.com/users/thockin/followers","following_url":"https://api.github.com/users/thockin/following{/other_user}","gists_url":"https://api.github.com/users/thockin/gists{/gist_id}","starred_url":"https://api.github.com/users/thockin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thockin/subscriptions","organizations_url":"https://api.github.com/users/thockin/orgs","repos_url":"https://api.github.com/users/thockin/repos","events_url":"https://api.github.com/users/thockin/events{/privacy}","received_events_url":"https://api.github.com/users/thockin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/component/kubectl","name":"component/kubectl","color":"0052cc"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/help-wanted","name":"help-wanted","color":"006b75"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/priority/P2","name":"priority/P2","color":"fbca04"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/team/ux","name":"team/ux","color":"d2b48c"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/kubernetes/kubernetes/milestones/18","html_url":"https://github.com/kubernetes/kubernetes/milestones/v1.3","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/milestones/18/labels","id":1638460,"number":18,"title":"v1.3","description":"https://github.com/kubernetes/kubernetes/wiki/Release-1.3","creator":{"login":"bgrant0607","id":7725777,"avatar_url":"https://avatars.githubusercontent.com/u/7725777?v=3","gravatar_id":"","url":"https://api.github.com/users/bgrant0607","html_url":"https://github.com/bgrant0607","followers_url":"https://api.github.com/users/bgrant0607/followers","following_url":"https://api.github.com/users/bgrant0607/following{/other_user}","gists_url":"https://api.github.com/users/bgrant0607/gists{/gist_id}","starred_url":"https://api.github.com/users/bgrant0607/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgrant0607/subscriptions","organizations_url":"https://api.github.com/users/bgrant0607/orgs","repos_url":"https://api.github.com/users/bgrant0607/repos","events_url":"https://api.github.com/users/bgrant0607/events{/privacy}","received_events_url":"https://api.github.com/users/bgrant0607/received_events","type":"User","site_admin":false},"open_issues":174,"closed_issues":29,"state":"open","created_at":"2016-03-11T07:40:20Z","updated_at":"2016-04-28T02:05:31Z","due_on":"2016-06-24T07:00:00Z","closed_at":null},"comments":26,"created_at":"2016-04-20T15:51:45Z","updated_at":"2016-04-28T07:24:52Z","closed_at":null,"body":"What do we think should happen here:\r\n```\r\nkubectl run should-run-once --image=busybox --restart=Never -- exit 1\r\n```\r\n\r\nI would expect this to run once and then never retry.  What happens is that we create a Job with a PodTemplate that says `restartPolicy: Never` and then the Job itself happily restarts the Pod (well, recreates it).  So it appears we no longer have a way to express \"really, just run once\" through `kubectl run`?  That doesn't seem right - I feel like I am missing something...\r\n\r\n@erictune @janetkuo \r\n"},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/215333854","html_url":"https://github.com/kubernetes/kubernetes/issues/24533#issuecomment-215333854","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/24533","id":215333854,"user":{"login":"soltysh","id":576341,"avatar_url":"https://avatars.githubusercontent.com/u/576341?v=3","gravatar_id":"","url":"https://api.github.com/users/soltysh","html_url":"https://github.com/soltysh","followers_url":"https://api.github.com/users/soltysh/followers","following_url":"https://api.github.com/users/soltysh/following{/other_user}","gists_url":"https://api.github.com/users/soltysh/gists{/gist_id}","starred_url":"https://api.github.com/users/soltysh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soltysh/subscriptions","organizations_url":"https://api.github.com/users/soltysh/orgs","repos_url":"https://api.github.com/users/soltysh/repos","events_url":"https://api.github.com/users/soltysh/events{/privacy}","received_events_url":"https://api.github.com/users/soltysh/received_events","type":"User","site_admin":false},"created_at":"2016-04-28T07:24:52Z","updated_at":"2016-04-28T07:24:52Z","body":"> run behavior is unintuitive, but apparently so is the current Job behavior\r\n\r\nFrankly I've got used to how jobs are working right now and the fact that the controller always tries hard to reached desired completions makes sense. In that case I'd say change run and leave jobs as is. So I totally agree with others in that regard."}}