apache / airflow

Apache Airflow - A platform to programmatically author, schedule, and monitor workflows
https://airflow.apache.org/
Apache License 2.0
37.34k stars 14.34k forks source link

Kubernetes Pod Operator Init container logging #42498

Open johnhoran opened 2 months ago

johnhoran commented 2 months ago

Description

When writing a pod using an init container, I notice that you don't get any logs from the init container. I tried adding the name of the init container to the container_logs option in KubernetesPodOperator, but it complains that the container couldn't be found.
I also noticed that the airflow would say the pod was pending while the init container process was running.

Use case/motivation

Related issues

No response

Are you willing to submit a PR?

Code of Conduct

jscheffl commented 3 weeks ago

Thanks for the proposal - I think is is a valid feature! If you implement it, you might make this configurable, maybe not everybody wants logs, maybe some only on error?