Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sidecar/Init containers causes verify to stop working #9626

Open
davidgammon-mettle opened this issue Dec 23, 2024 · 0 comments · May be fixed by #9627
Open

Sidecar/Init containers causes verify to stop working #9626

davidgammon-mettle opened this issue Dec 23, 2024 · 0 comments · May be fixed by #9627

Comments

@davidgammon-mettle
Copy link

davidgammon-mettle commented Dec 23, 2024

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

  1. Enable istio on the default namespace: istio-injection
  2. 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).

@davidgammon-mettle davidgammon-mettle linked a pull request Dec 23, 2024 that will close this issue
@davidgammon-mettle davidgammon-mettle changed the title Sidecar/Init containers cause verify to stop working Sidecar/Init containers causes verify to stop working Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant