mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Merge pull request #63769 from liggitt/kubectl-taint-internal-object
Automatic merge from submit-queue (batch tested with PRs 55511, 63372, 63400, 63100, 63769). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. print result object from kubectl taint correctly fixes #63767 ```release-note NONE ```
This commit is contained in:
commit
141e4ee0ca
@ -4617,6 +4617,17 @@ __EOF__
|
||||
}
|
||||
__EOF__
|
||||
|
||||
# taint/untaint
|
||||
# Pre-condition: node has no taints
|
||||
kube::test::get_object_assert "nodes 127.0.0.1" "{{.spec.taints}}" '<no value>'
|
||||
# taint can add a taint
|
||||
kubectl taint node 127.0.0.1 dedicated=foo:PreferNoSchedule
|
||||
kube::test::get_object_assert "nodes 127.0.0.1" '{{range .spec.taints}}{{.effect}}{{end}}' 'PreferNoSchedule'
|
||||
# taint can remove a taint
|
||||
kubectl taint node 127.0.0.1 dedicated-
|
||||
# Post-condition: node has no taints
|
||||
kube::test::get_object_assert "nodes 127.0.0.1" "{{.spec.taints}}" '<no value>'
|
||||
|
||||
### kubectl cordon update with --dry-run does not mark node unschedulable
|
||||
# Pre-condition: node is schedulable
|
||||
kube::test::get_object_assert "nodes 127.0.0.1" "{{.spec.unschedulable}}" '<no value>'
|
||||
|
@ -290,6 +290,7 @@ func (o TaintOptions) RunTaint() error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
outputObj = cmdutil.AsDefaultVersionedOrOriginal(outputObj, mapping)
|
||||
|
||||
printer, err := o.ToPrinter(operation)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user