k3s/pkg/kubectl/resource
Kubernetes Submit Queue c338209e4f
Merge pull request #57500 from niuzhenguo/unique-resource-mappings
Automatic merge from submit-queue (batch tested with PRs 57500, 58840, 58883). 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>.

Make REST mappings for resources a unique list

This ensures the mappings list for resources(shortcuts, plural) unique,
instead of doing multiple requests to server for the same resource.



**What this PR does / why we need it**:
Treat resource shortcuts, plurals the same thing on kubectl side instead of doing multiple requests to servers, and outputs should not duplicate entires.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #57498 

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-01-26 13:34:33 -08:00
..
BUILD Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
builder.go Make REST mappings for resources a unique list 2018-01-26 15:46:35 +08:00
builder_test.go All commands must declare Unstructured or Internal 2017-11-19 20:41:02 -05:00
doc.go Use Go canonical import paths 2016-07-16 13:48:21 -04:00
helper.go add fieldSelector for kubectl get 2017-11-06 14:30:56 +08:00
helper_test.go add tests 2017-11-06 17:24:59 +08:00
interfaces.go Allow resource.Builder to modify requests per client 2017-11-18 14:34:26 -05:00
mapper.go Unify unstructured and versioned object in resource.Builder 2017-11-19 19:02:25 -05:00
result.go Unify unstructured and versioned object in resource.Builder 2017-11-19 19:02:25 -05:00
selector.go Unify unstructured and versioned object in resource.Builder 2017-11-19 19:02:25 -05:00
visitor.go Builder should allow moving between unstructured / versioned easily 2017-11-19 19:16:49 -05:00
visitor_test.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00