k3s/pkg
Kubernetes Submit Queue 1d97b6a4f1
Merge pull request #59705 from phsiao/15180_port_forward_with_resource_name
Automatic merge from submit-queue. 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>.

kubectl port-forward allows using resource name to select a matching pod

**What this PR does / why we need it**:

#15180 describes use cases that port-foward should use resource name for selecting a pod.

**Which issue(s) this PR fixes**:

Add support so resource/name can be used to select a pod.

**Special notes for your reviewer**:

I decided to reuse `AttachablePodForObject` to select a pod using resource name, and extended it to support Service (which it did not).   I think that should not be a problem, and may help improve attach's use case.  If it makes more sense to fork the function I'd be happy to do so.  The practice of waiting for pods to become ready is also copied over.

In keeping the change to minimal, I also decided to resolve pod from resource name in Complete(), following the pattern in attach.

**Release note**:

```release-note
kubectl port-forward now allows using resource name (e.g., deployment/www) to select a matching pod, as well as allows the use of --pod-running-timeout to wait till at least one pod is running.
kubectl port-forward no longer support deprecated -p flag
```
2018-02-13 11:51:46 -08:00
..
api Remove myself (timothysc) from OWNERS files on areas that I do not 2018-02-12 18:56:41 -06:00
apis Remove myself (timothysc) from OWNERS files on areas that I do not 2018-02-12 18:56:41 -06:00
auth fix all the typos across the project 2018-02-11 11:04:14 +08:00
capabilities
client Fix typo 2018-02-01 19:11:19 +08:00
cloudprovider Merge pull request #57969 from jsafrane/aws-approver 2018-02-12 19:41:02 -08:00
controller fix all the typos across the project 2018-02-11 11:04:14 +08:00
credentialprovider
features fix all the typos across the project 2018-02-11 11:04:14 +08:00
fieldpath
generated Merge pull request #59334 from cblecker/top-dir-owners 2018-02-05 21:14:37 -08:00
kubeapiserver apiserver: make SecureServingOptions and authz/n options re-usable 2018-02-13 11:16:38 +01:00
kubectl kubectl port-forward allows using resource name to select a matching pod 2018-02-13 12:10:02 -05:00
kubelet Merge pull request #59681 from mtaufen/kc-empty-eviction-hard 2018-02-13 09:48:11 -08:00
kubemark
master Merge pull request #59582 from sttts/sttts-ctrl-mgr-auth 2018-02-13 11:12:47 -08:00
printers fix all the typos across the project 2018-02-11 11:04:14 +08:00
probe
proxy Merge pull request #52528 from m1093782566/refactor-proxy 2018-02-12 23:29:50 -08:00
quota fix all the typos across the project 2018-02-11 11:04:14 +08:00
registry controller-manager: switch to config/option struct pattern 2018-02-13 11:16:17 +01:00
routes Remove /ui/ redirect 2018-02-12 10:54:33 -05:00
scheduler Merge pull request #59734 from mlmhl/format_imports 2018-02-13 08:04:15 -08:00
security fix all the typos across the project 2018-02-11 11:04:14 +08:00
securitycontext
serviceaccount svcacct: move claim generation out of TokenGenerator 2018-02-06 13:19:54 -08:00
ssh
util Merge pull request #59818 from msau42/owners 2018-02-13 11:13:04 -08:00
version Kubelet flags take precedence 2018-01-29 10:07:37 -08:00
volume Merge pull request #56454 from mtanino/volumehandler-refactor 2018-02-12 15:44:33 -08:00
watch/json
.import-restrictions
BUILD Merge pull request #58295 from zouyee/outdate 2018-02-05 22:28:41 -08:00
OWNERS