mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 19:01:49 +00:00
Merge pull request #36994 from gmarek/taints
Automatic merge from submit-queue Delete taint annotation when removing last taint It messes with debugging of tests failures. cc @davidopp @kevin-wangzefeng
This commit is contained in:
commit
3ed6000c82
@ -2587,10 +2587,14 @@ func RemoveTaintOffNode(c clientset.Interface, nodeName string, taint api.Taint)
|
||||
|
||||
newTaints, err := deleteTaint(nodeTaints, taint)
|
||||
ExpectNoError(err)
|
||||
if len(newTaints) == 0 {
|
||||
delete(node.Annotations, api.TaintsAnnotationKey)
|
||||
} else {
|
||||
taintsData, err := json.Marshal(newTaints)
|
||||
ExpectNoError(err)
|
||||
node.Annotations[api.TaintsAnnotationKey] = string(taintsData)
|
||||
}
|
||||
|
||||
taintsData, err := json.Marshal(newTaints)
|
||||
ExpectNoError(err)
|
||||
node.Annotations[api.TaintsAnnotationKey] = string(taintsData)
|
||||
_, err = c.Core().Nodes().Update(node)
|
||||
if err != nil {
|
||||
if !apierrs.IsConflict(err) {
|
||||
|
Loading…
Reference in New Issue
Block a user