Skip to content

Commit 50f21d7

Browse files
authored
docs: added help doc for tolerations setting (#169)
1 parent 2ee5c00 commit 50f21d7

File tree

2 files changed

+53
-1
lines changed

2 files changed

+53
-1
lines changed

solutions/fully-configurable/DA-types.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,55 @@ map(any)
9494
]
9595
}
9696
```
97+
98+
## `tolerations`
99+
100+
The `tolerations` setting can be used to define the tolerations that the IBM Cloud Monitoring agent applies to its pods. This variable allows you to define which **node taints** the monitoring agent should **tolerate** when deployed. It ensures that agent pods can be scheduled on nodes with specific taints.
101+
102+
### Options
103+
104+
Entries in the list of `tolerations` can have the following fields.
105+
106+
- `key` (optional): The taint key that the toleration applies to.
107+
- `operator` (optional): The operator to use for the toleration. Valid values are `Exists` and `Equal`.
108+
- `value` (optional): The value to match for the taint key.
109+
- `effect` (optional): The effect of the taint to tolerate. Valid values are `NoSchedule`, `PreferNoSchedule`, and `NoExecute`.
110+
- `tolerationSeconds` (optional): The duration (in seconds) for which the toleration is valid when the `effect` is `NoExecute`.
111+
112+
### Default
113+
114+
```hcl
115+
[
116+
{
117+
operator = "Exists"
118+
},
119+
{
120+
operator = "Exists"
121+
effect = "NoSchedule"
122+
key = "node-role.kubernetes.io/master"
123+
}
124+
]
125+
```
126+
The default behaviour configures the agent to tolerate any taint and explicitly allows master node taints (`NoSchedule`).
127+
128+
### Example Usage
129+
130+
```hcl
131+
[
132+
{
133+
key = "example-key"
134+
operator = "Equal"
135+
value = "example-value"
136+
effect = "NoSchedule"
137+
},
138+
{
139+
operator = "Exists"
140+
}
141+
]
142+
```
143+
- The first toleration applies to any nodes with taint key `example-key` and a value of `example-value`, with the `NoSchedule` effect.
144+
- The second toleration applies to any taint key regardless of value, due to the `Exists` operator.
145+
146+
### References
147+
148+
- [Kubernetes Taints and Tolerations](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/)

solutions/fully-configurable/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ variable "namespace" {
125125
}
126126

127127
variable "tolerations" {
128-
description = "List of tolerations to apply to the agent." # TODO: Add learn more doc and ensure use textbox in catalog json
128+
description = "List of tolerations to apply to the agent. [Learn more](https://github.com/terraform-ibm-modules/terraform-ibm-monitoring-agent/blob/main/solutions/fully-configurable/DA-types.md#tolerations)."
129129
type = list(object({
130130
key = optional(string)
131131
operator = optional(string)

0 commit comments

Comments
 (0)