raphaelauv opened a new issue, #30097:
URL: https://github.com/apache/airflow/issues/30097

   ### Apache Airflow Provider(s)
   
   cncf-kubernetes
   
   ### Versions of Apache Airflow Providers
   
   apache-airflow-providers-cncf-kubernetes==5.2.2
   
   ### Apache Airflow version
   
   2.5.2rc2
   
   ### Operating System
   
   ubuntu 22.04
   
   ### Deployment
   
   Docker-Compose
   
   ### Deployment details
   
   _No response_
   
   ### What happened
   
   the log of the triggerer process show the full config_dict with the K8S 
credentials
   
   I replaced the credentials with XXXXXX in this example -> 
   ```log
   2023-03-14 12:43:32,213] {triggerer_job.py:359} INFO - Trigger 
<airflow.providers.cncf.kubernetes.triggers.kubernetes_pod.KubernetesPodTrigger 
pod_name=airflow-test-pod-7uscirwh, pod_namespace=default, 
base_container_name=base, kubernetes_conn_id=kubernetes_default, 
poll_interval=2, cluster_context=None, config_dict={'apiVersion': 'v1', 
'clusters': [{'cluster': {'certificate-authority-data': 
'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', 'server': 
'https://kind-control-plane:6443'}, 'name': 'kind-kind'}], 'contexts': 
[{'context': {'cluster': 'kind-kind', 'user': 'kind-kind'}, 'name': 
'kind-kind'}], 'current-context': 'kind-kind', 'kind': 'Config', 'preferences': 
{}, 'users': [{'name': 'kind-kind', 'user': {'client-certificate-data': 
'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', 'client-key-data': 
'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'}}]}, 
in_cluster=None, should_delete_pod=True, get_logs=True, startup_timeout=120, tr
 igger_start_time=2023-03-14T12:43:31.189834+00:00> (ID 4) starting
   2023-03-14T12:43:32.214686035Z [2023-03-14 12:43:32,214] 
{kubernetes_pod.py:122} INFO - Checking pod 'airflow-test-pod-7uscirwh' in 
namespace 'default'.
   2023-03-14T12:43:32.218581616Z [2023-03-14 12:43:32,218] {base.py:73} INFO - 
Using connection ID 'kubernetes_default' for task execution.
   2023-03-14T12:43:32.249594574Z [2023-03-14 12:43:32,249] 
{kubernetes_pod.py:147} INFO - Container is not completed and still working.
   ```
   
   probably related to https://github.com/apache/airflow/pull/29498
   
   ### What you think should happen instead
   
   _No response_
   
   ### How to reproduce
   
   ```python
   from pendulum import today
   from airflow import DAG
   from airflow.providers.cncf.kubernetes.operators.kubernetes_pod import 
KubernetesPodOperator
   
   dag = DAG(
       dag_id="kubernetes_dag",
       schedule_interval="0 0 * * *",
       start_date=today("UTC").add(days=-1)
   )
   
   with dag:
       KubernetesPodOperator(
           task_id="task-one",
           namespace="default",
           kubernetes_conn_id="kubernetes_default",
           config_file="/opt/airflow/include/.kube/config",  # buf of deferrable
           name="airflow-test-pod",
           image="alpine:3.16.2",
           cmds=["sh", "-c", "echo toto"],
           is_delete_operator_pod=True,
           deferrable=True,
           get_logs=True,
       )
   
   ```
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to