{"action":"created","comment":{"url":"https://api.github.com/repos/openshift/openshift-docs/pulls/comments/51732867","id":51732867,"diff_hunk":"@@ -0,0 +1,171 @@\n+= Managing Projects\n+{product-author}\n+{product-version}\n+:data-uri:\n+:icons:\n+:experimental:\n+:toc: macro\n+:toc-title:\n+\n+toc::[]\n+\n+== Overview\n+\n+In OpenShift, projects are used to isolate content from groups of developers. As an OpenShift administrator, you can give developers access to certain projects, allow them to create their own, and give them administrator rights.\n+\n+[[selfprovisioning-projects]]\n+\n+== Self-provisioning Projects\n+\n+You can allow developers to create their own projects. There is an endpoint\n+that will provision a project according to a\n+link:../dev_guide/templates.html[template]. The web console and `oc new-project` \n+command use this endpoint when a developer link:../dev_guide/projects.html[creates a new project].\n+\n+[[modifying-the-template-for-new-projects]]\n+=== Modifying the Template for New Projects\n+The API server automatically provisions projects based on the template that is\n+defined in the `projectRequestTemplate` parameter of the *_master-config.yaml_*\n+file. If the parameter is not defined, the API server creates a default template\n+that creates a project with the requested name, and assigns the requesting user\n+to the \"admin\" role for that project.\n+\n+To create your own custom project template:\n+\n+. Start with the current default project template:\n++\n+----\n+$ oadm create-bootstrap-project-template -o yaml > template.yaml\n+----\n+\n+. Modify the template by adding objects or modifying existing objects, then load the template:\n++\n+----\n+$ oc create -f template.yaml -n default\n+----\n+\n+. Modify the *_master-config.yaml_* file to reference the loaded template:\n++\n+====\n+----\n+...\n+projectConfig:\n+  projectRequestTemplate: \"default/project-request\"\n+  ...\n+----\n+====\n+\n+When a project request is submitted, the API substitutes the following parameters into the template:\n+\n+[cols=\"4,8\",options=\"header\"]\n+|===\n+|Parameter |Description\n+\n+|*PROJECT_NAME*\n+|The name of the project. Required.\n+\n+|*PROJECT_DISPLAYNAME*\n+|The display name of the project. May be empty.\n+\n+|*PROJECT_DESCRIPTION*\n+|The description of the project. May be empty.\n+\n+|*PROJECT_ADMIN_USER*\n+|The username of the administrating user.\n+\n+|*PROJECT_REQUESTING_USER*\n+|The username of the requesting user.\n+|===\n+\n+Access to the API is granted to developers with the\n+link:../architecture/additional_concepts/authorization.html#roles[`self-provisioner`\n+role] and the `self-provisioners` cluster role binding. This role is available\n+to all authenticated developers by default.\n+\n+=== Disabling Self-provisioning\n+Deleting the `self-provisioners`\n+link:../architecture/additional_concepts/authorization.html#roles[cluster role\n+binding] will deny permissions for self-provisioning any new projects. When\n+disabling self-provisioning, set the `projectRequestMessage` parameter in the\n+*_master-config.yaml_* file instructing developers on how to request a new\n+project. This parameter is a string that will be presented to the developer in\n+the web console and command line when they attempt to self-provision a project.\n+For example:\n+\n+----\n+Contact your system administrator at projectname@example.com to request a project.\n+----\n+\n+or:\n+\n+----\n+To request a new project, fill out the project request form located at\n+https://internal.example.com/openshift-project-request.\n+----\n+\n+[[using-node-selectors]]\n+== Using Node Selectors\n+\n+Node selectors are used in conjunction with labels to control pod placement. \n+\n+[NOTE]\n+====\n+Labels can be assigned link:../install_config/install/advanced_install.html#configuring-node-host-labels[during an advanced installation], or link:../admin_guide/manage_nodes.html#updating-labels-on-nodes[added to a node after installation].\n+====\n+\n+As an OpenShift cluster administrator, you can set the cluster-wide default node selector. This means that you can restrict pod placement to set nodes. For example, if you have an OpenShift topology with multiple regions, node selectors help restrict specific OpenShift projects to only deploy pods onto nodes in a specific region.\n+\n+OpenShift developers can set a node selector on their project configuration if they wish to restrict nodes even further. This will be added to the cluster-wide node selector, meaning it will be more restrictive.\n+\n+.Creating a Cluster-wide Node Selector\n+\n+To create a project with a node selector, use the `--node-selector` option. The following creates a new project named `myproject` dictating that pods be deployed onto nodes labeled `user-node` and `east`:\n+\n+====\n+----\n+$ oadm new-project myproject \\\n+    --node-selector='type=user-node,region=east'\n+----\n+====\n+\n+Once this command is run, this becomes the default node selector for all projects.\n+\n+[NOTE]\n+====\n+While the `new-project` option is available for both `oadm` and `oc`, the cluster administrator and developer commands respectively, creating a new project with a node selector is only available with the `oadm` command. The `new-project` option is not available to project developers when self-provisioning projects.\n+====\n+\n+Using the above command adds an `annotation` section to the project configuration. Changing the `openshift.io/node-selector` value overrides the default:\n+\n+====\n+----\n+...\n+metadata:\n+  annotations:\n+    openshift.io/node-selector: type=user-node,region=east\n+...\n+----\n+====\n+\n+If the `openshift.io/node-selector` value remains empty, the project will not have a node selector, even if the cluster-wide default has been set. This means that, as an OpenShift administrator, you can set a default for any developers, but want to keep projects separate for infrastructure projects.\n+\n+However, you can still dictate node selector values for all projects with a node selector value. If a developer changes the node selector in a pod configuration, the pod will have both the default and new node selectors, because the default node selector cannot be overridden by a developer.","path":"admin_guide/managing_projects.adoc","position":152,"original_position":152,"commit_id":"4c20ed42df80e516a20d5fae5bf7535659830906","original_commit_id":"4c20ed42df80e516a20d5fae5bf7535659830906","user":{"login":"sosiouxme","id":29690,"avatar_url":"https://avatars.githubusercontent.com/u/29690?v=3","gravatar_id":"","url":"https://api.github.com/users/sosiouxme","html_url":"https://github.com/sosiouxme","followers_url":"https://api.github.com/users/sosiouxme/followers","following_url":"https://api.github.com/users/sosiouxme/following{/other_user}","gists_url":"https://api.github.com/users/sosiouxme/gists{/gist_id}","starred_url":"https://api.github.com/users/sosiouxme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sosiouxme/subscriptions","organizations_url":"https://api.github.com/users/sosiouxme/orgs","repos_url":"https://api.github.com/users/sosiouxme/repos","events_url":"https://api.github.com/users/sosiouxme/events{/privacy}","received_events_url":"https://api.github.com/users/sosiouxme/received_events","type":"User","site_admin":false},"body":"Not sure this makes sense. Perhaps an example will help.\r\n\r\nIf a project has been created with the above annotation (`openshift.io/node-selector: type=user-node,region=east`) and the user then sets a nodeSelector of \"clearance=classified\" on a pod in that project, the pod will only ever be scheduled on nodes that have all three labels (type=user-node *and* region=east *and* clearance=classified). If they decided they wanted to schedule on region=west and set a pod nodeSelector accordingly, they would be demanding nodes with labels region=east *and* region=west, which is impossible (labels can only get one value) so it would never be scheduled. Thus the developer can, per-pod, augment (but not override) the project node selector.","created_at":"2016-02-03T15:11:46Z","updated_at":"2016-02-03T15:11:46Z","html_url":"https://github.com/openshift/openshift-docs/pull/1490#discussion_r51732867","pull_request_url":"https://api.github.com/repos/openshift/openshift-docs/pulls/1490","_links":{"self":{"href":"https://api.github.com/repos/openshift/openshift-docs/pulls/comments/51732867"},"html":{"href":"https://github.com/openshift/openshift-docs/pull/1490#discussion_r51732867"},"pull_request":{"href":"https://api.github.com/repos/openshift/openshift-docs/pulls/1490"}}},"pull_request":{"url":"https://api.github.com/repos/openshift/openshift-docs/pulls/1490","id":57460971,"html_url":"https://github.com/openshift/openshift-docs/pull/1490","diff_url":"https://github.com/openshift/openshift-docs/pull/1490.diff","patch_url":"https://github.com/openshift/openshift-docs/pull/1490.patch","issue_url":"https://api.github.com/repos/openshift/openshift-docs/issues/1490","number":1490,"state":"open","locked":false,"title":"Bug 1253125 : added nodeselector information","user":{"login":"bfallonf","id":5474938,"avatar_url":"https://avatars.githubusercontent.com/u/5474938?v=3","gravatar_id":"","url":"https://api.github.com/users/bfallonf","html_url":"https://github.com/bfallonf","followers_url":"https://api.github.com/users/bfallonf/followers","following_url":"https://api.github.com/users/bfallonf/following{/other_user}","gists_url":"https://api.github.com/users/bfallonf/gists{/gist_id}","starred_url":"https://api.github.com/users/bfallonf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bfallonf/subscriptions","organizations_url":"https://api.github.com/users/bfallonf/orgs","repos_url":"https://api.github.com/users/bfallonf/repos","events_url":"https://api.github.com/users/bfallonf/events{/privacy}","received_events_url":"https://api.github.com/users/bfallonf/received_events","type":"User","site_admin":false},"body":"@thoraxe @sosiouxme @liggitt  @adellape Here's a first draft of the nodeselector info.\r\n\r\nI have:\r\n\r\n1. Changed the \"Self-provisioned Projects\" file to \"Managing Projects\" and made sure all the links were good. I added an overview and moved the \"Self-provisioning Projects\" bit down, then added a \"Node Selector\" bit after.\r\n\r\n2. I got the node selector info from the resources from the [BZ](https://bugzilla.redhat.com/show_bug.cgi?id=1253125), [Jordan's GH issue](https://github.com/openshift/openshift-docs/issues/678), and [Luke's aggregating logging info](https://github.com/openshift/openshift-docs/blob/72cc83bb424c10824d9a1c1f09bfc28c832aa921/install_config/aggregate_logging.adoc).\r\n\r\nOne question though, is there a difference between node labels and the labels outlined in the \"[Architecture](https://docs.openshift.com/enterprise/3.1/architecture/core_concepts/pods_and_services.html#labels)\" section?","created_at":"2016-01-28T06:23:50Z","updated_at":"2016-02-03T15:11:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"da5716f2220cc7288ed1fe47cc49e90329b520ef","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openshift/openshift-docs/pulls/1490/commits","review_comments_url":"https://api.github.com/repos/openshift/openshift-docs/pulls/1490/comments","review_comment_url":"https://api.github.com/repos/openshift/openshift-docs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openshift/openshift-docs/issues/1490/comments","statuses_url":"https://api.github.com/repos/openshift/openshift-docs/statuses/4c20ed42df80e516a20d5fae5bf7535659830906","head":{"label":"bfallonf:BZ1253125","ref":"BZ1253125","sha":"4c20ed42df80e516a20d5fae5bf7535659830906","user":{"login":"bfallonf","id":5474938,"avatar_url":"https://avatars.githubusercontent.com/u/5474938?v=3","gravatar_id":"","url":"https://api.github.com/users/bfallonf","html_url":"https://github.com/bfallonf","followers_url":"https://api.github.com/users/bfallonf/followers","following_url":"https://api.github.com/users/bfallonf/following{/other_user}","gists_url":"https://api.github.com/users/bfallonf/gists{/gist_id}","starred_url":"https://api.github.com/users/bfallonf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bfallonf/subscriptions","organizations_url":"https://api.github.com/users/bfallonf/orgs","repos_url":"https://api.github.com/users/bfallonf/repos","events_url":"https://api.github.com/users/bfallonf/events{/privacy}","received_events_url":"https://api.github.com/users/bfallonf/received_events","type":"User","site_admin":false},"repo":{"id":30393503,"name":"openshift-docs","full_name":"bfallonf/openshift-docs","owner":{"login":"bfallonf","id":5474938,"avatar_url":"https://avatars.githubusercontent.com/u/5474938?v=3","gravatar_id":"","url":"https://api.github.com/users/bfallonf","html_url":"https://github.com/bfallonf","followers_url":"https://api.github.com/users/bfallonf/followers","following_url":"https://api.github.com/users/bfallonf/following{/other_user}","gists_url":"https://api.github.com/users/bfallonf/gists{/gist_id}","starred_url":"https://api.github.com/users/bfallonf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bfallonf/subscriptions","organizations_url":"https://api.github.com/users/bfallonf/orgs","repos_url":"https://api.github.com/users/bfallonf/repos","events_url":"https://api.github.com/users/bfallonf/events{/privacy}","received_events_url":"https://api.github.com/users/bfallonf/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bfallonf/openshift-docs","description":"OpenShift Documentation","fork":true,"url":"https://api.github.com/repos/bfallonf/openshift-docs","forks_url":"https://api.github.com/repos/bfallonf/openshift-docs/forks","keys_url":"https://api.github.com/repos/bfallonf/openshift-docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bfallonf/openshift-docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bfallonf/openshift-docs/teams","hooks_url":"https://api.github.com/repos/bfallonf/openshift-docs/hooks","issue_events_url":"https://api.github.com/repos/bfallonf/openshift-docs/issues/events{/number}","events_url":"https://api.github.com/repos/bfallonf/openshift-docs/events","assignees_url":"https://api.github.com/repos/bfallonf/openshift-docs/assignees{/user}","branches_url":"https://api.github.com/repos/bfallonf/openshift-docs/branches{/branch}","tags_url":"https://api.github.com/repos/bfallonf/openshift-docs/tags","blobs_url":"https://api.github.com/repos/bfallonf/openshift-docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bfallonf/openshift-docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bfallonf/openshift-docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/bfallonf/openshift-docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bfallonf/openshift-docs/statuses/{sha}","languages_url":"https://api.github.com/repos/bfallonf/openshift-docs/languages","stargazers_url":"https://api.github.com/repos/bfallonf/openshift-docs/stargazers","contributors_url":"https://api.github.com/repos/bfallonf/openshift-docs/contributors","subscribers_url":"https://api.github.com/repos/bfallonf/openshift-docs/subscribers","subscription_url":"https://api.github.com/repos/bfallonf/openshift-docs/subscription","commits_url":"https://api.github.com/repos/bfallonf/openshift-docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/bfallonf/openshift-docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/bfallonf/openshift-docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/bfallonf/openshift-docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/bfallonf/openshift-docs/contents/{+path}","compare_url":"https://api.github.com/repos/bfallonf/openshift-docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bfallonf/openshift-docs/merges","archive_url":"https://api.github.com/repos/bfallonf/openshift-docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bfallonf/openshift-docs/downloads","issues_url":"https://api.github.com/repos/bfallonf/openshift-docs/issues{/number}","pulls_url":"https://api.github.com/repos/bfallonf/openshift-docs/pulls{/number}","milestones_url":"https://api.github.com/repos/bfallonf/openshift-docs/milestones{/number}","notifications_url":"https://api.github.com/repos/bfallonf/openshift-docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bfallonf/openshift-docs/labels{/name}","releases_url":"https://api.github.com/repos/bfallonf/openshift-docs/releases{/id}","deployments_url":"https://api.github.com/repos/bfallonf/openshift-docs/deployments","created_at":"2015-02-06T03:37:52Z","updated_at":"2016-01-12T00:38:47Z","pushed_at":"2016-02-03T04:15:01Z","git_url":"git://github.com/bfallonf/openshift-docs.git","ssh_url":"git@github.com:bfallonf/openshift-docs.git","clone_url":"https://github.com/bfallonf/openshift-docs.git","svn_url":"https://github.com/bfallonf/openshift-docs","homepage":null,"size":7378,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"057aa3e7e6332739d64de1527588c0faaf80dc3f","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":21740844,"name":"openshift-docs","full_name":"openshift/openshift-docs","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/openshift-docs","description":"OpenShift Documentation","fork":false,"url":"https://api.github.com/repos/openshift/openshift-docs","forks_url":"https://api.github.com/repos/openshift/openshift-docs/forks","keys_url":"https://api.github.com/repos/openshift/openshift-docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openshift/openshift-docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openshift/openshift-docs/teams","hooks_url":"https://api.github.com/repos/openshift/openshift-docs/hooks","issue_events_url":"https://api.github.com/repos/openshift/openshift-docs/issues/events{/number}","events_url":"https://api.github.com/repos/openshift/openshift-docs/events","assignees_url":"https://api.github.com/repos/openshift/openshift-docs/assignees{/user}","branches_url":"https://api.github.com/repos/openshift/openshift-docs/branches{/branch}","tags_url":"https://api.github.com/repos/openshift/openshift-docs/tags","blobs_url":"https://api.github.com/repos/openshift/openshift-docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openshift/openshift-docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openshift/openshift-docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/openshift/openshift-docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openshift/openshift-docs/statuses/{sha}","languages_url":"https://api.github.com/repos/openshift/openshift-docs/languages","stargazers_url":"https://api.github.com/repos/openshift/openshift-docs/stargazers","contributors_url":"https://api.github.com/repos/openshift/openshift-docs/contributors","subscribers_url":"https://api.github.com/repos/openshift/openshift-docs/subscribers","subscription_url":"https://api.github.com/repos/openshift/openshift-docs/subscription","commits_url":"https://api.github.com/repos/openshift/openshift-docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/openshift/openshift-docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/openshift/openshift-docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/openshift/openshift-docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/openshift/openshift-docs/contents/{+path}","compare_url":"https://api.github.com/repos/openshift/openshift-docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openshift/openshift-docs/merges","archive_url":"https://api.github.com/repos/openshift/openshift-docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openshift/openshift-docs/downloads","issues_url":"https://api.github.com/repos/openshift/openshift-docs/issues{/number}","pulls_url":"https://api.github.com/repos/openshift/openshift-docs/pulls{/number}","milestones_url":"https://api.github.com/repos/openshift/openshift-docs/milestones{/number}","notifications_url":"https://api.github.com/repos/openshift/openshift-docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openshift/openshift-docs/labels{/name}","releases_url":"https://api.github.com/repos/openshift/openshift-docs/releases{/id}","deployments_url":"https://api.github.com/repos/openshift/openshift-docs/deployments","created_at":"2014-07-11T15:14:42Z","updated_at":"2016-01-31T22:33:01Z","pushed_at":"2016-02-03T14:30:09Z","git_url":"git://github.com/openshift/openshift-docs.git","ssh_url":"git@github.com:openshift/openshift-docs.git","clone_url":"https://github.com/openshift/openshift-docs.git","svn_url":"https://github.com/openshift/openshift-docs","homepage":"https://docs.openshift.org/latest/welcome/index.html","size":10255,"stargazers_count":41,"watchers_count":41,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":176,"mirror_url":null,"open_issues_count":121,"forks":176,"open_issues":121,"watchers":41,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openshift/openshift-docs/pulls/1490"},"html":{"href":"https://github.com/openshift/openshift-docs/pull/1490"},"issue":{"href":"https://api.github.com/repos/openshift/openshift-docs/issues/1490"},"comments":{"href":"https://api.github.com/repos/openshift/openshift-docs/issues/1490/comments"},"review_comments":{"href":"https://api.github.com/repos/openshift/openshift-docs/pulls/1490/comments"},"review_comment":{"href":"https://api.github.com/repos/openshift/openshift-docs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openshift/openshift-docs/pulls/1490/commits"},"statuses":{"href":"https://api.github.com/repos/openshift/openshift-docs/statuses/4c20ed42df80e516a20d5fae5bf7535659830906"}}}}