airflow.providers.cncf.kubernetes.kubernetes_helper_functions
¶
Module Contents¶
Functions¶
|
Generate unique pod or job ID given a dag_id and / or task_id. |
|
Build a TaskInstanceKey based on pod annotations. |
|
|
|
Check if an Exception indicates a transient error and warrants retrying. |
Attributes¶
- airflow.providers.cncf.kubernetes.kubernetes_helper_functions.create_unique_id(dag_id=None, task_id=None, *, max_length=POD_NAME_MAX_LENGTH, unique=True)[source]¶
Generate unique pod or job ID given a dag_id and / or task_id.
- airflow.providers.cncf.kubernetes.kubernetes_helper_functions.annotations_to_key(annotations)[source]¶
Build a TaskInstanceKey based on pod annotations.
- airflow.providers.cncf.kubernetes.kubernetes_helper_functions.annotations_for_logging_task_metadata(annotation_set)[source]¶
- airflow.providers.cncf.kubernetes.kubernetes_helper_functions.should_retry_creation(exception)[source]¶
Check if an Exception indicates a transient error and warrants retrying.
This function is needed for preventing ‘No agent available’ error. The error appears time to time when users try to create a Resource or Job. This issue is inside kubernetes and in the current moment has no solution. Like a temporary solution we decided to retry Job or Resource creation request each time when this error appears. More about this issue here: https://github.com/cert-manager/cert-manager/issues/6457