airflow.providers.cncf.kubernetes.triggers.job
¶
Module Contents¶
Classes¶
KubernetesJobTrigger run on the trigger worker to check the state of Job. |
- class airflow.providers.cncf.kubernetes.triggers.job.KubernetesJobTrigger(job_name, job_namespace, pod_name, pod_namespace, base_container_name, kubernetes_conn_id=None, poll_interval=10.0, cluster_context=None, config_file=None, in_cluster=None, get_logs=True, do_xcom_push=False)[source]¶
Bases:
airflow.triggers.base.BaseTrigger
KubernetesJobTrigger run on the trigger worker to check the state of Job.
- Parameters
job_name (str) – The name of the job.
job_namespace (str) – The namespace of the job.
pod_name (str) – The name of the Pod.
pod_namespace (str) – The namespace of the Pod.
base_container_name (str) – The name of the base container in the pod.
kubernetes_conn_id (str | None) – The kubernetes connection id for the Kubernetes cluster.
cluster_context (str | None) – Context that points to kubernetes cluster.
config_file (str | None) – Path to kubeconfig file.
poll_interval (float) – Polling period in seconds to check for the status.
in_cluster (bool | None) – run kubernetes client with in_cluster configuration.
get_logs (bool) – get the stdout of the base container as logs of the tasks.
do_xcom_push (bool) – If True, the content of the file /airflow/xcom/return.json in the container will also be pushed to an XCom when the container completes.