Files
kubernetes/pkg/kubectl/cmd
Kubernetes Submit Queue 8770b2e237 Merge pull request #29319 from juanvallejo/jvallejo_bugfix/single-resource-version-flag
Automatic merge from submit-queue

fix annotate.go single resource check

```release-note
Fix issue with kubectl annotate when --resource-version is provided.
```

When using `kubectl annotate` with a `--resource-version` on a resource, such as `kubectl annotate pod <pod_name> --resource-version=1820 description='myannotation'`, the command fails with the error: `error: --resource-version may only be used with a single resource`.

Upon printing the output of `resources` that the annotate command receives from cli args, it prints: `Resources:[pod <pod_name>]`. In other words, it treats the name of the resource as a second resource. This PR addresses this issue by using the resource builder `Singular` flag to determine if only a single resource was passed.
2016-08-04 13:26:50 -07:00
..
2016-08-02 19:51:51 +03:00
2016-08-02 19:51:51 +03:00
2016-07-08 13:53:09 +02:00
2016-07-18 00:32:13 -04:00
2016-07-20 13:37:14 -04:00
2016-07-20 13:37:14 -04:00
2016-08-02 19:51:51 +03:00
2016-07-29 02:29:26 -04:00
2016-07-27 10:54:11 +08:00
2016-07-14 16:23:02 +03:00
2016-07-08 13:53:09 +02:00
2016-07-20 13:37:14 -04:00
2016-07-20 13:37:14 -04:00
2016-07-28 17:47:03 +03:00
2016-07-14 16:23:02 +03:00
2016-07-08 13:53:09 +02:00
2016-07-08 13:53:09 +02:00
2016-07-14 16:23:02 +03:00
2016-07-20 13:37:14 -04:00
2016-07-08 13:53:09 +02:00
2016-07-14 16:23:02 +03:00