You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Automatic merge from submit-queue (batch tested with PRs 66920, 67316, 67363, 67528, 66963). 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>.
Fixes regression in kubectl logs: the --all-containers=true option didn't work
**What this PR does / why we need it**:
Fixes regression introduced in #66398 and adds unit tests for logging with `--all-containers=true`. See #67314 for more details.
**Which issue(s) this PR fixes**:
Fixes#67314
**Special notes for your reviewer**:
I didn't cover cases with `coreinternal.PodList` and `coreinternal.Pod` in tests, because it doesn't look like we need them: I didn't manage to find any callers of the `logsForObjectWithClient` and `logsForObject` functions, so, probably, we can remove them. I'll double check and try to do that separately once this PR is merged.
**Release note**:
```release-note
NONE
```
/sig cli
Is this a BUG REPORT or FEATURE REQUEST?:
/kind bug
What happened:
The
--all-containers=true
option was added in #45275. It allows to get logs from pods/deployments with multiple containers.It doesn't seem to work in the
master
branch (I tested on 6274590).So the following commands:
shows an errors like this:
What you expected to happen:
kubectl logs
prints logs from all pods event if pod has multiple containers.How to reproduce it (as minimally and precisely as possible):
kubectl logs pod-name-with-multiple-containers --all-containers=true
Anything else we need to know?:
It works in kubectl 1.11:
but doesn't work in kubectl built from current
master
:Environment:
kubectl version
): see above/sig cli
The text was updated successfully, but these errors were encountered: