Unverified Commit 35615881 authored by Ashley's avatar Ashley

Update tests to reflect that kubeadm taints should not override node taints

parent 792195ea
......@@ -82,11 +82,28 @@ func TestMarkMaster(t *testing.T) {
"{}",
},
{
"nothing missing but taint unwanted",
"has taint and no new taints wanted",
kubeadmconstants.LabelNodeRoleMaster,
[]v1.Taint{kubeadmconstants.MasterTaint},
[]v1.Taint{
{
Key: "node.cloudprovider.kubernetes.io/uninitialized",
Effect: v1.TaintEffectNoSchedule,
},
},
nil,
"{\"spec\":{\"taints\":null}}",
"{}",
},
{
"has taint and should merge with wanted taint",
kubeadmconstants.LabelNodeRoleMaster,
[]v1.Taint{
{
Key: "node.cloudprovider.kubernetes.io/uninitialized",
Effect: v1.TaintEffectNoSchedule,
},
},
[]v1.Taint{kubeadmconstants.MasterTaint},
"{\"spec\":{\"taints\":[{\"effect\":\"NoSchedule\",\"key\":\"node-role.kubernetes.io/master\"},{\"effect\":\"NoSchedule\",\"key\":\"node.cloudprovider.kubernetes.io/uninitialized\"}]}}",
},
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment