Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions admin_guide/managing_projects.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ $ oc adm new-project myproject \
--node-selector='type=user-node,region=east'
----

Once this command is run, this becomes the adminstrator-set node selector for
Once this command is run, this becomes the administrator-set node selector for
all pods contained in the specified project.

[NOTE]
Expand Down Expand Up @@ -215,7 +215,7 @@ You can also override the default value for an existing project namespace by usi
----

If `openshift.io/node-selector` is set to an empty string (`oc adm new-project
--node-selector=""`), the project will not have an adminstrator-set node
--node-selector=""`), the project will not have an administrator-set node
selector, even if the cluster-wide default has been set. This means that, as a
cluster administrator, you can set a default to restrict developer projects to a
subset of nodes and still enable infrastructure or other projects to schedule
Expand Down
27 changes: 27 additions & 0 deletions dev_guide/daemonsets.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,35 @@ A daemonset can be used to run replicas of a pod on specific or all nodes in an
Use daemonsets to create shared storage, run a logging pod on every node in
your cluster, or deploy a monitoring agent on every node.

For security reasons, only cluster administrators can create daemonsets.
(xref:../admin_guide/manage_rbac.adoc#admin-guide-granting-users-daemonset-permissions[Granting Users Daemonset Permissions.])

For more information on daemonsets, see the link:http://kubernetes.io/docs/admin/daemons/[Kubernetes documentation].

[IMPORTANT]
Copy link
Contributor

@gaurav-nelson gaurav-nelson Mar 16, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can reword it like this:

  • shows what goes wrong first
  • and then how to deal with it.
[IMPORTANT]
====
Daemonset scheduling is incompatible with project's default node selector. If
you fail to disable it, the daemonset gets restricted by merging with the
default node selector. This results in frequent pod recreates on the nodes that
got unselected by the merged node selector, which in turn puts unwanted load on
the cluster.

Therefore, 

* Before you start using daemonsets, disable the default project-wide xref:../admin_guide/managing_projects.adoc#using-node-selectors[node selector]
in your namespace, by setting the namespace
annotation `openshift.io/node-selector` to an empty string:
+
----
# oc patch namespace myproject -p \
    '{"metadata": {"annotations": {"openshift.io/node-selector": ""}}}'
----
* If you are creating a new project, overwrite the default node selector using
`oc adm new-project --node-selector=""`.
====

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vikram-redhat LGTM, thx

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, thx

====
Daemonset scheduling is incompatible with project's default node selector.
If you fail to disable it, the daemonset gets restricted by merging with the
default node selector. This results in frequent pod recreates on the nodes that
got unselected by the merged node selector, which in turn puts unwanted load on
the cluster.

Therefore,

* Before you start using daemonsets, disable the default project-wide
xref:../admin_guide/managing_projects.adoc#using-node-selectors[node selector]
in your namespace, by setting the namespace annotation `openshift.io/node-selector` to an empty string:

----
# oc patch namespace myproject -p \
'{"metadata": {"annotations": {"openshift.io/node-selector": ""}}}'
----

* If you are creating a new project, overwrite the default node selector using
`oc adm new-project --node-selector=""`.

====

[[dev-guide-creating-daemonsets]]
== Creating Daemonsets

Expand Down