diff --git a/solutions/fully-configurable/DA-types.md b/solutions/fully-configurable/DA-types.md index 3e80bd8b..b0547518 100644 --- a/solutions/fully-configurable/DA-types.md +++ b/solutions/fully-configurable/DA-types.md @@ -94,3 +94,55 @@ map(any) ] } ``` + +## `tolerations` + +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. + +### Options + +Entries in the list of `tolerations` can have the following fields. + +- `key` (optional): The taint key that the toleration applies to. +- `operator` (optional): The operator to use for the toleration. Valid values are `Exists` and `Equal`. +- `value` (optional): The value to match for the taint key. +- `effect` (optional): The effect of the taint to tolerate. Valid values are `NoSchedule`, `PreferNoSchedule`, and `NoExecute`. +- `tolerationSeconds` (optional): The duration (in seconds) for which the toleration is valid when the `effect` is `NoExecute`. + +### Default + +```hcl +[ + { + operator = "Exists" + }, + { + operator = "Exists" + effect = "NoSchedule" + key = "node-role.kubernetes.io/master" + } +] +``` +The default behaviour configures the agent to tolerate any taint and explicitly allows master node taints (`NoSchedule`). + +### Example Usage + +```hcl +[ + { + key = "example-key" + operator = "Equal" + value = "example-value" + effect = "NoSchedule" + }, + { + operator = "Exists" + } +] +``` +- The first toleration applies to any nodes with taint key `example-key` and a value of `example-value`, with the `NoSchedule` effect. +- The second toleration applies to any taint key regardless of value, due to the `Exists` operator. + +### References + +- [Kubernetes Taints and Tolerations](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) diff --git a/solutions/fully-configurable/variables.tf b/solutions/fully-configurable/variables.tf index 322291ad..f6b5da09 100644 --- a/solutions/fully-configurable/variables.tf +++ b/solutions/fully-configurable/variables.tf @@ -125,7 +125,7 @@ variable "namespace" { } variable "tolerations" { - description = "List of tolerations to apply to the agent." # TODO: Add learn more doc and ensure use textbox in catalog json + 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)." type = list(object({ key = optional(string) operator = optional(string)