mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
Merge pull request #104011 from manugupt1/master
fix: 81134: display conflicted taint without a json representation
This commit is contained in:
commit
94a55684a8
@ -248,7 +248,7 @@ func (o TaintOptions) Validate() error {
|
||||
continue
|
||||
}
|
||||
if len(taintRemove.Effect) == 0 || taintAdd.Effect == taintRemove.Effect {
|
||||
conflictTaint := fmt.Sprintf("{\"%s\":\"%s\"}", taintRemove.Key, taintRemove.Effect)
|
||||
conflictTaint := fmt.Sprintf("%s=%s", taintRemove.Key, taintRemove.Effect)
|
||||
conflictTaints = append(conflictTaints, conflictTaint)
|
||||
}
|
||||
}
|
||||
|
@ -216,6 +216,12 @@ func TestTaint(t *testing.T) {
|
||||
expectFatal: true,
|
||||
expectTaint: false,
|
||||
},
|
||||
{
|
||||
description: "add and remove taint with same key and effect should be rejected",
|
||||
args: []string{"node", "node-name", "foo=:NoExcute", "foo=:NoExcute-"},
|
||||
expectFatal: true,
|
||||
expectTaint: false,
|
||||
},
|
||||
{
|
||||
description: "can't update existing taint on the node, since 'overwrite' flag is not set",
|
||||
oldTaints: []corev1.Taint{{
|
||||
|
Loading…
Reference in New Issue
Block a user