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

Kubernetes Pod Operator Init container logging #42498

Closed
2 tasks done
johnhoran opened this issue Sep 26, 2024 · 1 comment · Fixed by #43853
Closed
2 tasks done

Kubernetes Pod Operator Init container logging #42498

johnhoran opened this issue Sep 26, 2024 · 1 comment · Fixed by #43853
Labels
kind:bug This is a clearly a bug kind:feature Feature Requests provider:cncf-kubernetes Kubernetes provider related issues

Comments

@johnhoran
Copy link

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

  • When init containers are running the task should be consider running.
  • Logs from init containers should be shown

Related issues

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@johnhoran johnhoran added kind:feature Feature Requests needs-triage label for new issues that we didn't triage yet labels Sep 26, 2024
@dosubot dosubot bot added kind:bug This is a clearly a bug provider:cncf-kubernetes Kubernetes provider related issues labels Sep 26, 2024
@jscheffl
Copy link
Contributor

jscheffl commented Nov 2, 2024

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?

@jscheffl jscheffl removed the needs-triage label for new issues that we didn't triage yet label Nov 2, 2024
mrk-andreev added a commit to mrk-andreev/airflow that referenced this issue Nov 9, 2024
This change adds an option to print logs for init containers. The get_init_containers_logs and init_container_logs functions allow displaying the logs of init containers.

Fixes: apache#42498
mrk-andreev added a commit to mrk-andreev/airflow that referenced this issue Nov 9, 2024
This change adds an option to print logs for init containers. The get_init_containers_logs and init_container_logs functions allow displaying the logs of init containers.

Fixes: apache#42498
mrk-andreev added a commit to mrk-andreev/airflow that referenced this issue Nov 10, 2024
This change adds an option to print logs for init containers. The init_container_logs functions allow displaying the logs of init containers.

Fixes: apache#42498
mrk-andreev added a commit to mrk-andreev/airflow that referenced this issue Nov 10, 2024
…che#42498)

This change adds an option to print logs for init containers. The init_container_logs functions allow displaying the logs of init containers.

Fixes: apache#42498
mrk-andreev added a commit to mrk-andreev/airflow that referenced this issue Nov 10, 2024
…che#42498)

This change adds an option to print logs for init containers. The get_init_containers_logs and init_container_logs functions allow displaying the logs of init containers.

Fixes: apache#42498
mrk-andreev added a commit to mrk-andreev/airflow that referenced this issue Nov 10, 2024
…che#42498)

This change adds an option to print logs for init containers. The init_container_logs argument enables the display of logs specifically for spec.initContainers (not spec.containers).

Fixes: apache#42498
mrk-andreev added a commit to mrk-andreev/airflow that referenced this issue Nov 10, 2024
…che#42498)

This change adds an option to print logs for init containers. The init_container_logs argument enables the display of logs specifically for spec.initContainers (not spec.containers).

Fixes: apache#42498
mrk-andreev added a commit to mrk-andreev/airflow that referenced this issue Nov 12, 2024
…che#42498)

This change adds an option to print logs for init containers. The init_container_logs argument enables the display of logs specifically for spec.initContainers (not spec.containers).

Fixes: apache#42498
mrk-andreev added a commit to mrk-andreev/airflow that referenced this issue Nov 12, 2024
…che#42498)

This change adds an option to print logs for init containers. The init_container_logs argument enables the display of logs specifically for spec.initContainers (not spec.containers).

Fixes: apache#42498
mrk-andreev added a commit to mrk-andreev/airflow that referenced this issue Nov 12, 2024
…che#42498)

This change adds an option to print logs for init containers. The get_init_containers_logs and init_container_logs functions allow displaying the logs of init containers.

Fixes: apache#42498
mrk-andreev added a commit to mrk-andreev/airflow that referenced this issue Nov 12, 2024
…che#42498)

This change adds an option to print logs for init containers. The get_init_containers_logs and init_container_logs functions allow displaying the logs of init containers.

Fixes: apache#42498
mrk-andreev added a commit to mrk-andreev/airflow that referenced this issue Nov 13, 2024
…che#42498)

This change adds an option to print logs for init containers. The get_init_containers_logs and init_container_logs functions allow displaying the logs of init containers.

Fixes: apache#42498
mrk-andreev added a commit to mrk-andreev/airflow that referenced this issue Nov 14, 2024
…che#42498)

This change adds an option to print logs for init containers. The get_init_containers_logs and init_container_logs functions allow displaying the logs of init containers.

Fixes: apache#42498
mrk-andreev added a commit to mrk-andreev/airflow that referenced this issue Dec 3, 2024
…che#42498)

This change adds an option to print logs for init containers. The get_init_containers_logs and init_container_logs functions allow displaying the logs of init containers.

Fixes: apache#42498
eladkal pushed a commit to mrk-andreev/airflow that referenced this issue Dec 12, 2024
…che#42498)

This change adds an option to print logs for init containers. The get_init_containers_logs and init_container_logs functions allow displaying the logs of init containers.

Fixes: apache#42498
potiuk pushed a commit to mrk-andreev/airflow that referenced this issue Dec 16, 2024
…che#42498)

This change adds an option to print logs for init containers. The get_init_containers_logs and init_container_logs functions allow displaying the logs of init containers.

Fixes: apache#42498
@potiuk potiuk closed this as completed in 60eced9 Dec 17, 2024
LefterisXefteris pushed a commit to LefterisXefteris/airflow that referenced this issue Jan 5, 2025
…che#42498) (apache#43853)

This change adds an option to print logs for init containers. The get_init_containers_logs and init_container_logs functions allow displaying the logs of init containers.

Fixes: apache#42498
agupta01 pushed a commit to agupta01/airflow that referenced this issue Jan 6, 2025
…che#42498) (apache#43853)

This change adds an option to print logs for init containers. The get_init_containers_logs and init_container_logs functions allow displaying the logs of init containers.

Fixes: apache#42498
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug This is a clearly a bug kind:feature Feature Requests provider:cncf-kubernetes Kubernetes provider related issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants