{"action":"created","comment":{"url":"https://api.github.com/repos/openshift/origin/pulls/comments/69332916","id":69332916,"diff_hunk":"@@ -0,0 +1,74 @@\n+package imagesignature\n+\n+import (\n+\t\"crypto/sha1\"\n+\t\"fmt\"\n+\n+\t\"github.com/golang/glog\"\n+\n+\tkapi \"k8s.io/kubernetes/pkg/api\"\n+\t\"k8s.io/kubernetes/pkg/runtime\"\n+\t\"k8s.io/kubernetes/pkg/util/validation/field\"\n+\n+\timageapi \"github.com/openshift/origin/pkg/image/api\"\n+\t\"github.com/openshift/origin/pkg/image/api/validation\"\n+)\n+\n+// strategy implements behavior for ImageStreamTags.\n+type strategy struct {\n+\truntime.ObjectTyper\n+}\n+\n+var Strategy = &strategy{\n+\tObjectTyper: kapi.Scheme,\n+}\n+\n+func (s *strategy) NamespaceScoped() bool {\n+\treturn false\n+}\n+\n+func (s *strategy) PrepareForCreate(obj runtime.Object) {\n+\tsignature := obj.(*imageapi.ImageSignature)\n+\n+\tsignature.Conditions = nil\n+\tsignature.ImageIdentity = \"\"\n+\tsignature.SignedClaims = nil\n+\tsignature.Created = nil\n+\tsignature.IssuedBy = nil\n+\tsignature.IssuedTo = nil\n+\n+\t// generate signature name if it contains just image name\n+\timageName, sigName, _ := imageapi.SplitImageSignatureName(signature.Name)","path":"pkg/image/registry/imagesignature/strategy.go","position":41,"original_position":41,"commit_id":"b1c344fd4d044ec643a5259b37924dcaff2e7ec3","original_commit_id":"b1c344fd4d044ec643a5259b37924dcaff2e7ec3","user":{"login":"deads2k","id":8225098,"avatar_url":"https://avatars.githubusercontent.com/u/8225098?v=3","gravatar_id":"","url":"https://api.github.com/users/deads2k","html_url":"https://github.com/deads2k","followers_url":"https://api.github.com/users/deads2k/followers","following_url":"https://api.github.com/users/deads2k/following{/other_user}","gists_url":"https://api.github.com/users/deads2k/gists{/gist_id}","starred_url":"https://api.github.com/users/deads2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deads2k/subscriptions","organizations_url":"https://api.github.com/users/deads2k/orgs","repos_url":"https://api.github.com/users/deads2k/repos","events_url":"https://api.github.com/users/deads2k/events{/privacy}","received_events_url":"https://api.github.com/users/deads2k/received_events","type":"User","site_admin":false},"body":"I'd like to see this in a validation method.","created_at":"2016-07-01T17:39:52Z","updated_at":"2016-07-01T17:39:52Z","html_url":"https://github.com/openshift/origin/pull/9181#discussion_r69332916","pull_request_url":"https://api.github.com/repos/openshift/origin/pulls/9181","_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments/69332916"},"html":{"href":"https://github.com/openshift/origin/pull/9181#discussion_r69332916"},"pull_request":{"href":"https://api.github.com/repos/openshift/origin/pulls/9181"}}},"pull_request":{"url":"https://api.github.com/repos/openshift/origin/pulls/9181","id":72736523,"html_url":"https://github.com/openshift/origin/pull/9181","diff_url":"https://github.com/openshift/origin/pull/9181.diff","patch_url":"https://github.com/openshift/origin/pull/9181.patch","issue_url":"https://api.github.com/repos/openshift/origin/issues/9181","number":9181,"state":"open","locked":false,"title":"Added REST storage for images/signatures resource","user":{"login":"miminar","id":1478803,"avatar_url":"https://avatars.githubusercontent.com/u/1478803?v=3","gravatar_id":"","url":"https://api.github.com/users/miminar","html_url":"https://github.com/miminar","followers_url":"https://api.github.com/users/miminar/followers","following_url":"https://api.github.com/users/miminar/following{/other_user}","gists_url":"https://api.github.com/users/miminar/gists{/gist_id}","starred_url":"https://api.github.com/users/miminar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miminar/subscriptions","organizations_url":"https://api.github.com/users/miminar/orgs","repos_url":"https://api.github.com/users/miminar/repos","events_url":"https://api.github.com/users/miminar/events{/privacy}","received_events_url":"https://api.github.com/users/miminar/received_events","type":"User","site_admin":false},"body":"The new `images/signatures` resource allows to update image' signatures. There's a new images API client call `images.UpdateSignatures()` for this purpose.\r\n\r\nA cluster-wide role `system:image-signer` is necessary to add/remove/modify signatures.\r\n\r\nA follow-up for #8371","created_at":"2016-06-06T16:14:47Z","updated_at":"2016-07-01T17:39:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3d454724547a54462fdeac0b852c8e529046f7cd","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/openshift/origin/pulls/9181/commits","review_comments_url":"https://api.github.com/repos/openshift/origin/pulls/9181/comments","review_comment_url":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openshift/origin/issues/9181/comments","statuses_url":"https://api.github.com/repos/openshift/origin/statuses/b1c344fd4d044ec643a5259b37924dcaff2e7ec3","head":{"label":"miminar:image-signatures-rest","ref":"image-signatures-rest","sha":"b1c344fd4d044ec643a5259b37924dcaff2e7ec3","user":{"login":"miminar","id":1478803,"avatar_url":"https://avatars.githubusercontent.com/u/1478803?v=3","gravatar_id":"","url":"https://api.github.com/users/miminar","html_url":"https://github.com/miminar","followers_url":"https://api.github.com/users/miminar/followers","following_url":"https://api.github.com/users/miminar/following{/other_user}","gists_url":"https://api.github.com/users/miminar/gists{/gist_id}","starred_url":"https://api.github.com/users/miminar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miminar/subscriptions","organizations_url":"https://api.github.com/users/miminar/orgs","repos_url":"https://api.github.com/users/miminar/repos","events_url":"https://api.github.com/users/miminar/events{/privacy}","received_events_url":"https://api.github.com/users/miminar/received_events","type":"User","site_admin":false},"repo":{"id":36652057,"name":"origin","full_name":"miminar/origin","owner":{"login":"miminar","id":1478803,"avatar_url":"https://avatars.githubusercontent.com/u/1478803?v=3","gravatar_id":"","url":"https://api.github.com/users/miminar","html_url":"https://github.com/miminar","followers_url":"https://api.github.com/users/miminar/followers","following_url":"https://api.github.com/users/miminar/following{/other_user}","gists_url":"https://api.github.com/users/miminar/gists{/gist_id}","starred_url":"https://api.github.com/users/miminar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miminar/subscriptions","organizations_url":"https://api.github.com/users/miminar/orgs","repos_url":"https://api.github.com/users/miminar/repos","events_url":"https://api.github.com/users/miminar/events{/privacy}","received_events_url":"https://api.github.com/users/miminar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/miminar/origin","description":"OpenShift 3 - build, deploy, and manage your applications with Docker and Kubernetes","fork":true,"url":"https://api.github.com/repos/miminar/origin","forks_url":"https://api.github.com/repos/miminar/origin/forks","keys_url":"https://api.github.com/repos/miminar/origin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/miminar/origin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/miminar/origin/teams","hooks_url":"https://api.github.com/repos/miminar/origin/hooks","issue_events_url":"https://api.github.com/repos/miminar/origin/issues/events{/number}","events_url":"https://api.github.com/repos/miminar/origin/events","assignees_url":"https://api.github.com/repos/miminar/origin/assignees{/user}","branches_url":"https://api.github.com/repos/miminar/origin/branches{/branch}","tags_url":"https://api.github.com/repos/miminar/origin/tags","blobs_url":"https://api.github.com/repos/miminar/origin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/miminar/origin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/miminar/origin/git/refs{/sha}","trees_url":"https://api.github.com/repos/miminar/origin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/miminar/origin/statuses/{sha}","languages_url":"https://api.github.com/repos/miminar/origin/languages","stargazers_url":"https://api.github.com/repos/miminar/origin/stargazers","contributors_url":"https://api.github.com/repos/miminar/origin/contributors","subscribers_url":"https://api.github.com/repos/miminar/origin/subscribers","subscription_url":"https://api.github.com/repos/miminar/origin/subscription","commits_url":"https://api.github.com/repos/miminar/origin/commits{/sha}","git_commits_url":"https://api.github.com/repos/miminar/origin/git/commits{/sha}","comments_url":"https://api.github.com/repos/miminar/origin/comments{/number}","issue_comment_url":"https://api.github.com/repos/miminar/origin/issues/comments{/number}","contents_url":"https://api.github.com/repos/miminar/origin/contents/{+path}","compare_url":"https://api.github.com/repos/miminar/origin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/miminar/origin/merges","archive_url":"https://api.github.com/repos/miminar/origin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/miminar/origin/downloads","issues_url":"https://api.github.com/repos/miminar/origin/issues{/number}","pulls_url":"https://api.github.com/repos/miminar/origin/pulls{/number}","milestones_url":"https://api.github.com/repos/miminar/origin/milestones{/number}","notifications_url":"https://api.github.com/repos/miminar/origin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/miminar/origin/labels{/name}","releases_url":"https://api.github.com/repos/miminar/origin/releases{/id}","deployments_url":"https://api.github.com/repos/miminar/origin/deployments","created_at":"2015-06-01T09:53:10Z","updated_at":"2016-01-14T09:43:02Z","pushed_at":"2016-07-01T16:07:14Z","git_url":"git://github.com/miminar/origin.git","ssh_url":"git@github.com:miminar/origin.git","clone_url":"https://github.com/miminar/origin.git","svn_url":"https://github.com/miminar/origin","homepage":"http://www.openshift.org","size":275728,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"openshift:master","ref":"master","sha":"e72143c3bd4f064249f1618605b1d1ffeb4d5e24","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":"Enterprise-Ready Kubernetes for Developers","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}","deployments_url":"https://api.github.com/repos/openshift/origin/deployments","created_at":"2014-07-30T20:04:05Z","updated_at":"2016-07-01T17:36:28Z","pushed_at":"2016-07-01T17:34:40Z","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":519865,"stargazers_count":1440,"watchers_count":1440,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":852,"mirror_url":null,"open_issues_count":1068,"forks":852,"open_issues":1068,"watchers":1440,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/9181"},"html":{"href":"https://github.com/openshift/origin/pull/9181"},"issue":{"href":"https://api.github.com/repos/openshift/origin/issues/9181"},"comments":{"href":"https://api.github.com/repos/openshift/origin/issues/9181/comments"},"review_comments":{"href":"https://api.github.com/repos/openshift/origin/pulls/9181/comments"},"review_comment":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openshift/origin/pulls/9181/commits"},"statuses":{"href":"https://api.github.com/repos/openshift/origin/statuses/b1c344fd4d044ec643a5259b37924dcaff2e7ec3"}}}}
{"actor":{"display_login":"deads2k"}}