-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add the tolerations for monitoring components section #16575
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| // Module included in the following assemblies: | ||
| // | ||
| // * monitoring/cluster-monitoring/configuring-the-monitoring-stack.adoc | ||
|
|
||
| [id="assigning-tolerations-to-monitoring-components_{context}"] | ||
| = Assigning tolerations to monitoring components | ||
|
|
||
| You can assign tolerations to any of the monitoring stack components to enable moving them to tainted nodes. | ||
|
|
||
| .Prerequisites | ||
|
|
||
| * Make sure you have the `cluster-monitoring-config` ConfigMap object with the `data/config.yaml` section. | ||
|
|
||
| .Procedure | ||
|
|
||
| . Start editing the `cluster-monitoring-config` ConfigMap: | ||
| + | ||
| ---- | ||
| $ oc -n openshift-monitoring edit configmap cluster-monitoring-config | ||
| ---- | ||
|
|
||
| . Specify `tolerations` for the component: | ||
| + | ||
| [source,yaml,subs=quotes] | ||
| ---- | ||
| apiVersion: v1 | ||
| kind: ConfigMap | ||
| metadata: | ||
| name: cluster-monitoring-config | ||
| namespace: openshift-monitoring | ||
| data: | ||
| config.yaml: | | ||
| *_component_*: | ||
| tolerations: | ||
| *_tolerations specification_* | ||
| ---- | ||
| + | ||
| Substitute `<component>` and `<toleration specification>` accordingly. | ||
| + | ||
| For example, a `kubectl taint nodes node1 key1=value1:NoSchedule` taint prevents the scheduler from placing pods in `foo: bar`. To make the `alertmanagerMain` component ignore that taint and to place `alertmanagerMain` in `foo: bar` normally, use this toleration: | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
prevents the scheduler from placing pods in
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Implemented in #16978. |
||
| + | ||
| [source,yaml,subs=quotes] | ||
| ---- | ||
| apiVersion: v1 | ||
| kind: ConfigMap | ||
| metadata: | ||
| name: cluster-monitoring-config | ||
| namespace: openshift-monitoring | ||
| data: | ||
| config.yaml: | | ||
| alertmanagerMain: | ||
| nodeSelector: | ||
| foo: bar | ||
| *tolerations: | ||
| - key: "key1" | ||
| operator: "Equal" | ||
| value: "value1" | ||
| effect: "NoSchedule"* | ||
| ---- | ||
|
|
||
| . Save the file to apply the changes. The new component placement configuration is applied automatically. | ||
|
|
||
| .Additional resources | ||
|
|
||
| * See the xref:../../nodes/scheduling/nodes-scheduler-taints-tolerations.adoc#nodes-scheduler-taints-tolerations[{product-title} documentation] on taints and tolerations. | ||
| * See the link:https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/[Kubernetes documentation] on taints and tolerations. | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/Make sure/Ensure