GetPodTolerations
Retrieves a list of Kubernetes tolerations for a pod based on whether it is interruptible and its resource requirements. It aggregates tolerations from configured resource-specific, interruptible, and default settings.
def GetPodTolerations(
interruptible: bool,
resourceRequirements: ...v1.ResourceRequirements
) - > []v1.Toleration
Retrieves a list of Kubernetes tolerations for a pod based on whether it is interruptible and its resource requirements. This function aggregates tolerations from various sources to ensure the pod can be scheduled appropriately.
Parameters
| Name | Type | Description |
|---|---|---|
| interruptible | bool | A boolean flag indicating whether the pod is interruptible. If true, specific tolerations for interruptible pods will be included. |
| resourceRequirements | ...v1.ResourceRequirements | A variadic slice of Kubernetes resource requirements for the pod. Tolerations associated with these requested resources (limits and requests) will be included. |
Returns
| Type | Description |
|---|---|
[]v1.Toleration | A slice of Kubernetes toleration objects applicable to the pod. |