{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/166812397","pull_request_review_id":94933457,"id":166812397,"diff_hunk":"@@ -259,3 +262,13 @@ type HostPathMount struct {\n type KubeProxy struct {\n \tConfig *kubeproxyconfigv1alpha1.KubeProxyConfiguration\n }\n+\n+// AuditPolicyConfiguration holds the options for configuring the api server audit policy.\n+type AuditPolicyConfiguration struct {\n+\t// Path is the local path to an audit policy.\n+\tPath string\n+\t// LogDir is the local pth to the directory where logs should be stored.\n+\tLogDir string\n+\t// LogMaxAge is the number of days logs will be stored for. 0 indicates forever.\n+\tLogMaxAge *int\n+}","path":"cmd/kubeadm/app/apis/kubeadm/types.go","position":23,"original_position":23,"commit_id":"4eaed69eb49ae4ca30708dc884b1b57c6f539c81","original_commit_id":"4eaed69eb49ae4ca30708dc884b1b57c6f539c81","user":{"login":"xiangpengzhao","id":15881573,"avatar_url":"https://avatars0.githubusercontent.com/u/15881573?v=4","gravatar_id":"","url":"https://api.github.com/users/xiangpengzhao","html_url":"https://github.com/xiangpengzhao","followers_url":"https://api.github.com/users/xiangpengzhao/followers","following_url":"https://api.github.com/users/xiangpengzhao/following{/other_user}","gists_url":"https://api.github.com/users/xiangpengzhao/gists{/gist_id}","starred_url":"https://api.github.com/users/xiangpengzhao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiangpengzhao/subscriptions","organizations_url":"https://api.github.com/users/xiangpengzhao/orgs","repos_url":"https://api.github.com/users/xiangpengzhao/repos","events_url":"https://api.github.com/users/xiangpengzhao/events{/privacy}","received_events_url":"https://api.github.com/users/xiangpengzhao/received_events","type":"User","site_admin":false},"body":"Add the same TODO here? i.e., `//TODO(chuckha) add other options for audit policy`","created_at":"2018-02-08T01:46:01Z","updated_at":"2018-02-08T02:01:53Z","html_url":"https://github.com/kubernetes/kubernetes/pull/59067#discussion_r166812397","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/59067","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/166812397"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/59067#discussion_r166812397"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/59067"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/59067","id":166100544,"html_url":"https://github.com/kubernetes/kubernetes/pull/59067","diff_url":"https://github.com/kubernetes/kubernetes/pull/59067.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/59067.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/59067","number":59067,"state":"open","locked":false,"title":"Enable Audit Logs","user":{"login":"chuckha","id":98927,"avatar_url":"https://avatars0.githubusercontent.com/u/98927?v=4","gravatar_id":"","url":"https://api.github.com/users/chuckha","html_url":"https://github.com/chuckha","followers_url":"https://api.github.com/users/chuckha/followers","following_url":"https://api.github.com/users/chuckha/following{/other_user}","gists_url":"https://api.github.com/users/chuckha/gists{/gist_id}","starred_url":"https://api.github.com/users/chuckha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chuckha/subscriptions","organizations_url":"https://api.github.com/users/chuckha/orgs","repos_url":"https://api.github.com/users/chuckha/repos","events_url":"https://api.github.com/users/chuckha/events{/privacy}","received_events_url":"https://api.github.com/users/chuckha/received_events","type":"User","site_admin":false},"body":"Fixes kubernetes/kubeadm#623\r\n\r\nSigned-off-by: Chuck Ha <ha.chuck@gmail.com>\r\n\r\n<!--  Thanks for sending a pull request!  Here are some tips for you:\r\n1. If this is your first time, read our contributor guidelines https://git.k8s.io/community/contributors/devel/pull-requests.md#the-pr-submit-process and developer guide https://git.k8s.io/community/contributors/devel/development.md#development-guide\r\n2. If you want *faster* PR reviews, read how: https://git.k8s.io/community/contributors/devel/pull-requests.md#best-practices-for-faster-reviews\r\n3. Follow the instructions for writing a release note: https://git.k8s.io/community/contributors/devel/pull-requests.md#write-release-notes-if-needed\r\n4. If the PR is unfinished, see how to mark it: https://github.com/kubernetes/community/blob/master/contributors/devel/pull-requests.md#marking-unfinished-pull-requests\r\n-->\r\n\r\n**What this PR does / why we need it**:\r\nThis PR enables [Auditing](https://kubernetes.io/docs/tasks/debug-application-cluster/audit/) behind a featureGate. A user can supply their own audit policy with configuration option as well as a place for the audit logs to live. If no policy is supplied a default policy will be provided. The default policy will log all Metadata level policy logs. It is the example provided in the documentation.\r\n**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:\r\nFixes kubernetes/kubeadm#623\r\n\r\n**Special notes for your reviewer**:\r\n\r\n**Release note**:\r\n<!--  Write your release note:\r\n1. Enter your extended release note in the below block. If the PR requires additional action from users switching to the new release, include the string \"action required\".\r\n2. If no release note is required, just write \"NONE\".\r\n-->\r\n```release-note\r\nkubeadm: Enable auditing behind a feature gate.\r\n```\r\n","created_at":"2018-01-30T21:21:00Z","updated_at":"2018-02-08T02:01:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ced247b0f0c609f2c317eeff8000af5417f5b3a8","assignee":{"login":"timothysc","id":169553,"avatar_url":"https://avatars0.githubusercontent.com/u/169553?v=4","gravatar_id":"","url":"https://api.github.com/users/timothysc","html_url":"https://github.com/timothysc","followers_url":"https://api.github.com/users/timothysc/followers","following_url":"https://api.github.com/users/timothysc/following{/other_user}","gists_url":"https://api.github.com/users/timothysc/gists{/gist_id}","starred_url":"https://api.github.com/users/timothysc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timothysc/subscriptions","organizations_url":"https://api.github.com/users/timothysc/orgs","repos_url":"https://api.github.com/users/timothysc/repos","events_url":"https://api.github.com/users/timothysc/events{/privacy}","received_events_url":"https://api.github.com/users/timothysc/received_events","type":"User","site_admin":false},"assignees":[{"login":"timothysc","id":169553,"avatar_url":"https://avatars0.githubusercontent.com/u/169553?v=4","gravatar_id":"","url":"https://api.github.com/users/timothysc","html_url":"https://github.com/timothysc","followers_url":"https://api.github.com/users/timothysc/followers","following_url":"https://api.github.com/users/timothysc/following{/other_user}","gists_url":"https://api.github.com/users/timothysc/gists{/gist_id}","starred_url":"https://api.github.com/users/timothysc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timothysc/subscriptions","organizations_url":"https://api.github.com/users/timothysc/orgs","repos_url":"https://api.github.com/users/timothysc/repos","events_url":"https://api.github.com/users/timothysc/events{/privacy}","received_events_url":"https://api.github.com/users/timothysc/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"dmmcquay","id":1700422,"avatar_url":"https://avatars2.githubusercontent.com/u/1700422?v=4","gravatar_id":"","url":"https://api.github.com/users/dmmcquay","html_url":"https://github.com/dmmcquay","followers_url":"https://api.github.com/users/dmmcquay/followers","following_url":"https://api.github.com/users/dmmcquay/following{/other_user}","gists_url":"https://api.github.com/users/dmmcquay/gists{/gist_id}","starred_url":"https://api.github.com/users/dmmcquay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmmcquay/subscriptions","organizations_url":"https://api.github.com/users/dmmcquay/orgs","repos_url":"https://api.github.com/users/dmmcquay/repos","events_url":"https://api.github.com/users/dmmcquay/events{/privacy}","received_events_url":"https://api.github.com/users/dmmcquay/received_events","type":"User","site_admin":false}],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/59067/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/59067/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/59067/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/4eaed69eb49ae4ca30708dc884b1b57c6f539c81","head":{"label":"chuckha:audit","ref":"audit","sha":"4eaed69eb49ae4ca30708dc884b1b57c6f539c81","user":{"login":"chuckha","id":98927,"avatar_url":"https://avatars0.githubusercontent.com/u/98927?v=4","gravatar_id":"","url":"https://api.github.com/users/chuckha","html_url":"https://github.com/chuckha","followers_url":"https://api.github.com/users/chuckha/followers","following_url":"https://api.github.com/users/chuckha/following{/other_user}","gists_url":"https://api.github.com/users/chuckha/gists{/gist_id}","starred_url":"https://api.github.com/users/chuckha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chuckha/subscriptions","organizations_url":"https://api.github.com/users/chuckha/orgs","repos_url":"https://api.github.com/users/chuckha/repos","events_url":"https://api.github.com/users/chuckha/events{/privacy}","received_events_url":"https://api.github.com/users/chuckha/received_events","type":"User","site_admin":false},"repo":{"id":118959964,"name":"kubernetes","full_name":"chuckha/kubernetes","owner":{"login":"chuckha","id":98927,"avatar_url":"https://avatars0.githubusercontent.com/u/98927?v=4","gravatar_id":"","url":"https://api.github.com/users/chuckha","html_url":"https://github.com/chuckha","followers_url":"https://api.github.com/users/chuckha/followers","following_url":"https://api.github.com/users/chuckha/following{/other_user}","gists_url":"https://api.github.com/users/chuckha/gists{/gist_id}","starred_url":"https://api.github.com/users/chuckha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chuckha/subscriptions","organizations_url":"https://api.github.com/users/chuckha/orgs","repos_url":"https://api.github.com/users/chuckha/repos","events_url":"https://api.github.com/users/chuckha/events{/privacy}","received_events_url":"https://api.github.com/users/chuckha/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/chuckha/kubernetes","description":"Production-Grade Container Scheduling and Management","fork":true,"url":"https://api.github.com/repos/chuckha/kubernetes","forks_url":"https://api.github.com/repos/chuckha/kubernetes/forks","keys_url":"https://api.github.com/repos/chuckha/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chuckha/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chuckha/kubernetes/teams","hooks_url":"https://api.github.com/repos/chuckha/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/chuckha/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/chuckha/kubernetes/events","assignees_url":"https://api.github.com/repos/chuckha/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/chuckha/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/chuckha/kubernetes/tags","blobs_url":"https://api.github.com/repos/chuckha/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chuckha/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chuckha/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/chuckha/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chuckha/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/chuckha/kubernetes/languages","stargazers_url":"https://api.github.com/repos/chuckha/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/chuckha/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/chuckha/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/chuckha/kubernetes/subscription","commits_url":"https://api.github.com/repos/chuckha/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/chuckha/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/chuckha/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/chuckha/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/chuckha/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/chuckha/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chuckha/kubernetes/merges","archive_url":"https://api.github.com/repos/chuckha/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chuckha/kubernetes/downloads","issues_url":"https://api.github.com/repos/chuckha/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/chuckha/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/chuckha/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/chuckha/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chuckha/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/chuckha/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/chuckha/kubernetes/deployments","created_at":"2018-01-25T19:48:52Z","updated_at":"2018-01-25T19:49:27Z","pushed_at":"2018-02-07T20:50:12Z","git_url":"git://github.com/chuckha/kubernetes.git","ssh_url":"git@github.com:chuckha/kubernetes.git","clone_url":"https://github.com/chuckha/kubernetes.git","svn_url":"https://github.com/chuckha/kubernetes","homepage":"http://kubernetes.io","size":533758,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kubernetes:master","ref":"master","sha":"37d7c68bcdd3be3807f7ace542d512125c92a63b","user":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars2.githubusercontent.com/u/13629408?v=4","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://avatars2.githubusercontent.com/u/13629408?v=4","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":"2018-02-08T01:14:15Z","pushed_at":"2018-02-08T01:55:04Z","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":751310,"stargazers_count":32284,"watchers_count":32284,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":11419,"mirror_url":null,"archived":false,"open_issues_count":5290,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":11419,"open_issues":5290,"watchers":32284,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/59067"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/59067"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/59067"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/59067/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/59067/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/59067/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/4eaed69eb49ae4ca30708dc884b1b57c6f539c81"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"xiangpengzhao"}}