{"action":"created","comment":{"url":"https://api.github.com/repos/openshift/origin/pulls/comments/47097090","id":47097090,"diff_hunk":"@@ -0,0 +1,118 @@\n+# Organizations\n+\n+## Problems\n+ 1.  We need to be able to allocate quota to a group of projects.\n+ 2.  We need to be able to limit a particular project's usage of shared quota (think htb rate/ceil for tc qdisc classes).\n+ 3.  We need to be able to manage groups across related projects, but not across the entire cluster.\n+ 4.  We need to be able to limit how many projects a given User/Organization can have.  (limits provisioning)\n+\n+We can do this with an Organization entity that can manage multiple projects.  An Organization can have multiple org-admins who are allowed to manage quota allocation to owned projects and OrgGroups (groups that scoped to projects owned by an Organization).  A project is owned by at most one Organization, an Organization can own muliple projects.\n+\n+### Open Questions\n+ 1.  Should we have a two layer scoping \"/api/v1/organization/<org name>/namespace/<namespace name>\" or keep the current namespace structure?\n+\n+     Keeping the current namespace structure mitigates changes, but prevents two orgs from having the same namespace and makes storing additional org-scoped resources like quota and groups more difficult.\n+     I'm in favor of keeping the current structure, but allowing deeper nesting of subresources and having named subresources.\n+\n+ 2.  Should we allow projects to be owned by Users or only allow ownership by Organizations?\n+\n+     Allowing Users to own projects eliminates the creation of another \"linked\" resource that needs to be protected and maintained.\n+     Having a single entity allowed to own projects limits some duplication of things like quota.\n+\n+ 3.  Can we punt on adding users as organization members?\n+\n+     Organization-admins should not be able to force users into an Org.  Users should not be able to join any Org they want.  I'd like to get the structure correct and punt on the ability to add members.  It would require some sort of invitation/request/approval flow.\n+\n+ 4.  Can we punt on project transfering?\n+\n+     An org-admin shouldn't be able to take a project from someone else and they shouldn't be allowed to orphan their own project.  That means we'd need an offer/request/approval flow.\n+\n+\n+\n+## Organizations\n+An Organization is a cluster scoped API object that references Users and has subresources for accessing and modifying Organization scoped OrgGroups.\n+```\n+// Organization contains the set of Users that are members of the Organization.\n+type Organization struct {\n+\tkapi.TypeMeta\n+\tkapi.ObjectMeta\n+\n+\t// AdminUsers is a list of Users that can administer this Organization.  By default a policy rule exists\n+\t// that allows all Users to inspect and modify OrgGroups of Organizations that they are an Admin for.\n+\t// Admins may NOT modify Organization membership.\n+\tAdminUsers util.StringSet\n+\t// AdminGroups is a list of Groups that can administer this Organization.  By default a policy rule exists\n+\t// that allows all Users to inspect and modify OrgGroups of Organizations that they are an Admin for.\n+\t// Admins may NOT modify Organization membership.\n+\tAdminGroups util.StringSet\n+\n+\t// MemberUsers is a list of Users that are members of the Organization.  Only members may be assigned to OrgGroups.\n+\tMemberUsers util.StringSet\n+\t// MemberGroups is a list of Groups whose constituent users are considered members of the Organization.  Only members may be assigned to OrgGroups.\n+\tMemberGroups util.StringSet\n+}\n+```\n+\n+The Organization has a list of admins.  Admins have the power to:\n+ 1.  Reserve quota for particular projects.\n+ 2.  Accept ownership of a project.\n+ 3.  Offer ownership of a project.\n+ 4.  Remove (but not add) group members.","path":"docs/proposals/organizations.md","position":60,"original_position":60,"commit_id":"ae9f58725f518f4c4ce7718f0152a2f9e00227e2","original_commit_id":"0dd370eeb7a413bda52a4627d5f05329cea3d904","user":{"login":"liggitt","id":980082,"avatar_url":"https://avatars.githubusercontent.com/u/980082?v=3","gravatar_id":"","url":"https://api.github.com/users/liggitt","html_url":"https://github.com/liggitt","followers_url":"https://api.github.com/users/liggitt/followers","following_url":"https://api.github.com/users/liggitt/following{/other_user}","gists_url":"https://api.github.com/users/liggitt/gists{/gist_id}","starred_url":"https://api.github.com/users/liggitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liggitt/subscriptions","organizations_url":"https://api.github.com/users/liggitt/orgs","repos_url":"https://api.github.com/users/liggitt/repos","events_url":"https://api.github.com/users/liggitt/events{/privacy}","received_events_url":"https://api.github.com/users/liggitt/received_events","type":"User","site_admin":false},"body":"Maybe feels like named subresources, which we don't have... with two seconds thought, something like:\r\n```\r\ncreate org/myorg/members {name:bob}\r\ndelete org/myorg/members/bob\r\ncreate user/~/orgs {name:myorg}\r\ndelete user/~/orgs/myorg\r\n```","created_at":"2015-12-09T14:35:52Z","updated_at":"2015-12-09T14:35:52Z","html_url":"https://github.com/openshift/origin/pull/6226#discussion_r47097090","pull_request_url":"https://api.github.com/repos/openshift/origin/pulls/6226","_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments/47097090"},"html":{"href":"https://github.com/openshift/origin/pull/6226#discussion_r47097090"},"pull_request":{"href":"https://api.github.com/repos/openshift/origin/pulls/6226"}}},"pull_request":{"url":"https://api.github.com/repos/openshift/origin/pulls/6226","id":52889806,"html_url":"https://github.com/openshift/origin/pull/6226","diff_url":"https://github.com/openshift/origin/pull/6226.diff","patch_url":"https://github.com/openshift/origin/pull/6226.patch","issue_url":"https://api.github.com/repos/openshift/origin/issues/6226","number":6226,"state":"open","locked":false,"title":"Organizations","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":"Proposal for Organizations.  This covers project owernship, quota allocation, and org groups.\r\n\r\n@pweil- @smarterclayton @danmcp @liggitt @kargakis","created_at":"2015-12-07T19:35:17Z","updated_at":"2015-12-09T14:35:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d0c10cfb8a31929fec0033415e58217ade5a36b6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openshift/origin/pulls/6226/commits","review_comments_url":"https://api.github.com/repos/openshift/origin/pulls/6226/comments","review_comment_url":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openshift/origin/issues/6226/comments","statuses_url":"https://api.github.com/repos/openshift/origin/statuses/ae9f58725f518f4c4ce7718f0152a2f9e00227e2","head":{"label":"deads2k:org-proposal","ref":"org-proposal","sha":"ae9f58725f518f4c4ce7718f0152a2f9e00227e2","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},"repo":{"id":24424126,"name":"origin","full_name":"deads2k/origin","owner":{"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},"private":false,"html_url":"https://github.com/deads2k/origin","description":"OpenShift 3 - build, deploy, and manage your applications with Docker and Kubernetes","fork":true,"url":"https://api.github.com/repos/deads2k/origin","forks_url":"https://api.github.com/repos/deads2k/origin/forks","keys_url":"https://api.github.com/repos/deads2k/origin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/deads2k/origin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/deads2k/origin/teams","hooks_url":"https://api.github.com/repos/deads2k/origin/hooks","issue_events_url":"https://api.github.com/repos/deads2k/origin/issues/events{/number}","events_url":"https://api.github.com/repos/deads2k/origin/events","assignees_url":"https://api.github.com/repos/deads2k/origin/assignees{/user}","branches_url":"https://api.github.com/repos/deads2k/origin/branches{/branch}","tags_url":"https://api.github.com/repos/deads2k/origin/tags","blobs_url":"https://api.github.com/repos/deads2k/origin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/deads2k/origin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/deads2k/origin/git/refs{/sha}","trees_url":"https://api.github.com/repos/deads2k/origin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/deads2k/origin/statuses/{sha}","languages_url":"https://api.github.com/repos/deads2k/origin/languages","stargazers_url":"https://api.github.com/repos/deads2k/origin/stargazers","contributors_url":"https://api.github.com/repos/deads2k/origin/contributors","subscribers_url":"https://api.github.com/repos/deads2k/origin/subscribers","subscription_url":"https://api.github.com/repos/deads2k/origin/subscription","commits_url":"https://api.github.com/repos/deads2k/origin/commits{/sha}","git_commits_url":"https://api.github.com/repos/deads2k/origin/git/commits{/sha}","comments_url":"https://api.github.com/repos/deads2k/origin/comments{/number}","issue_comment_url":"https://api.github.com/repos/deads2k/origin/issues/comments{/number}","contents_url":"https://api.github.com/repos/deads2k/origin/contents/{+path}","compare_url":"https://api.github.com/repos/deads2k/origin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/deads2k/origin/merges","archive_url":"https://api.github.com/repos/deads2k/origin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/deads2k/origin/downloads","issues_url":"https://api.github.com/repos/deads2k/origin/issues{/number}","pulls_url":"https://api.github.com/repos/deads2k/origin/pulls{/number}","milestones_url":"https://api.github.com/repos/deads2k/origin/milestones{/number}","notifications_url":"https://api.github.com/repos/deads2k/origin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/deads2k/origin/labels{/name}","releases_url":"https://api.github.com/repos/deads2k/origin/releases{/id}","created_at":"2014-09-24T17:02:12Z","updated_at":"2015-05-08T15:45:28Z","pushed_at":"2015-12-09T14:24:03Z","git_url":"git://github.com/deads2k/origin.git","ssh_url":"git@github.com:deads2k/origin.git","clone_url":"https://github.com/deads2k/origin.git","svn_url":"https://github.com/deads2k/origin","homepage":"https://openshift.github.io","size":179424,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"openshift:master","ref":"master","sha":"9ce4a5a47cc6c2b6558f16f9ed566ed6d5fe5fdf","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":"OpenShift 3 - build, deploy, and manage your applications with Docker and Kubernetes","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}","created_at":"2014-07-30T20:04:05Z","updated_at":"2015-12-08T17:19:12Z","pushed_at":"2015-12-09T14:29:47Z","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":237134,"stargazers_count":859,"watchers_count":859,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":537,"mirror_url":null,"open_issues_count":724,"forks":537,"open_issues":724,"watchers":859,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/6226"},"html":{"href":"https://github.com/openshift/origin/pull/6226"},"issue":{"href":"https://api.github.com/repos/openshift/origin/issues/6226"},"comments":{"href":"https://api.github.com/repos/openshift/origin/issues/6226/comments"},"review_comments":{"href":"https://api.github.com/repos/openshift/origin/pulls/6226/comments"},"review_comment":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openshift/origin/pulls/6226/commits"},"statuses":{"href":"https://api.github.com/repos/openshift/origin/statuses/ae9f58725f518f4c4ce7718f0152a2f9e00227e2"}}}}