GitHub PullRequestReviewCommentEvent at 2014-09-04 05:47:38
Repository: kubernetes
Actor: thockin
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/17096597","id":17096597,"diff_hunk":"@@ -0,0 +1,91 @@\n+/*\n+Copyright 2014 Google Inc. All rights reserved.\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 kubelet\n+\n+import (\n+\t\"fmt\"\n+\t\"net\"\n+\t\"strconv\"\n+\n+\t\"github.com/GoogleCloudPlatform/kubernetes/pkg/api\"\n+\t\"github.com/GoogleCloudPlatform/kubernetes/pkg/util\"\n+\t\"github.com/golang/glog\"\n+)\n+\n+type execActionHandler struct {\n+\tkubelet *Kubelet\n+}\n+\n+func (e *execActionHandler) Run(podFullName string, container *api.Container, handler *api.Handler) error {\n+\t_, err := e.kubelet.RunInContainer(podFullName, container.Name, handler.Exec.Command)\n+\treturn err\n+}\n+\n+type httpActionHandler struct {\n+\tkubelet *Kubelet\n+\tclient  httpGetInterface\n+}\n+\n+// ResolvePort attempts to turn a IntOrString port reference into a concrete port number.\n+// If portReference has an int value, it is treated as a literal, and simply returns that value.\n+// If portReference is a string, an attempt is made to find a port with the same name in the container spec.\n+// If a port with the same name is found, it's ContainerPort value is returned.  If no matching\n+// port is found, an error is returned.\n+func ResolvePort(portReference util.IntOrString, container *api.Container) (int, error) {\n+\tif portReference.Kind == util.IntstrInt {\n+\t\treturn portReference.IntVal, nil\n+\t} else {\n+\t\tportName := portReference.StrVal\n+\t\tfor _, portSpec := range container.Ports {\n+\t\t\tif portSpec.Name == portName {\n+\t\t\t\treturn portSpec.ContainerPort, nil\n+\t\t\t}\n+\t\t}","path":"pkg/kubelet/handlers.go","position":57,"original_position":57,"commit_id":"7b338b55631ee4391b0960a63afb9756c0249e8c","original_commit_id":"7b338b55631ee4391b0960a63afb9756c0249e8c","user":{"login":"thockin","id":5595220,"avatar_url":"https://avatars.githubusercontent.com/u/5595220?v=2","gravatar_id":"6ae5ac8e0b7147021a4eaa2b9535f58d","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},"body":"In health code we have a last ditch effort to Atoi() the strval and see if it was a number stored as a string.  Do we want that here?","created_at":"2014-09-04T05:47:38Z","updated_at":"2014-09-04T05:47:38Z","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/1156#discussion_r17096597","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/1156","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/17096597"},"html":{"href":"https://github.com/GoogleCloudPlatform/kubernetes/pull/1156#discussion_r17096597"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/1156"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/1156","id":20704435,"html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/1156","diff_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/1156.diff","patch_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/1156.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/1156","number":1156,"state":"open","locked":false,"title":"Add support for the PostStart event handler.","user":{"login":"brendandburns","id":5751682,"avatar_url":"https://avatars.githubusercontent.com/u/5751682?v=2","gravatar_id":"c2ff012ca59db545fb777ea41917504c","url":"https://api.github.com/users/brendandburns","html_url":"https://github.com/brendandburns","followers_url":"https://api.github.com/users/brendandburns/followers","following_url":"https://api.github.com/users/brendandburns/following{/other_user}","gists_url":"https://api.github.com/users/brendandburns/gists{/gist_id}","starred_url":"https://api.github.com/users/brendandburns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendandburns/subscriptions","organizations_url":"https://api.github.com/users/brendandburns/orgs","repos_url":"https://api.github.com/users/brendandburns/repos","events_url":"https://api.github.com/users/brendandburns/events{/privacy}","received_events_url":"https://api.github.com/users/brendandburns/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-09-03T20:41:43Z","updated_at":"2014-09-04T05:47:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e3d5f4a9367fb2ecc8df8fc84b12f5251d9d9ffe","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/1156/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/1156/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/{number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/1156/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/7b338b55631ee4391b0960a63afb9756c0249e8c","head":{"label":"brendandburns:api","ref":"api","sha":"7b338b55631ee4391b0960a63afb9756c0249e8c","user":{"login":"brendandburns","id":5751682,"avatar_url":"https://avatars.githubusercontent.com/u/5751682?v=2","gravatar_id":"c2ff012ca59db545fb777ea41917504c","url":"https://api.github.com/users/brendandburns","html_url":"https://github.com/brendandburns","followers_url":"https://api.github.com/users/brendandburns/followers","following_url":"https://api.github.com/users/brendandburns/following{/other_user}","gists_url":"https://api.github.com/users/brendandburns/gists{/gist_id}","starred_url":"https://api.github.com/users/brendandburns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendandburns/subscriptions","organizations_url":"https://api.github.com/users/brendandburns/orgs","repos_url":"https://api.github.com/users/brendandburns/repos","events_url":"https://api.github.com/users/brendandburns/events{/privacy}","received_events_url":"https://api.github.com/users/brendandburns/received_events","type":"User","site_admin":false},"repo":{"id":20748715,"name":"kubernetes","full_name":"brendandburns/kubernetes","owner":{"login":"brendandburns","id":5751682,"avatar_url":"https://avatars.githubusercontent.com/u/5751682?v=2","gravatar_id":"c2ff012ca59db545fb777ea41917504c","url":"https://api.github.com/users/brendandburns","html_url":"https://github.com/brendandburns","followers_url":"https://api.github.com/users/brendandburns/followers","following_url":"https://api.github.com/users/brendandburns/following{/other_user}","gists_url":"https://api.github.com/users/brendandburns/gists{/gist_id}","starred_url":"https://api.github.com/users/brendandburns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendandburns/subscriptions","organizations_url":"https://api.github.com/users/brendandburns/orgs","repos_url":"https://api.github.com/users/brendandburns/repos","events_url":"https://api.github.com/users/brendandburns/events{/privacy}","received_events_url":"https://api.github.com/users/brendandburns/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/brendandburns/kubernetes","description":"Container Cluster Manager","fork":true,"url":"https://api.github.com/repos/brendandburns/kubernetes","forks_url":"https://api.github.com/repos/brendandburns/kubernetes/forks","keys_url":"https://api.github.com/repos/brendandburns/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/brendandburns/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/brendandburns/kubernetes/teams","hooks_url":"https://api.github.com/repos/brendandburns/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/brendandburns/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/brendandburns/kubernetes/events","assignees_url":"https://api.github.com/repos/brendandburns/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/brendandburns/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/brendandburns/kubernetes/tags","blobs_url":"https://api.github.com/repos/brendandburns/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/brendandburns/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/brendandburns/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/brendandburns/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/brendandburns/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/brendandburns/kubernetes/languages","stargazers_url":"https://api.github.com/repos/brendandburns/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/brendandburns/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/brendandburns/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/brendandburns/kubernetes/subscription","commits_url":"https://api.github.com/repos/brendandburns/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/brendandburns/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/brendandburns/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/brendandburns/kubernetes/issues/comments/{number}","contents_url":"https://api.github.com/repos/brendandburns/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/brendandburns/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/brendandburns/kubernetes/merges","archive_url":"https://api.github.com/repos/brendandburns/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/brendandburns/kubernetes/downloads","issues_url":"https://api.github.com/repos/brendandburns/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/brendandburns/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/brendandburns/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/brendandburns/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/brendandburns/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/brendandburns/kubernetes/releases{/id}","created_at":"2014-06-12T00:13:18Z","updated_at":"2014-06-26T17:06:34Z","pushed_at":"2014-09-04T05:21:50Z","git_url":"git://github.com/brendandburns/kubernetes.git","ssh_url":"git@github.com:brendandburns/kubernetes.git","clone_url":"https://github.com/brendandburns/kubernetes.git","svn_url":"https://github.com/brendandburns/kubernetes","homepage":null,"size":13168,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"GoogleCloudPlatform:master","ref":"master","sha":"a70749a4a50908661dfae7e512817342c7f4b9a4","user":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=2","gravatar_id":"3db02c6238c8b1fb844871330744ec5d","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":20580498,"name":"kubernetes","full_name":"GoogleCloudPlatform/kubernetes","owner":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=2","gravatar_id":"3db02c6238c8b1fb844871330744ec5d","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleCloudPlatform/kubernetes","description":"Container Cluster Manager","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/comments/{number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/releases{/id}","created_at":"2014-06-06T22:56:04Z","updated_at":"2014-09-04T04:13:51Z","pushed_at":"2014-09-04T05:42:44Z","git_url":"git://github.com/GoogleCloudPlatform/kubernetes.git","ssh_url":"git@github.com:GoogleCloudPlatform/kubernetes.git","clone_url":"https://github.com/GoogleCloudPlatform/kubernetes.git","svn_url":"https://github.com/GoogleCloudPlatform/kubernetes","homepage":null,"size":26958,"stargazers_count":3391,"watchers_count":3391,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":445,"mirror_url":null,"open_issues_count":182,"forks":445,"open_issues":182,"watchers":3391,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/1156"},"html":{"href":"https://github.com/GoogleCloudPlatform/kubernetes/pull/1156"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/1156"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/1156/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/1156/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/1156/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/7b338b55631ee4391b0960a63afb9756c0249e8c"}}}}