tolerations

package
v2.10.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DefaultDaemonSetTolerations are the tolerations added to a DaemonSet by default.
	DefaultDaemonSetTolerations = []corev1.Toleration{

		{
			Key:      corev1.TaintNodeNotReady,
			Operator: corev1.TolerationOpExists,
			Effect:   corev1.TaintEffectNoExecute,
		},
		{
			Key:      corev1.TaintNodeUnreachable,
			Operator: corev1.TolerationOpExists,
			Effect:   corev1.TaintEffectNoExecute,
		},
		{
			Key:      corev1.TaintNodeDiskPressure,
			Operator: corev1.TolerationOpExists,
			Effect:   corev1.TaintEffectNoSchedule,
		},
		{
			Key:      corev1.TaintNodeMemoryPressure,
			Operator: corev1.TolerationOpExists,
			Effect:   corev1.TaintEffectNoSchedule,
		},
		{
			Key:      corev1.TaintNodePIDPressure,
			Operator: corev1.TolerationOpExists,
			Effect:   corev1.TaintEffectNoSchedule,
		},
		{
			Key:      corev1.TaintNodeUnschedulable,
			Operator: corev1.TolerationOpExists,
			Effect:   corev1.TaintEffectNoSchedule,
		},
		{
			Key:      corev1.TaintNodeNetworkUnavailable,
			Operator: corev1.TolerationOpExists,
			Effect:   corev1.TaintEffectNoSchedule,
		},
	}
	// HAControllerTolerations tolerate taints generated by the HA Controller.
	HAControllerTolerations = []corev1.Toleration{
		{
			Key:      metadata.NodeForceIoErrorTaint,
			Operator: corev1.TolerationOpExists,
			Effect:   corev1.TaintEffectNoSchedule,
		},
		{
			Key:      metadata.NodeLostQuorumTaint,
			Operator: corev1.TolerationOpExists,
			Effect:   corev1.TaintEffectNoSchedule,
		},
	}

	// FailOverTimeOut is the number of seconds the LINSTOR Controller should tolerate fail-over worthy Taints.
	FailOverTimeOut = int64(30)
	// LinstorControllerTolerations tolerate fail-over relevant taints only up to FailOverTimeOut
	LinstorControllerTolerations = []corev1.Toleration{
		{
			Key:               corev1.TaintNodeUnreachable,
			Operator:          corev1.TolerationOpExists,
			Effect:            corev1.TaintEffectNoExecute,
			TolerationSeconds: &FailOverTimeOut,
		},
		{
			Key:               corev1.TaintNodeNotReady,
			Operator:          corev1.TolerationOpExists,
			Effect:            corev1.TaintEffectNoExecute,
			TolerationSeconds: &FailOverTimeOut,
		},
	}

	// NoScheduleToleration tolerates all NoSchedule taints.
	NoScheduleToleration = []corev1.Toleration{
		{
			Effect:   corev1.TaintEffectNoSchedule,
			Operator: corev1.TolerationOpExists,
		},
	}
)

Functions

func MergeTolerations

func MergeTolerations(tolerations ...[]corev1.Toleration) []corev1.Toleration

MergeTolerations combines all the given tolerations.

An earlier matching toleration is always replaced.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL