Unverified Commit 141e4ee0 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

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 ```
parents a1b54f3c 746bca24
......@@ -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 {
......
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