airflow.providers.cncf.kubernetes.callbacks
¶
Module Contents¶
Classes¶
Enum class for execution mode. |
|
KubernetesPodOperator callbacks methods. |
Attributes¶
- class airflow.providers.cncf.kubernetes.callbacks.ExecutionMode[source]¶
-
Enum class for execution mode.
- class airflow.providers.cncf.kubernetes.callbacks.KubernetesPodOperatorCallback[source]¶
KubernetesPodOperator callbacks methods.
Currently, the callbacks methods are not called in the async mode, this support will be added in the future.
- static on_sync_client_creation(*, client, **kwargs)[source]¶
Invoke this callback after creating the sync client.
- Parameters
client (kubernetes.client.CoreV1Api) – the created kubernetes.client.CoreV1Api client.
- static on_pod_creation(*, pod, client, mode, **kwargs)[source]¶
Invoke this callback after creating the pod.
- Parameters
pod (kubernetes.client.V1Pod) – the created pod.
client (client_type) – the Kubernetes client that can be used in the callback.
mode (str) – the current execution mode, it’s one of (sync, async).
- static on_pod_starting(*, pod, client, mode, **kwargs)[source]¶
Invoke this callback when the pod starts.
- Parameters
pod (kubernetes.client.V1Pod) – the started pod.
client (client_type) – the Kubernetes client that can be used in the callback.
mode (str) – the current execution mode, it’s one of (sync, async).
- static on_pod_completion(*, pod, client, mode, **kwargs)[source]¶
Invoke this callback when the pod completes.
- Parameters
pod (kubernetes.client.V1Pod) – the completed pod.
client (client_type) – the Kubernetes client that can be used in the callback.
mode (str) – the current execution mode, it’s one of (sync, async).
- static on_pod_cleanup(*, pod, client, mode, **kwargs)[source]¶
Invoke this callback after cleaning/deleting the pod.
- Parameters
pod (kubernetes.client.V1Pod) – the completed pod.
client (client_type) – the Kubernetes client that can be used in the callback.
mode (str) – the current execution mode, it’s one of (sync, async).
- static on_operator_resuming(*, pod, event, client, mode, **kwargs)[source]¶
Invoke this callback when resuming the KubernetesPodOperator from deferred state.