astronomer.providers.cncf.kubernetes.operators.kubernetes_pod

Module Contents

Classes

KubernetesPodOperatorAsync

Async (deferring) version of KubernetesPodOperator

exception astronomer.providers.cncf.kubernetes.operators.kubernetes_pod.PodNotFoundException[source]

Bases: airflow.exceptions.AirflowException

Expected pod does not exist in kube-api.

class astronomer.providers.cncf.kubernetes.operators.kubernetes_pod.KubernetesPodOperatorAsync(*, poll_interval=5, **kwargs)[source]

Bases: airflow.providers.cncf.kubernetes.operators.kubernetes_pod.KubernetesPodOperator

Async (deferring) version of KubernetesPodOperator

Warning

The logs would not be available in the Airflow Webserver until the task completes. This is the main difference between this operator and the KubernetesPodOperator.

Parameters

poll_interval (int) – interval in seconds to sleep between checking pod status

static raise_for_trigger_status(event)[source]

Raise exception if pod is not in expected state.

execute(self, context)[source]

This is the main method to derive when creating an operator. Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

execute_complete(self, context, event)[source]

Callback for when the trigger fires - returns immediately. Relies on trigger to throw an exception, otherwise it assumes execution was successful.