apache-airflow-providers-cncf-kubernetes 8.3.2__tar.gz → 8.3.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/PKG-INFO +6 -6
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/README.rst +3 -3
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/__init__.py +1 -1
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/callbacks.py +16 -8
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/decorators/kubernetes.py +2 -1
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/get_provider_info.py +2 -1
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/hooks/kubernetes.py +20 -10
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/kubernetes_helper_functions.py +6 -3
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/python_kubernetes_script.jinja2 +1 -0
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/pyproject.toml +3 -3
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/LICENSE +0 -0
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/backcompat/__init__.py +0 -0
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/backcompat/backwards_compat_converters.py +0 -0
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/cli/__init__.py +0 -0
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/cli/kubernetes_command.py +0 -0
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/decorators/__init__.py +0 -0
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/executors/__init__.py +0 -0
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/executors/kubernetes_executor.py +0 -0
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/executors/kubernetes_executor_types.py +0 -0
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/executors/kubernetes_executor_utils.py +0 -0
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/executors/local_kubernetes_executor.py +0 -0
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/hooks/__init__.py +0 -0
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/k8s_model.py +0 -0
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/kube_client.py +0 -0
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/kube_config.py +0 -0
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/kubernetes_executor_templates/__init__.py +0 -0
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/kubernetes_executor_templates/basic_template.yaml +0 -0
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/operators/__init__.py +0 -0
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/operators/custom_object_launcher.py +0 -0
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/operators/job.py +0 -0
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/operators/kubernetes_pod.py +0 -0
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/operators/pod.py +0 -0
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/operators/resource.py +0 -0
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/operators/spark_kubernetes.py +0 -0
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/pod_generator.py +0 -0
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/pod_generator_deprecated.py +0 -0
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/pod_launcher_deprecated.py +0 -0
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/pod_template_file_examples/__init__.py +0 -0
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/pod_template_file_examples/dags_in_image_template.yaml +0 -0
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/pod_template_file_examples/dags_in_volume_template.yaml +0 -0
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/pod_template_file_examples/git_sync_template.yaml +0 -0
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/python_kubernetes_script.py +0 -0
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/resource_convert/__init__.py +0 -0
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/resource_convert/configmap.py +0 -0
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/resource_convert/env_variable.py +0 -0
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/resource_convert/secret.py +0 -0
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/secret.py +0 -0
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/sensors/__init__.py +0 -0
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/sensors/spark_kubernetes.py +0 -0
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/template_rendering.py +0 -0
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/triggers/__init__.py +0 -0
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/triggers/job.py +0 -0
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/triggers/kubernetes_pod.py +0 -0
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/triggers/pod.py +0 -0
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/utils/__init__.py +0 -0
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/utils/delete_from.py +0 -0
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/utils/k8s_resource_iterator.py +0 -0
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/utils/pod_manager.py +0 -0
- {apache_airflow_providers_cncf_kubernetes-8.3.2 → apache_airflow_providers_cncf_kubernetes-8.3.3}/airflow/providers/cncf/kubernetes/utils/xcom_sidecar.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: apache-airflow-providers-cncf-kubernetes
|
|
3
|
-
Version: 8.3.
|
|
3
|
+
Version: 8.3.3
|
|
4
4
|
Summary: Provider package apache-airflow-providers-cncf-kubernetes for Apache Airflow
|
|
5
5
|
Keywords: airflow-provider,cncf.kubernetes,airflow,integration
|
|
6
6
|
Author-email: Apache Software Foundation <dev@airflow.apache.org>
|
|
@@ -29,8 +29,8 @@ Requires-Dist: google-re2>=1.0
|
|
|
29
29
|
Requires-Dist: kubernetes>=29.0.0,<=30.1.0
|
|
30
30
|
Requires-Dist: kubernetes_asyncio>=29.0.0,<=30.1.0
|
|
31
31
|
Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
|
|
32
|
-
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-cncf-kubernetes/8.3.
|
|
33
|
-
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-cncf-kubernetes/8.3.
|
|
32
|
+
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-cncf-kubernetes/8.3.3/changelog.html
|
|
33
|
+
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-cncf-kubernetes/8.3.3
|
|
34
34
|
Project-URL: Slack Chat, https://s.apache.org/airflow-slack
|
|
35
35
|
Project-URL: Source Code, https://github.com/apache/airflow
|
|
36
36
|
Project-URL: Twitter, https://twitter.com/ApacheAirflow
|
|
@@ -80,7 +80,7 @@ Project-URL: YouTube, https://www.youtube.com/channel/UCSXwxpWZQ7XZ1WL3wqevChA/
|
|
|
80
80
|
|
|
81
81
|
Package ``apache-airflow-providers-cncf-kubernetes``
|
|
82
82
|
|
|
83
|
-
Release: ``8.3.
|
|
83
|
+
Release: ``8.3.3``
|
|
84
84
|
|
|
85
85
|
|
|
86
86
|
`Kubernetes <https://kubernetes.io/>`__
|
|
@@ -93,7 +93,7 @@ This is a provider package for ``cncf.kubernetes`` provider. All classes for thi
|
|
|
93
93
|
are in ``airflow.providers.cncf.kubernetes`` python package.
|
|
94
94
|
|
|
95
95
|
You can find package information and changelog for the provider
|
|
96
|
-
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-cncf-kubernetes/8.3.
|
|
96
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-cncf-kubernetes/8.3.3/>`_.
|
|
97
97
|
|
|
98
98
|
Installation
|
|
99
99
|
------------
|
|
@@ -120,4 +120,4 @@ PIP package Version required
|
|
|
120
120
|
====================== =====================
|
|
121
121
|
|
|
122
122
|
The changelog for the provider package can be found in the
|
|
123
|
-
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-cncf-kubernetes/8.3.
|
|
123
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-cncf-kubernetes/8.3.3/changelog.html>`_.
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
|
|
43
43
|
Package ``apache-airflow-providers-cncf-kubernetes``
|
|
44
44
|
|
|
45
|
-
Release: ``8.3.
|
|
45
|
+
Release: ``8.3.3``
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
`Kubernetes <https://kubernetes.io/>`__
|
|
@@ -55,7 +55,7 @@ This is a provider package for ``cncf.kubernetes`` provider. All classes for thi
|
|
|
55
55
|
are in ``airflow.providers.cncf.kubernetes`` python package.
|
|
56
56
|
|
|
57
57
|
You can find package information and changelog for the provider
|
|
58
|
-
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-cncf-kubernetes/8.3.
|
|
58
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-cncf-kubernetes/8.3.3/>`_.
|
|
59
59
|
|
|
60
60
|
Installation
|
|
61
61
|
------------
|
|
@@ -82,4 +82,4 @@ PIP package Version required
|
|
|
82
82
|
====================== =====================
|
|
83
83
|
|
|
84
84
|
The changelog for the provider package can be found in the
|
|
85
|
-
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-cncf-kubernetes/8.3.
|
|
85
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-cncf-kubernetes/8.3.3/changelog.html>`_.
|
|
@@ -29,7 +29,7 @@ from airflow import __version__ as airflow_version
|
|
|
29
29
|
|
|
30
30
|
__all__ = ["__version__"]
|
|
31
31
|
|
|
32
|
-
__version__ = "8.3.
|
|
32
|
+
__version__ = "8.3.3"
|
|
33
33
|
|
|
34
34
|
if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
|
|
35
35
|
"2.7.0"
|
|
@@ -33,7 +33,8 @@ class ExecutionMode(str, Enum):
|
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
class KubernetesPodOperatorCallback:
|
|
36
|
-
"""
|
|
36
|
+
"""
|
|
37
|
+
`KubernetesPodOperator` callbacks methods.
|
|
37
38
|
|
|
38
39
|
Currently, the callbacks methods are not called in the async mode, this support will be added
|
|
39
40
|
in the future.
|
|
@@ -41,7 +42,8 @@ class KubernetesPodOperatorCallback:
|
|
|
41
42
|
|
|
42
43
|
@staticmethod
|
|
43
44
|
def on_sync_client_creation(*, client: k8s.CoreV1Api, **kwargs) -> None:
|
|
44
|
-
"""
|
|
45
|
+
"""
|
|
46
|
+
Invoke this callback after creating the sync client.
|
|
45
47
|
|
|
46
48
|
:param client: the created `kubernetes.client.CoreV1Api` client.
|
|
47
49
|
"""
|
|
@@ -49,7 +51,8 @@ class KubernetesPodOperatorCallback:
|
|
|
49
51
|
|
|
50
52
|
@staticmethod
|
|
51
53
|
def on_pod_creation(*, pod: k8s.V1Pod, client: client_type, mode: str, **kwargs) -> None:
|
|
52
|
-
"""
|
|
54
|
+
"""
|
|
55
|
+
Invoke this callback after creating the pod.
|
|
53
56
|
|
|
54
57
|
:param pod: the created pod.
|
|
55
58
|
:param client: the Kubernetes client that can be used in the callback.
|
|
@@ -59,7 +62,8 @@ class KubernetesPodOperatorCallback:
|
|
|
59
62
|
|
|
60
63
|
@staticmethod
|
|
61
64
|
def on_pod_starting(*, pod: k8s.V1Pod, client: client_type, mode: str, **kwargs) -> None:
|
|
62
|
-
"""
|
|
65
|
+
"""
|
|
66
|
+
Invoke this callback when the pod starts.
|
|
63
67
|
|
|
64
68
|
:param pod: the started pod.
|
|
65
69
|
:param client: the Kubernetes client that can be used in the callback.
|
|
@@ -69,7 +73,8 @@ class KubernetesPodOperatorCallback:
|
|
|
69
73
|
|
|
70
74
|
@staticmethod
|
|
71
75
|
def on_pod_completion(*, pod: k8s.V1Pod, client: client_type, mode: str, **kwargs) -> None:
|
|
72
|
-
"""
|
|
76
|
+
"""
|
|
77
|
+
Invoke this callback when the pod completes.
|
|
73
78
|
|
|
74
79
|
:param pod: the completed pod.
|
|
75
80
|
:param client: the Kubernetes client that can be used in the callback.
|
|
@@ -79,7 +84,8 @@ class KubernetesPodOperatorCallback:
|
|
|
79
84
|
|
|
80
85
|
@staticmethod
|
|
81
86
|
def on_pod_cleanup(*, pod: k8s.V1Pod, client: client_type, mode: str, **kwargs):
|
|
82
|
-
"""
|
|
87
|
+
"""
|
|
88
|
+
Invoke this callback after cleaning/deleting the pod.
|
|
83
89
|
|
|
84
90
|
:param pod: the completed pod.
|
|
85
91
|
:param client: the Kubernetes client that can be used in the callback.
|
|
@@ -91,7 +97,8 @@ class KubernetesPodOperatorCallback:
|
|
|
91
97
|
def on_operator_resuming(
|
|
92
98
|
*, pod: k8s.V1Pod, event: dict, client: client_type, mode: str, **kwargs
|
|
93
99
|
) -> None:
|
|
94
|
-
"""
|
|
100
|
+
"""
|
|
101
|
+
Invoke this callback when resuming the `KubernetesPodOperator` from deferred state.
|
|
95
102
|
|
|
96
103
|
:param pod: the current state of the pod.
|
|
97
104
|
:param event: the returned event from the Trigger.
|
|
@@ -102,7 +109,8 @@ class KubernetesPodOperatorCallback:
|
|
|
102
109
|
|
|
103
110
|
@staticmethod
|
|
104
111
|
def progress_callback(*, line: str, client: client_type, mode: str, **kwargs) -> None:
|
|
105
|
-
"""
|
|
112
|
+
"""
|
|
113
|
+
Invoke this callback to process pod container logs.
|
|
106
114
|
|
|
107
115
|
:param line: the read line of log.
|
|
108
116
|
:param client: the Kubernetes client that can be used in the callback.
|
|
@@ -133,7 +133,8 @@ def kubernetes_task(
|
|
|
133
133
|
multiple_outputs: bool | None = None,
|
|
134
134
|
**kwargs,
|
|
135
135
|
) -> TaskDecorator:
|
|
136
|
-
"""
|
|
136
|
+
"""
|
|
137
|
+
Kubernetes operator decorator.
|
|
137
138
|
|
|
138
139
|
This wraps a function to be executed in K8s using KubernetesPodOperator.
|
|
139
140
|
Also accepts any argument that DockerOperator will via ``kwargs``. Can be
|
|
@@ -28,8 +28,9 @@ def get_provider_info():
|
|
|
28
28
|
"name": "Kubernetes",
|
|
29
29
|
"description": "`Kubernetes <https://kubernetes.io/>`__\n",
|
|
30
30
|
"state": "ready",
|
|
31
|
-
"source-date-epoch":
|
|
31
|
+
"source-date-epoch": 1720503401,
|
|
32
32
|
"versions": [
|
|
33
|
+
"8.3.3",
|
|
33
34
|
"8.3.2",
|
|
34
35
|
"8.3.1",
|
|
35
36
|
"8.3.0",
|
|
@@ -476,7 +476,8 @@ class KubernetesHook(BaseHook, PodOperatorHookProtocol):
|
|
|
476
476
|
namespace: str = "default",
|
|
477
477
|
**kwargs,
|
|
478
478
|
) -> V1Deployment:
|
|
479
|
-
"""
|
|
479
|
+
"""
|
|
480
|
+
Get status of existing Deployment.
|
|
480
481
|
|
|
481
482
|
:param name: Name of Deployment to retrieve
|
|
482
483
|
:param namespace: Deployment namespace
|
|
@@ -521,7 +522,8 @@ class KubernetesHook(BaseHook, PodOperatorHookProtocol):
|
|
|
521
522
|
return resp
|
|
522
523
|
|
|
523
524
|
def get_job(self, job_name: str, namespace: str) -> V1Job:
|
|
524
|
-
"""
|
|
525
|
+
"""
|
|
526
|
+
Get Job of specified name and namespace.
|
|
525
527
|
|
|
526
528
|
:param job_name: Name of Job to fetch.
|
|
527
529
|
:param namespace: Namespace of the Job.
|
|
@@ -530,7 +532,8 @@ class KubernetesHook(BaseHook, PodOperatorHookProtocol):
|
|
|
530
532
|
return self.batch_v1_client.read_namespaced_job(name=job_name, namespace=namespace, pretty=True)
|
|
531
533
|
|
|
532
534
|
def get_job_status(self, job_name: str, namespace: str) -> V1Job:
|
|
533
|
-
"""
|
|
535
|
+
"""
|
|
536
|
+
Get job with status of specified name and namespace.
|
|
534
537
|
|
|
535
538
|
:param job_name: Name of Job to fetch.
|
|
536
539
|
:param namespace: Namespace of the Job.
|
|
@@ -541,7 +544,8 @@ class KubernetesHook(BaseHook, PodOperatorHookProtocol):
|
|
|
541
544
|
)
|
|
542
545
|
|
|
543
546
|
def wait_until_job_complete(self, job_name: str, namespace: str, job_poll_interval: float = 10) -> V1Job:
|
|
544
|
-
"""
|
|
547
|
+
"""
|
|
548
|
+
Block job of specified name and namespace until it is complete or failed.
|
|
545
549
|
|
|
546
550
|
:param job_name: Name of Job to fetch.
|
|
547
551
|
:param namespace: Namespace of the Job.
|
|
@@ -557,14 +561,16 @@ class KubernetesHook(BaseHook, PodOperatorHookProtocol):
|
|
|
557
561
|
sleep(job_poll_interval)
|
|
558
562
|
|
|
559
563
|
def list_jobs_all_namespaces(self) -> V1JobList:
|
|
560
|
-
"""
|
|
564
|
+
"""
|
|
565
|
+
Get list of Jobs from all namespaces.
|
|
561
566
|
|
|
562
567
|
:return: V1JobList object
|
|
563
568
|
"""
|
|
564
569
|
return self.batch_v1_client.list_job_for_all_namespaces(pretty=True)
|
|
565
570
|
|
|
566
571
|
def list_jobs_from_namespace(self, namespace: str) -> V1JobList:
|
|
567
|
-
"""
|
|
572
|
+
"""
|
|
573
|
+
Get list of Jobs from dedicated namespace.
|
|
568
574
|
|
|
569
575
|
:param namespace: Namespace of the Job.
|
|
570
576
|
:return: V1JobList object
|
|
@@ -572,7 +578,8 @@ class KubernetesHook(BaseHook, PodOperatorHookProtocol):
|
|
|
572
578
|
return self.batch_v1_client.list_namespaced_job(namespace=namespace, pretty=True)
|
|
573
579
|
|
|
574
580
|
def is_job_complete(self, job: V1Job) -> bool:
|
|
575
|
-
"""
|
|
581
|
+
"""
|
|
582
|
+
Check whether the given job is complete (with success or fail).
|
|
576
583
|
|
|
577
584
|
:return: Boolean indicating that the given job is complete.
|
|
578
585
|
"""
|
|
@@ -593,7 +600,8 @@ class KubernetesHook(BaseHook, PodOperatorHookProtocol):
|
|
|
593
600
|
|
|
594
601
|
@staticmethod
|
|
595
602
|
def is_job_failed(job: V1Job) -> str | bool:
|
|
596
|
-
"""
|
|
603
|
+
"""
|
|
604
|
+
Check whether the given job is failed.
|
|
597
605
|
|
|
598
606
|
:return: Error message if the job is failed, and False otherwise.
|
|
599
607
|
"""
|
|
@@ -605,7 +613,8 @@ class KubernetesHook(BaseHook, PodOperatorHookProtocol):
|
|
|
605
613
|
|
|
606
614
|
@staticmethod
|
|
607
615
|
def is_job_successful(job: V1Job) -> str | bool:
|
|
608
|
-
"""
|
|
616
|
+
"""
|
|
617
|
+
Check whether the given job is completed successfully..
|
|
609
618
|
|
|
610
619
|
:return: Error message if the job is failed, and False otherwise.
|
|
611
620
|
"""
|
|
@@ -810,7 +819,8 @@ class AsyncKubernetesHook(KubernetesHook):
|
|
|
810
819
|
return job
|
|
811
820
|
|
|
812
821
|
async def wait_until_job_complete(self, name: str, namespace: str, poll_interval: float = 10) -> V1Job:
|
|
813
|
-
"""
|
|
822
|
+
"""
|
|
823
|
+
Block job of specified name and namespace until it is complete or failed.
|
|
814
824
|
|
|
815
825
|
:param name: Name of Job to fetch.
|
|
816
826
|
:param namespace: Namespace of the Job.
|
|
@@ -41,7 +41,8 @@ POD_NAME_MAX_LENGTH = 63 # Matches Linux kernel's HOST_NAME_MAX default value m
|
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
def rand_str(num):
|
|
44
|
-
"""
|
|
44
|
+
"""
|
|
45
|
+
Generate random lowercase alphanumeric string of length num.
|
|
45
46
|
|
|
46
47
|
:meta private:
|
|
47
48
|
"""
|
|
@@ -49,7 +50,8 @@ def rand_str(num):
|
|
|
49
50
|
|
|
50
51
|
|
|
51
52
|
def add_unique_suffix(*, name: str, rand_len: int = 8, max_len: int = POD_NAME_MAX_LENGTH) -> str:
|
|
52
|
-
"""
|
|
53
|
+
"""
|
|
54
|
+
Add random string to pod or job name while staying under max length.
|
|
53
55
|
|
|
54
56
|
:param name: name of the pod or job
|
|
55
57
|
:param rand_len: length of the random string to append
|
|
@@ -65,7 +67,8 @@ def add_unique_suffix(*, name: str, rand_len: int = 8, max_len: int = POD_NAME_M
|
|
|
65
67
|
category=AirflowProviderDeprecationWarning,
|
|
66
68
|
)
|
|
67
69
|
def add_pod_suffix(*, pod_name: str, rand_len: int = 8, max_len: int = POD_NAME_MAX_LENGTH) -> str:
|
|
68
|
-
"""
|
|
70
|
+
"""
|
|
71
|
+
Add random string to pod name while staying under max length.
|
|
69
72
|
|
|
70
73
|
:param pod_name: name of the pod
|
|
71
74
|
:param rand_len: length of the random string to append
|
|
@@ -28,7 +28,7 @@ build-backend = "flit_core.buildapi"
|
|
|
28
28
|
|
|
29
29
|
[project]
|
|
30
30
|
name = "apache-airflow-providers-cncf-kubernetes"
|
|
31
|
-
version = "8.3.
|
|
31
|
+
version = "8.3.3"
|
|
32
32
|
description = "Provider package apache-airflow-providers-cncf-kubernetes for Apache Airflow"
|
|
33
33
|
readme = "README.rst"
|
|
34
34
|
authors = [
|
|
@@ -66,8 +66,8 @@ dependencies = [
|
|
|
66
66
|
]
|
|
67
67
|
|
|
68
68
|
[project.urls]
|
|
69
|
-
"Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-cncf-kubernetes/8.3.
|
|
70
|
-
"Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-cncf-kubernetes/8.3.
|
|
69
|
+
"Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-cncf-kubernetes/8.3.3"
|
|
70
|
+
"Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-cncf-kubernetes/8.3.3/changelog.html"
|
|
71
71
|
"Bug Tracker" = "https://github.com/apache/airflow/issues"
|
|
72
72
|
"Source Code" = "https://github.com/apache/airflow"
|
|
73
73
|
"Slack Chat" = "https://s.apache.org/airflow-slack"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|