mirror of https://github.com/k3s-io/k3s
![]() 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 ``` |
||
---|---|---|
.. | ||
api | ||
apis | ||
auth | ||
capabilities | ||
client | ||
cloudprovider | ||
controller | ||
credentialprovider | ||
features | ||
fieldpath | ||
generated | ||
kubeapiserver | ||
kubectl | ||
kubelet | ||
kubemark | ||
master | ||
printers | ||
probe | ||
proxy | ||
quota | ||
registry | ||
routes | ||
scheduler | ||
security | ||
securitycontext | ||
serviceaccount | ||
ssh | ||
util | ||
version | ||
volume | ||
watch/json | ||
.import-restrictions | ||
BUILD | ||
OWNERS |