Sidecar/Init containers causes verify to stop working #9626
Open
Description
Expected behaviour
A test pod with side cars and init containers used by verify should work the same as one without side cars and init containers
Actual behaviour
When a pod has more than one container, verify does not work and the command hangs.
Information
- Skaffold version: v2.13.2
- Operating system: Mac
- Installed via: Homebrew
Steps to reproduce the behavior
- Enable istio on the default namespace: istio-injection
- Run verify: skaffold verify -a actifacts.json
Problem
When Skaffold is querying for logs the following error occurs due to there being an Istio init container and istio side car container:
a container name must be specified for pod
Unfortunately this exception is swallowed by this code and the command seems to hang:
if err != nil {
return false, nil
}
This PR fixes the issue by supplying the container name as part of the log options used to get the logs. This assumes that the first container is the container that is running the test image (so not ideal).
Metadata
Assignees
Labels
No labels