types: Add new setting for Taint Toleration
@@ -50,6 +50,7 @@ const (
SettingNameGuaranteedEngineCPU = SettingName("guaranteed-engine-cpu")
SettingNameDefaultLonghornStaticStorageClass = SettingName("default-longhorn-static-storage-class")
SettingNameBackupstorePollInterval = SettingName("backupstore-poll-interval")
+ SettingNameTaintToleration = SettingName("taint-toleration")
)
var (
@@ -68,6 +69,7 @@ var (
SettingNameGuaranteedEngineCPU,
SettingNameDefaultLonghornStaticStorageClass,
SettingNameBackupstorePollInterval,
+ SettingNameTaintToleration,
}
)
@@ -105,6 +107,7 @@ var (
SettingNameGuaranteedEngineCPU: SettingDefinitionGuaranteedEngineCPU,
SettingNameDefaultLonghornStaticStorageClass: SettingDefinitionDefaultLonghornStaticStorageClass,
SettingNameBackupstorePollInterval: SettingDefinitionBackupstorePollInterval,
+ SettingNameTaintToleration: SettingDefinitionTaintToleration,
}
SettingDefinitionBackupTarget = SettingDefinition{
@@ -249,6 +252,18 @@ var (
ReadOnly: false,
Default: "longhorn-static",
}
+
+ SettingDefinitionTaintToleration = SettingDefinition{
+ DisplayName: "Kubernetes Taint Toleration",
+ Description: `By setting tolerations for Longhorn then adding taints for the nodes, the nodes with large storage can be dedicated to Longhorn only (to store replica data) and reject other general workloads.
+Before modifying toleration setting, all Longhorn volumes should be detached then Longhorn components will be restarted to apply new tolerations. And toleration update will take a while. Users cannot operate Longhorn system during update. Hence it's recommended to set toleration during Longhorn deployment.
+Multiple tolerations can be set here, and these tolerations are separated by comma. For example, "key1=value1:NoSchedule, key2:NoExecute".
+Notice that "kubernetes.io" is used as the key of all Kubernetes default tolerations, please do not contain this substring in your toleration setting.`,
+ Category: SettingCategoryGeneral,
+ Type: SettingTypeString,
+ Required: false,
+ ReadOnly: false,
+ }
)
func ValidateInitSetting(name, value string) (err error) {
