airflow.providers.cncf.kubernetes.triggers.job

Module Contents

Classes

KubernetesJobTrigger

KubernetesJobTrigger run on the trigger worker to check the state of Job.

class airflow.providers.cncf.kubernetes.triggers.job.KubernetesJobTrigger(job_name, job_namespace, kubernetes_conn_id=None, poll_interval=10.0, cluster_context=None, config_file=None, in_cluster=None)[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.

  • 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.

serialize()[source]

Serialize KubernetesCreateJobTrigger arguments and classpath.

async run()[source]

Get current job status and yield a TriggerEvent.

hook()[source]

Was this entry helpful?