argoproj / argo-workflows

Workflow Engine for Kubernetes

Home Page:https://argo-workflows.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

EventSource logs fetching fails if more than 1 container in pod

aniro-s opened this issue · comments

Pre-requisites

  • I have double-checked my configuration
  • I can confirm the issue exists when I tested with :latest
  • I have searched existing issues and could not find a match for this bug
  • I'd like to contribute the fix myself (see contributing guide)

What happened/what did you expect to happen?

Prerequisites:

  • argo-events is up and running
  • event source pods contain more than one container (in my case istio is injected into all pods)

What happened:

  1. I created a simple eventsource:
metadata:
  name: calendar
  namespace: argo-events-dev
  labels:
    example: 'true'
spec:
  calendar:
    example-with-interval:
      interval: 10s
  1. event sources panel in argo-workflows shows nothing in the logs / events section
  2. argo server throws errors like this one:
"level":"error","msg":"a container name must be specified for pod calendar-test-eventsource-brjlx-767779c97f-7wmr9, choose one of: [istio-init istio-proxy main]"

Expected behavior:

  1. event source events are displayed in the UI

Potential fix

It seems the issue is similar to the one described here #9459
which was fixed by specifying default container name in sensor-service.ts: #9438

probably the same fix can be applied to the event-source-service.ts here:

eventSourcesLogs(namespace: string, name = '', eventSourceType = '', eventName = '', grep = '', tailLines = -1) {

fix pr - #12939

Version

v3.5.5

Paste a small workflow that reproduces the issue. We must be able to run the workflow; don't enter a workflows that uses private images.

NA

Logs from the workflow controller

NA

Logs from in your workflow's wait container

NA