mirror of
https://github.com/kubereboot/kured.git
synced 2026-08-28 05:47:23 +00:00
Allow to disable tainting during pending node reboot by setting the taint name to an empty string.
This commit is contained in:
@@ -32,11 +32,19 @@ func New(client *kubernetes.Clientset, nodeID, taintName string, effect v1.Taint
|
||||
|
||||
// Enable creates the taint for a node. Creating an existing taint is a noop.
|
||||
func (t *Taint) Enable() {
|
||||
if t.taintName == "" {
|
||||
return
|
||||
}
|
||||
|
||||
preferNoSchedule(t.client, t.nodeID, t.taintName, t.effect, true)
|
||||
}
|
||||
|
||||
// Disable removes the taint for a node. Removing a missing taint is a noop.
|
||||
func (t *Taint) Disable() {
|
||||
if t.taintName == "" {
|
||||
return
|
||||
}
|
||||
|
||||
preferNoSchedule(t.client, t.nodeID, t.taintName, t.effect, false)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user