apache-airflow-providers-cncf-kubernetes 10.10.0rc1__py3-none-any.whl → 10.12.0__py3-none-any.whl
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.
- airflow/providers/cncf/kubernetes/__init__.py +3 -3
- airflow/providers/cncf/kubernetes/backcompat/backwards_compat_converters.py +1 -1
- airflow/providers/cncf/kubernetes/callbacks.py +1 -1
- airflow/providers/cncf/kubernetes/decorators/kubernetes.py +8 -3
- airflow/providers/cncf/kubernetes/decorators/kubernetes_cmd.py +6 -3
- airflow/providers/cncf/kubernetes/exceptions.py +7 -3
- airflow/providers/cncf/kubernetes/executors/kubernetes_executor.py +1 -2
- airflow/providers/cncf/kubernetes/executors/kubernetes_executor_utils.py +1 -1
- airflow/providers/cncf/kubernetes/hooks/kubernetes.py +118 -18
- airflow/providers/cncf/kubernetes/kubernetes_helper_functions.py +65 -20
- airflow/providers/cncf/kubernetes/operators/custom_object_launcher.py +1 -1
- airflow/providers/cncf/kubernetes/operators/job.py +13 -7
- airflow/providers/cncf/kubernetes/operators/kueue.py +1 -1
- airflow/providers/cncf/kubernetes/operators/pod.py +86 -34
- airflow/providers/cncf/kubernetes/operators/resource.py +3 -9
- airflow/providers/cncf/kubernetes/operators/spark_kubernetes.py +20 -9
- airflow/providers/cncf/kubernetes/resource_convert/env_variable.py +1 -1
- airflow/providers/cncf/kubernetes/sensors/spark_kubernetes.py +2 -3
- airflow/providers/cncf/kubernetes/template_rendering.py +1 -1
- airflow/providers/cncf/kubernetes/triggers/pod.py +23 -8
- airflow/providers/cncf/kubernetes/utils/pod_manager.py +98 -86
- airflow/providers/cncf/kubernetes/version_compat.py +5 -1
- {apache_airflow_providers_cncf_kubernetes-10.10.0rc1.dist-info → apache_airflow_providers_cncf_kubernetes-10.12.0.dist-info}/METADATA +12 -10
- {apache_airflow_providers_cncf_kubernetes-10.10.0rc1.dist-info → apache_airflow_providers_cncf_kubernetes-10.12.0.dist-info}/RECORD +28 -28
- {apache_airflow_providers_cncf_kubernetes-10.10.0rc1.dist-info → apache_airflow_providers_cncf_kubernetes-10.12.0.dist-info}/WHEEL +0 -0
- {apache_airflow_providers_cncf_kubernetes-10.10.0rc1.dist-info → apache_airflow_providers_cncf_kubernetes-10.12.0.dist-info}/entry_points.txt +0 -0
- {apache_airflow_providers_cncf_kubernetes-10.10.0rc1.dist-info → apache_airflow_providers_cncf_kubernetes-10.12.0.dist-info}/licenses/LICENSE +0 -0
- {apache_airflow_providers_cncf_kubernetes-10.10.0rc1.dist-info → apache_airflow_providers_cncf_kubernetes-10.12.0.dist-info}/licenses/NOTICE +0 -0
|
@@ -30,7 +30,6 @@ from datetime import timedelta
|
|
|
30
30
|
from typing import TYPE_CHECKING, Literal, cast
|
|
31
31
|
|
|
32
32
|
import pendulum
|
|
33
|
-
import tenacity
|
|
34
33
|
from kubernetes import client, watch
|
|
35
34
|
from kubernetes.client.rest import ApiException
|
|
36
35
|
from kubernetes.stream import stream as kubernetes_stream
|
|
@@ -38,8 +37,12 @@ from pendulum import DateTime
|
|
|
38
37
|
from pendulum.parsing.exceptions import ParserError
|
|
39
38
|
from urllib3.exceptions import HTTPError, TimeoutError
|
|
40
39
|
|
|
41
|
-
from airflow.exceptions import AirflowException
|
|
42
40
|
from airflow.providers.cncf.kubernetes.callbacks import ExecutionMode, KubernetesPodOperatorCallback
|
|
41
|
+
from airflow.providers.cncf.kubernetes.kubernetes_helper_functions import (
|
|
42
|
+
KubernetesApiException,
|
|
43
|
+
PodLaunchFailedException,
|
|
44
|
+
generic_api_retry,
|
|
45
|
+
)
|
|
43
46
|
from airflow.providers.cncf.kubernetes.utils.container import (
|
|
44
47
|
container_is_completed,
|
|
45
48
|
container_is_running,
|
|
@@ -48,10 +51,12 @@ from airflow.providers.cncf.kubernetes.utils.container import (
|
|
|
48
51
|
get_container_status,
|
|
49
52
|
)
|
|
50
53
|
from airflow.providers.cncf.kubernetes.utils.xcom_sidecar import PodDefaults
|
|
54
|
+
from airflow.providers.common.compat.sdk import AirflowException
|
|
51
55
|
from airflow.utils.log.logging_mixin import LoggingMixin
|
|
52
56
|
from airflow.utils.timezone import utcnow
|
|
53
57
|
|
|
54
58
|
if TYPE_CHECKING:
|
|
59
|
+
from kubernetes.client.models.core_v1_event import CoreV1Event
|
|
55
60
|
from kubernetes.client.models.core_v1_event_list import CoreV1EventList
|
|
56
61
|
from kubernetes.client.models.v1_container_state import V1ContainerState
|
|
57
62
|
from kubernetes.client.models.v1_container_state_waiting import V1ContainerStateWaiting
|
|
@@ -71,17 +76,6 @@ Sentinel for no xcom result.
|
|
|
71
76
|
"""
|
|
72
77
|
|
|
73
78
|
|
|
74
|
-
class PodLaunchFailedException(AirflowException):
|
|
75
|
-
"""When pod launching fails in KubernetesPodOperator."""
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
def should_retry_start_pod(exception: BaseException) -> bool:
|
|
79
|
-
"""Check if an Exception indicates a transient error and warrants retrying."""
|
|
80
|
-
if isinstance(exception, ApiException):
|
|
81
|
-
return str(exception.status) == "409"
|
|
82
|
-
return False
|
|
83
|
-
|
|
84
|
-
|
|
85
79
|
class PodPhase:
|
|
86
80
|
"""
|
|
87
81
|
Possible pod phases.
|
|
@@ -101,34 +95,21 @@ def check_exception_is_kubernetes_api_unauthorized(exc: BaseException):
|
|
|
101
95
|
return isinstance(exc, ApiException) and exc.status and str(exc.status) == "401"
|
|
102
96
|
|
|
103
97
|
|
|
104
|
-
|
|
105
|
-
pod_manager: PodManager | AsyncPodManager,
|
|
106
|
-
pod: V1Pod,
|
|
107
|
-
check_interval: float = 1,
|
|
98
|
+
def log_pod_event(
|
|
99
|
+
pod_manager: PodManager | AsyncPodManager, event: CoreV1Event, seen_events: set[str]
|
|
108
100
|
) -> None:
|
|
109
101
|
"""
|
|
110
|
-
|
|
102
|
+
Log a pod event if not already seen.
|
|
111
103
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
:param
|
|
115
|
-
:param pod: The pod object to monitor.
|
|
116
|
-
:param check_interval: Interval (in seconds) between checks.
|
|
104
|
+
:param pod_manager: The pod manager instance for logging
|
|
105
|
+
:param event: Kubernetes event
|
|
106
|
+
:param seen_events: Set of event UIDs already logged to avoid duplicates
|
|
117
107
|
"""
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
else:
|
|
124
|
-
events = pod_manager.read_pod_events(pod)
|
|
125
|
-
for new_event in events.items[num_events:]:
|
|
126
|
-
involved_object: V1ObjectReference = new_event.involved_object
|
|
127
|
-
pod_manager.log.info(
|
|
128
|
-
"The Pod has an Event: %s from %s", new_event.message, involved_object.field_path
|
|
129
|
-
)
|
|
130
|
-
num_events = len(events.items)
|
|
131
|
-
await asyncio.sleep(check_interval)
|
|
108
|
+
event_uid = event.metadata.uid
|
|
109
|
+
if event_uid not in seen_events:
|
|
110
|
+
seen_events.add(event_uid)
|
|
111
|
+
involved_object: V1ObjectReference = event.involved_object
|
|
112
|
+
pod_manager.log.info("The Pod has an Event: %s from %s", event.message, involved_object.field_path)
|
|
132
113
|
|
|
133
114
|
|
|
134
115
|
async def await_pod_start(
|
|
@@ -177,33 +158,49 @@ async def await_pod_start(
|
|
|
177
158
|
pod_manager.log.info("Waiting %ss to get the POD running...", startup_timeout)
|
|
178
159
|
|
|
179
160
|
if time.time() - start_check_time >= startup_timeout:
|
|
161
|
+
pod_manager.stop_watching_events = True
|
|
180
162
|
pod_manager.log.info("::endgroup::")
|
|
181
163
|
raise PodLaunchTimeoutException(
|
|
182
164
|
f"Pod took too long to start. More than {startup_timeout}s. Check the pod events in kubernetes."
|
|
183
165
|
)
|
|
184
166
|
else:
|
|
185
167
|
if time.time() - start_check_time >= schedule_timeout:
|
|
168
|
+
pod_manager.stop_watching_events = True
|
|
186
169
|
pod_manager.log.info("::endgroup::")
|
|
187
170
|
raise PodLaunchTimeoutException(
|
|
188
171
|
f"Pod took too long to be scheduled on the cluster, giving up. More than {schedule_timeout}s. Check the pod events in kubernetes."
|
|
189
172
|
)
|
|
190
173
|
|
|
191
|
-
# Check for general problems to terminate early
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
if container_waiting:
|
|
197
|
-
if container_waiting.reason in ["ErrImagePull", "InvalidImageName"]:
|
|
198
|
-
pod_manager.log.info("::endgroup::")
|
|
199
|
-
raise PodLaunchFailedException(
|
|
200
|
-
f"Pod docker image cannot be pulled, unable to start: {container_waiting.reason}"
|
|
201
|
-
f"\n{container_waiting.message}"
|
|
202
|
-
)
|
|
174
|
+
# Check for general problems to terminate early
|
|
175
|
+
error_message = detect_pod_terminate_early_issues(remote_pod)
|
|
176
|
+
if error_message:
|
|
177
|
+
pod_manager.log.info("::endgroup::")
|
|
178
|
+
raise PodLaunchFailedException(error_message)
|
|
203
179
|
|
|
204
180
|
await asyncio.sleep(check_interval)
|
|
205
181
|
|
|
206
182
|
|
|
183
|
+
def detect_pod_terminate_early_issues(pod: V1Pod) -> str | None:
|
|
184
|
+
"""
|
|
185
|
+
Identify issues that justify terminating the pod early.
|
|
186
|
+
|
|
187
|
+
:param pod: The pod object to check.
|
|
188
|
+
:return: An error message if an issue is detected; otherwise, None.
|
|
189
|
+
"""
|
|
190
|
+
pod_status = pod.status
|
|
191
|
+
if pod_status.container_statuses:
|
|
192
|
+
for container_status in pod_status.container_statuses:
|
|
193
|
+
container_state: V1ContainerState = container_status.state
|
|
194
|
+
container_waiting: V1ContainerStateWaiting | None = container_state.waiting
|
|
195
|
+
if container_waiting:
|
|
196
|
+
if container_waiting.reason in ["ErrImagePull", "ImagePullBackOff", "InvalidImageName"]:
|
|
197
|
+
return (
|
|
198
|
+
f"Pod docker image cannot be pulled, unable to start: {container_waiting.reason}"
|
|
199
|
+
f"\n{container_waiting.message}"
|
|
200
|
+
)
|
|
201
|
+
return None
|
|
202
|
+
|
|
203
|
+
|
|
207
204
|
class PodLaunchTimeoutException(AirflowException):
|
|
208
205
|
"""When pod does not leave the ``Pending`` phase within specified timeout."""
|
|
209
206
|
|
|
@@ -344,6 +341,7 @@ class PodManager(LoggingMixin):
|
|
|
344
341
|
raise e
|
|
345
342
|
return resp
|
|
346
343
|
|
|
344
|
+
@generic_api_retry
|
|
347
345
|
def delete_pod(self, pod: V1Pod) -> None:
|
|
348
346
|
"""Delete POD."""
|
|
349
347
|
try:
|
|
@@ -355,19 +353,21 @@ class PodManager(LoggingMixin):
|
|
|
355
353
|
if str(e.status) != "404":
|
|
356
354
|
raise
|
|
357
355
|
|
|
358
|
-
@
|
|
359
|
-
stop=tenacity.stop_after_attempt(3),
|
|
360
|
-
wait=tenacity.wait_random_exponential(),
|
|
361
|
-
reraise=True,
|
|
362
|
-
retry=tenacity.retry_if_exception(should_retry_start_pod),
|
|
363
|
-
)
|
|
356
|
+
@generic_api_retry
|
|
364
357
|
def create_pod(self, pod: V1Pod) -> V1Pod:
|
|
365
358
|
"""Launch the pod asynchronously."""
|
|
366
359
|
return self.run_pod_async(pod)
|
|
367
360
|
|
|
368
|
-
async def watch_pod_events(self, pod: V1Pod, check_interval:
|
|
369
|
-
"""Read pod events and
|
|
370
|
-
|
|
361
|
+
async def watch_pod_events(self, pod: V1Pod, check_interval: float = 10) -> None:
|
|
362
|
+
"""Read pod events and write into log."""
|
|
363
|
+
resource_version = None
|
|
364
|
+
seen_events: set[str] = set()
|
|
365
|
+
while not self.stop_watching_events:
|
|
366
|
+
events = self.read_pod_events(pod, resource_version)
|
|
367
|
+
for event in events.items:
|
|
368
|
+
log_pod_event(self, event, seen_events)
|
|
369
|
+
resource_version = event.metadata.resource_version
|
|
370
|
+
await asyncio.sleep(check_interval)
|
|
371
371
|
|
|
372
372
|
async def await_pod_start(
|
|
373
373
|
self, pod: V1Pod, schedule_timeout: int = 120, startup_timeout: int = 120, check_interval: int = 1
|
|
@@ -704,6 +704,9 @@ class PodManager(LoggingMixin):
|
|
|
704
704
|
break
|
|
705
705
|
if istio_enabled and container_is_completed(remote_pod, container_name):
|
|
706
706
|
break
|
|
707
|
+
# abort waiting if defined issues are detected
|
|
708
|
+
if detect_pod_terminate_early_issues(remote_pod):
|
|
709
|
+
break
|
|
707
710
|
self.log.info("Pod %s has phase %s", pod.metadata.name, remote_pod.status.phase)
|
|
708
711
|
time.sleep(2)
|
|
709
712
|
return remote_pod
|
|
@@ -718,7 +721,7 @@ class PodManager(LoggingMixin):
|
|
|
718
721
|
remote_pod = self.read_pod(pod)
|
|
719
722
|
return container_is_terminated(pod=remote_pod, container_name=container_name)
|
|
720
723
|
|
|
721
|
-
@
|
|
724
|
+
@generic_api_retry
|
|
722
725
|
def read_pod_logs(
|
|
723
726
|
self,
|
|
724
727
|
pod: V1Pod,
|
|
@@ -761,7 +764,6 @@ class PodManager(LoggingMixin):
|
|
|
761
764
|
post_termination_timeout=post_termination_timeout,
|
|
762
765
|
)
|
|
763
766
|
|
|
764
|
-
@tenacity.retry(stop=tenacity.stop_after_attempt(3), wait=tenacity.wait_exponential(), reraise=True)
|
|
765
767
|
def get_init_container_names(self, pod: V1Pod) -> list[str]:
|
|
766
768
|
"""
|
|
767
769
|
Return container names from the POD except for the airflow-xcom-sidecar container.
|
|
@@ -770,7 +772,6 @@ class PodManager(LoggingMixin):
|
|
|
770
772
|
"""
|
|
771
773
|
return [container_spec.name for container_spec in pod.spec.init_containers]
|
|
772
774
|
|
|
773
|
-
@tenacity.retry(stop=tenacity.stop_after_attempt(3), wait=tenacity.wait_exponential(), reraise=True)
|
|
774
775
|
def get_container_names(self, pod: V1Pod) -> list[str]:
|
|
775
776
|
"""
|
|
776
777
|
Return container names from the POD except for the airflow-xcom-sidecar container.
|
|
@@ -784,23 +785,32 @@ class PodManager(LoggingMixin):
|
|
|
784
785
|
if container_spec.name != PodDefaults.SIDECAR_CONTAINER_NAME
|
|
785
786
|
]
|
|
786
787
|
|
|
787
|
-
@
|
|
788
|
-
def read_pod_events(self, pod: V1Pod) -> CoreV1EventList:
|
|
789
|
-
"""
|
|
788
|
+
@generic_api_retry
|
|
789
|
+
def read_pod_events(self, pod: V1Pod, resource_version: str | None = None) -> CoreV1EventList:
|
|
790
|
+
"""
|
|
791
|
+
Read events from the POD with optimization parameters to reduce API load.
|
|
792
|
+
|
|
793
|
+
:param pod: The pod to get events for
|
|
794
|
+
:param resource_version: Only return events newer than this resource version
|
|
795
|
+
:param limit: Maximum number of events to return
|
|
796
|
+
"""
|
|
790
797
|
try:
|
|
791
798
|
return self._client.list_namespaced_event(
|
|
792
|
-
namespace=pod.metadata.namespace,
|
|
799
|
+
namespace=pod.metadata.namespace,
|
|
800
|
+
field_selector=f"involvedObject.name={pod.metadata.name}",
|
|
801
|
+
resource_version=resource_version,
|
|
802
|
+
resource_version_match="NotOlderThan" if resource_version else None,
|
|
793
803
|
)
|
|
794
804
|
except HTTPError as e:
|
|
795
|
-
raise
|
|
805
|
+
raise KubernetesApiException(f"There was an error reading the kubernetes API: {e}")
|
|
796
806
|
|
|
797
|
-
@
|
|
807
|
+
@generic_api_retry
|
|
798
808
|
def read_pod(self, pod: V1Pod) -> V1Pod:
|
|
799
809
|
"""Read POD information."""
|
|
800
810
|
try:
|
|
801
811
|
return self._client.read_namespaced_pod(pod.metadata.name, pod.metadata.namespace)
|
|
802
812
|
except HTTPError as e:
|
|
803
|
-
raise
|
|
813
|
+
raise KubernetesApiException(f"There was an error reading the kubernetes API: {e}")
|
|
804
814
|
|
|
805
815
|
def await_xcom_sidecar_container_start(
|
|
806
816
|
self, pod: V1Pod, timeout: int = 900, log_interval: int = 30
|
|
@@ -839,11 +849,7 @@ class PodManager(LoggingMixin):
|
|
|
839
849
|
finally:
|
|
840
850
|
self.extract_xcom_kill(pod)
|
|
841
851
|
|
|
842
|
-
@
|
|
843
|
-
stop=tenacity.stop_after_attempt(5),
|
|
844
|
-
wait=tenacity.wait_exponential(multiplier=1, min=4, max=10),
|
|
845
|
-
reraise=True,
|
|
846
|
-
)
|
|
852
|
+
@generic_api_retry
|
|
847
853
|
def extract_xcom_json(self, pod: V1Pod) -> str:
|
|
848
854
|
"""Retrieve XCom value and also check if xcom json is valid."""
|
|
849
855
|
command = (
|
|
@@ -884,11 +890,7 @@ class PodManager(LoggingMixin):
|
|
|
884
890
|
raise AirflowException(f"Failed to extract xcom from pod: {pod.metadata.name}")
|
|
885
891
|
return result
|
|
886
892
|
|
|
887
|
-
@
|
|
888
|
-
stop=tenacity.stop_after_attempt(5),
|
|
889
|
-
wait=tenacity.wait_exponential(multiplier=1, min=4, max=10),
|
|
890
|
-
reraise=True,
|
|
891
|
-
)
|
|
893
|
+
@generic_api_retry
|
|
892
894
|
def extract_xcom_kill(self, pod: V1Pod):
|
|
893
895
|
"""Kill xcom sidecar container."""
|
|
894
896
|
with closing(
|
|
@@ -947,6 +949,7 @@ class OnFinishAction(str, enum.Enum):
|
|
|
947
949
|
|
|
948
950
|
KEEP_POD = "keep_pod"
|
|
949
951
|
DELETE_POD = "delete_pod"
|
|
952
|
+
DELETE_ACTIVE_POD = "delete_active_pod"
|
|
950
953
|
DELETE_SUCCEEDED_POD = "delete_succeeded_pod"
|
|
951
954
|
|
|
952
955
|
|
|
@@ -992,7 +995,6 @@ class AsyncPodManager(LoggingMixin):
|
|
|
992
995
|
self._callbacks = callbacks or []
|
|
993
996
|
self.stop_watching_events = False
|
|
994
997
|
|
|
995
|
-
@tenacity.retry(stop=tenacity.stop_after_attempt(5), wait=tenacity.wait_exponential(), reraise=True)
|
|
996
998
|
async def read_pod(self, pod: V1Pod) -> V1Pod:
|
|
997
999
|
"""Read POD information."""
|
|
998
1000
|
return await self._hook.get_pod(
|
|
@@ -1000,17 +1002,28 @@ class AsyncPodManager(LoggingMixin):
|
|
|
1000
1002
|
pod.metadata.namespace,
|
|
1001
1003
|
)
|
|
1002
1004
|
|
|
1003
|
-
|
|
1004
|
-
async def read_pod_events(self, pod: V1Pod) -> CoreV1EventList:
|
|
1005
|
+
async def read_pod_events(self, pod: V1Pod, resource_version: str | None = None) -> CoreV1EventList:
|
|
1005
1006
|
"""Get pod's events."""
|
|
1006
1007
|
return await self._hook.get_pod_events(
|
|
1007
1008
|
pod.metadata.name,
|
|
1008
1009
|
pod.metadata.namespace,
|
|
1010
|
+
resource_version=resource_version,
|
|
1009
1011
|
)
|
|
1010
1012
|
|
|
1011
|
-
async def watch_pod_events(self, pod: V1Pod,
|
|
1012
|
-
"""
|
|
1013
|
-
|
|
1013
|
+
async def watch_pod_events(self, pod: V1Pod, startup_check_interval: float = 30) -> None:
|
|
1014
|
+
"""Watch pod events and write to log."""
|
|
1015
|
+
seen_events: set[str] = set()
|
|
1016
|
+
resource_version = None
|
|
1017
|
+
while not self.stop_watching_events:
|
|
1018
|
+
async for event in self._hook.watch_pod_events(
|
|
1019
|
+
name=pod.metadata.name,
|
|
1020
|
+
namespace=pod.metadata.namespace,
|
|
1021
|
+
resource_version=resource_version,
|
|
1022
|
+
timeout_seconds=startup_check_interval,
|
|
1023
|
+
):
|
|
1024
|
+
if event:
|
|
1025
|
+
log_pod_event(self, event, seen_events)
|
|
1026
|
+
resource_version = event.metadata.resource_version
|
|
1014
1027
|
|
|
1015
1028
|
async def await_pod_start(
|
|
1016
1029
|
self, pod: V1Pod, schedule_timeout: int = 120, startup_timeout: int = 120, check_interval: float = 1
|
|
@@ -1034,7 +1047,6 @@ class AsyncPodManager(LoggingMixin):
|
|
|
1034
1047
|
check_interval=check_interval,
|
|
1035
1048
|
)
|
|
1036
1049
|
|
|
1037
|
-
@tenacity.retry(stop=tenacity.stop_after_attempt(5), wait=tenacity.wait_exponential(), reraise=True)
|
|
1038
1050
|
async def fetch_container_logs_before_current_sec(
|
|
1039
1051
|
self, pod: V1Pod, container_name: str, since_time: DateTime | None = None
|
|
1040
1052
|
) -> DateTime | None:
|
|
@@ -1083,4 +1095,4 @@ class AsyncPodManager(LoggingMixin):
|
|
|
1083
1095
|
print(message_to_log)
|
|
1084
1096
|
else:
|
|
1085
1097
|
self.log.info("[%s] %s", container_name, message_to_log)
|
|
1086
|
-
|
|
1098
|
+
return now # Return the current time as the last log time to ensure logs from the current second are read in the next fetch.
|
|
@@ -35,4 +35,8 @@ def get_base_airflow_version_tuple() -> tuple[int, int, int]:
|
|
|
35
35
|
AIRFLOW_V_3_0_PLUS = get_base_airflow_version_tuple() >= (3, 0, 0)
|
|
36
36
|
AIRFLOW_V_3_1_PLUS = get_base_airflow_version_tuple() >= (3, 1, 0)
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
|
|
39
|
+
__all__ = [
|
|
40
|
+
"AIRFLOW_V_3_0_PLUS",
|
|
41
|
+
"AIRFLOW_V_3_1_PLUS",
|
|
42
|
+
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: apache-airflow-providers-cncf-kubernetes
|
|
3
|
-
Version: 10.
|
|
3
|
+
Version: 10.12.0
|
|
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>
|
|
@@ -23,15 +23,16 @@ Classifier: Topic :: System :: Monitoring
|
|
|
23
23
|
License-File: LICENSE
|
|
24
24
|
License-File: NOTICE
|
|
25
25
|
Requires-Dist: aiofiles>=23.2.0
|
|
26
|
-
Requires-Dist: apache-airflow>=2.
|
|
27
|
-
Requires-Dist: apache-airflow-providers-common-compat>=1.
|
|
26
|
+
Requires-Dist: apache-airflow>=2.11.0
|
|
27
|
+
Requires-Dist: apache-airflow-providers-common-compat>=1.10.1
|
|
28
28
|
Requires-Dist: asgiref>=3.5.2
|
|
29
29
|
Requires-Dist: cryptography>=41.0.0,<46.0.0
|
|
30
30
|
Requires-Dist: kubernetes>=32.0.0,<35.0.0
|
|
31
|
+
Requires-Dist: urllib3>=2.1.0,!=2.6.0
|
|
31
32
|
Requires-Dist: kubernetes_asyncio>=32.0.0,<35.0.0
|
|
32
33
|
Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
|
|
33
|
-
Project-URL: Changelog, https://airflow.
|
|
34
|
-
Project-URL: Documentation, https://airflow.
|
|
34
|
+
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-cncf-kubernetes/10.12.0/changelog.html
|
|
35
|
+
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-cncf-kubernetes/10.12.0
|
|
35
36
|
Project-URL: Mastodon, https://fosstodon.org/@airflow
|
|
36
37
|
Project-URL: Slack Chat, https://s.apache.org/airflow-slack
|
|
37
38
|
Project-URL: Source Code, https://github.com/apache/airflow
|
|
@@ -62,7 +63,7 @@ Project-URL: YouTube, https://www.youtube.com/channel/UCSXwxpWZQ7XZ1WL3wqevChA/
|
|
|
62
63
|
|
|
63
64
|
Package ``apache-airflow-providers-cncf-kubernetes``
|
|
64
65
|
|
|
65
|
-
Release: ``10.
|
|
66
|
+
Release: ``10.12.0``
|
|
66
67
|
|
|
67
68
|
|
|
68
69
|
`Kubernetes <https://kubernetes.io/>`__
|
|
@@ -75,7 +76,7 @@ This is a provider package for ``cncf.kubernetes`` provider. All classes for thi
|
|
|
75
76
|
are in ``airflow.providers.cncf.kubernetes`` python package.
|
|
76
77
|
|
|
77
78
|
You can find package information and changelog for the provider
|
|
78
|
-
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-cncf-kubernetes/10.
|
|
79
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-cncf-kubernetes/10.12.0/>`_.
|
|
79
80
|
|
|
80
81
|
Installation
|
|
81
82
|
------------
|
|
@@ -93,11 +94,12 @@ Requirements
|
|
|
93
94
|
PIP package Version required
|
|
94
95
|
========================================== ====================
|
|
95
96
|
``aiofiles`` ``>=23.2.0``
|
|
96
|
-
``apache-airflow`` ``>=2.
|
|
97
|
-
``apache-airflow-providers-common-compat`` ``>=1.
|
|
97
|
+
``apache-airflow`` ``>=2.11.0``
|
|
98
|
+
``apache-airflow-providers-common-compat`` ``>=1.10.1``
|
|
98
99
|
``asgiref`` ``>=3.5.2``
|
|
99
100
|
``cryptography`` ``>=41.0.0,<46.0.0``
|
|
100
101
|
``kubernetes`` ``>=32.0.0,<35.0.0``
|
|
102
|
+
``urllib3`` ``>=2.1.0,!=2.6.0``
|
|
101
103
|
``kubernetes_asyncio`` ``>=32.0.0,<35.0.0``
|
|
102
104
|
========================================== ====================
|
|
103
105
|
|
|
@@ -121,5 +123,5 @@ Dependent package
|
|
|
121
123
|
================================================================================================================== =================
|
|
122
124
|
|
|
123
125
|
The changelog for the provider package can be found in the
|
|
124
|
-
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-cncf-kubernetes/10.
|
|
126
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-cncf-kubernetes/10.12.0/changelog.html>`_.
|
|
125
127
|
|
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
airflow/providers/cncf/kubernetes/__init__.py,sha256=
|
|
2
|
-
airflow/providers/cncf/kubernetes/callbacks.py,sha256=
|
|
3
|
-
airflow/providers/cncf/kubernetes/exceptions.py,sha256=
|
|
1
|
+
airflow/providers/cncf/kubernetes/__init__.py,sha256=Rx7dfjv42ZGDeA3EM0NldCpXc9LD-SRghw6MBL_W2EA,1506
|
|
2
|
+
airflow/providers/cncf/kubernetes/callbacks.py,sha256=mHy1d44F4VseALePmgjniN0mrcUf7PCv5jgty43r9Zg,6075
|
|
3
|
+
airflow/providers/cncf/kubernetes/exceptions.py,sha256=iRrXBxaLPqYwUBt9zbadYgRbEDhGTo6I2mhLOa9F3DI,1707
|
|
4
4
|
airflow/providers/cncf/kubernetes/get_provider_info.py,sha256=7fYqFWd1K0j8LgVkB_HYambOGPTrBDuaVXenLUPtF8g,16600
|
|
5
5
|
airflow/providers/cncf/kubernetes/k8s_model.py,sha256=xmdFhX29DjegoZ-cq8-KDL9soVYXf4OpU6fAGr3cPTU,2101
|
|
6
6
|
airflow/providers/cncf/kubernetes/kube_client.py,sha256=AaTY2UhhKVa-qrhMvpiQjdUJhrQyndwQ_5PoRmWJy3k,5714
|
|
7
7
|
airflow/providers/cncf/kubernetes/kube_config.py,sha256=UsxzPjsonzy5a6e0P8XjenT-ncmX4R6KB1EqDfWpLnM,6191
|
|
8
|
-
airflow/providers/cncf/kubernetes/kubernetes_helper_functions.py,sha256=
|
|
8
|
+
airflow/providers/cncf/kubernetes/kubernetes_helper_functions.py,sha256=c9MFEVAhhjk8BcPwfIy4QdUioNT9Rqmen26A6MM7yRU,7216
|
|
9
9
|
airflow/providers/cncf/kubernetes/pod_generator.py,sha256=0VEcAtT2SzAFwSDsQWe2QdrY2mDV8s4hBw0qLcmIMGw,21038
|
|
10
10
|
airflow/providers/cncf/kubernetes/python_kubernetes_script.jinja2,sha256=I0EHRGwLHjSiX85e51HBIoddRDnC8TJPFrDBqQq_NJg,1776
|
|
11
11
|
airflow/providers/cncf/kubernetes/python_kubernetes_script.py,sha256=KnTlZSWCZhwvj89fSc2kgIRTaI4iLNKPquHc2wXnluo,3460
|
|
12
12
|
airflow/providers/cncf/kubernetes/secret.py,sha256=0aHyYJOnveutfQKH7riAfz9IPB5hhDYBDYzYEDuXrmU,5317
|
|
13
|
-
airflow/providers/cncf/kubernetes/template_rendering.py,sha256=
|
|
14
|
-
airflow/providers/cncf/kubernetes/version_compat.py,sha256=
|
|
13
|
+
airflow/providers/cncf/kubernetes/template_rendering.py,sha256=6q3k2bSJN06QtnbufGn8Aao3MCdh48xOOxPD6wp7hCE,3635
|
|
14
|
+
airflow/providers/cncf/kubernetes/version_compat.py,sha256=MpWxT1g5WGhlmooHPsjyFHtjQsFZ8FEIrOQrtRnu8Pw,1671
|
|
15
15
|
airflow/providers/cncf/kubernetes/backcompat/__init__.py,sha256=KXF76f3v1jIFUBNz8kwxVMvm7i4mNo35LbIG9IijBNc,1299
|
|
16
|
-
airflow/providers/cncf/kubernetes/backcompat/backwards_compat_converters.py,sha256=
|
|
16
|
+
airflow/providers/cncf/kubernetes/backcompat/backwards_compat_converters.py,sha256=3YOZHuAbFe-w1LM2r4w9xmbtIaIdp6ObehXwvh-7iTk,4320
|
|
17
17
|
airflow/providers/cncf/kubernetes/cli/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
|
18
18
|
airflow/providers/cncf/kubernetes/cli/kubernetes_command.py,sha256=S6CBIaBm2wa-XisPKcn1Axy1fErIvCt9RwPn4gawGXc,8297
|
|
19
19
|
airflow/providers/cncf/kubernetes/decorators/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
|
|
20
|
-
airflow/providers/cncf/kubernetes/decorators/kubernetes.py,sha256=
|
|
21
|
-
airflow/providers/cncf/kubernetes/decorators/kubernetes_cmd.py,sha256=
|
|
20
|
+
airflow/providers/cncf/kubernetes/decorators/kubernetes.py,sha256=1qUiSHseMS31xU5jqRc2dJFq1Kor0yEMx1KKEULHWR4,6358
|
|
21
|
+
airflow/providers/cncf/kubernetes/decorators/kubernetes_cmd.py,sha256=pdH2TGCYVywY0qPTosq7EoGE0oKd03q9OKka4qSsDI4,4722
|
|
22
22
|
airflow/providers/cncf/kubernetes/executors/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
|
|
23
|
-
airflow/providers/cncf/kubernetes/executors/kubernetes_executor.py,sha256=
|
|
23
|
+
airflow/providers/cncf/kubernetes/executors/kubernetes_executor.py,sha256=QLSCczfdXSbLp0c8W52UmEqG4Ig2jaDYUS1t5_RAP18,35057
|
|
24
24
|
airflow/providers/cncf/kubernetes/executors/kubernetes_executor_types.py,sha256=F0IlLbC6qKMVNZwqnbgUPxwFsZdcRhot2kwBhzc9gSM,2698
|
|
25
|
-
airflow/providers/cncf/kubernetes/executors/kubernetes_executor_utils.py,sha256=
|
|
25
|
+
airflow/providers/cncf/kubernetes/executors/kubernetes_executor_utils.py,sha256=HTkVoREcZedB2H0JubkXoP6op3GN9EZ8hRb0404ox1M,31520
|
|
26
26
|
airflow/providers/cncf/kubernetes/executors/local_kubernetes_executor.py,sha256=CWCN4b6Ircs-3tCxJjBsrjl4Q0ABBJIwqlZr7a5lW6k,12243
|
|
27
27
|
airflow/providers/cncf/kubernetes/hooks/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
|
28
|
-
airflow/providers/cncf/kubernetes/hooks/kubernetes.py,sha256=
|
|
28
|
+
airflow/providers/cncf/kubernetes/hooks/kubernetes.py,sha256=mJgvTDdsYc71Qzdl-0uARHr8TURuyrSveWzRkGI8-uY,44078
|
|
29
29
|
airflow/providers/cncf/kubernetes/kubernetes_executor_templates/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
|
30
30
|
airflow/providers/cncf/kubernetes/kubernetes_executor_templates/basic_template.yaml,sha256=yzJmXN4ZyB4aDwI_GIugpL9-f1YMVy__X-LQSbeU95A,2567
|
|
31
31
|
airflow/providers/cncf/kubernetes/operators/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
|
|
32
|
-
airflow/providers/cncf/kubernetes/operators/custom_object_launcher.py,sha256=
|
|
33
|
-
airflow/providers/cncf/kubernetes/operators/job.py,sha256=
|
|
34
|
-
airflow/providers/cncf/kubernetes/operators/kueue.py,sha256=
|
|
35
|
-
airflow/providers/cncf/kubernetes/operators/pod.py,sha256=
|
|
36
|
-
airflow/providers/cncf/kubernetes/operators/resource.py,sha256=
|
|
37
|
-
airflow/providers/cncf/kubernetes/operators/spark_kubernetes.py,sha256=
|
|
32
|
+
airflow/providers/cncf/kubernetes/operators/custom_object_launcher.py,sha256=ha3dC4DjAIs2wtmGC504EvViGA-GGce1iOdeS3y1ol0,15464
|
|
33
|
+
airflow/providers/cncf/kubernetes/operators/job.py,sha256=M1XQ7TPEgWvpzdItq7tkikAsiujEObpHb7ARSgPEO6M,27137
|
|
34
|
+
airflow/providers/cncf/kubernetes/operators/kueue.py,sha256=E0ZqMQzH2dtNOAaA2W5bAuaS-zRz_ohfOElQ1N7NSTA,5560
|
|
35
|
+
airflow/providers/cncf/kubernetes/operators/pod.py,sha256=EvOsTyw6VIH3vky1dYA1jYmp-w-GMj0BW3dorawCGsM,66169
|
|
36
|
+
airflow/providers/cncf/kubernetes/operators/resource.py,sha256=NHU8LtC1B8mq9V6SgIwo1GWZREtmC1-plQb1DALpmCc,7506
|
|
37
|
+
airflow/providers/cncf/kubernetes/operators/spark_kubernetes.py,sha256=9DZnzju7KMXN9SG4JgHEKUAaxKXmR-XyImgN-GnIDnU,16513
|
|
38
38
|
airflow/providers/cncf/kubernetes/pod_template_file_examples/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
|
39
39
|
airflow/providers/cncf/kubernetes/pod_template_file_examples/dags_in_image_template.yaml,sha256=7JdppZ-XDBpv2Bnde2SthhcME8w3b8xQdPAK1fJGW60,2256
|
|
40
40
|
airflow/providers/cncf/kubernetes/pod_template_file_examples/dags_in_volume_template.yaml,sha256=-Pk_EwKpyWRYZKOnumUxVrDeAfFJ0nr3WZ7JNnvppzg,2442
|
|
41
41
|
airflow/providers/cncf/kubernetes/pod_template_file_examples/git_sync_template.yaml,sha256=Pxpa1AiBlf4H8aIc7tUTmH2XNOz84cO0ttMQdlfMJ2c,3020
|
|
42
42
|
airflow/providers/cncf/kubernetes/resource_convert/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
|
43
43
|
airflow/providers/cncf/kubernetes/resource_convert/configmap.py,sha256=gf7DdVeD0yKRNCTVCM-SywJDxwEJTYx3ogykAqbxRoU,1873
|
|
44
|
-
airflow/providers/cncf/kubernetes/resource_convert/env_variable.py,sha256=
|
|
44
|
+
airflow/providers/cncf/kubernetes/resource_convert/env_variable.py,sha256=ZmYvs2njnF0uHcp_qoLTgdF7HNyGli5pyodrkm1-bXQ,1479
|
|
45
45
|
airflow/providers/cncf/kubernetes/resource_convert/secret.py,sha256=ElZCMbTWeTKoPeIJ1fTvlqRXM8nGkWj2MrIlVckX6Ag,1494
|
|
46
46
|
airflow/providers/cncf/kubernetes/sensors/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
|
47
|
-
airflow/providers/cncf/kubernetes/sensors/spark_kubernetes.py,sha256=
|
|
47
|
+
airflow/providers/cncf/kubernetes/sensors/spark_kubernetes.py,sha256=BGB5HzaSU1w1bDN3QnopiyJ_M-Gz2_QEwcCpOPfTS9g,5331
|
|
48
48
|
airflow/providers/cncf/kubernetes/triggers/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
|
49
49
|
airflow/providers/cncf/kubernetes/triggers/job.py,sha256=_lLP6ZYRV4kdwb7U0w5QFnlY1E9deZ5wtg-nrlfl6-8,7505
|
|
50
|
-
airflow/providers/cncf/kubernetes/triggers/pod.py,sha256=
|
|
50
|
+
airflow/providers/cncf/kubernetes/triggers/pod.py,sha256=G5tUAA1AhA7xoCb03ShE0S7zJND03MOQ3cVNBVDHkyY,15294
|
|
51
51
|
airflow/providers/cncf/kubernetes/utils/__init__.py,sha256=ClZN0VPjWySdVwS_ktH7rrgL9VLAcs3OSJSB9s3zaYw,863
|
|
52
52
|
airflow/providers/cncf/kubernetes/utils/container.py,sha256=tuhWyMZrqCGDUT4kzwjhEgJrr0JvD9lMXbFeuMDoh-4,4813
|
|
53
53
|
airflow/providers/cncf/kubernetes/utils/delete_from.py,sha256=poObZSoEJwQyaYWilEURs8f4CDY2sn_pfwS31Lf579A,5195
|
|
54
54
|
airflow/providers/cncf/kubernetes/utils/k8s_resource_iterator.py,sha256=pl-G-2WhZVbewKkwmL9AxPo1hAQWHHEPK43b-ruF4-w,1937
|
|
55
|
-
airflow/providers/cncf/kubernetes/utils/pod_manager.py,sha256=
|
|
55
|
+
airflow/providers/cncf/kubernetes/utils/pod_manager.py,sha256=f6PUeHEiuuI_L4b3KZyN_fCLl6yq6ev1HXhtMxWHEHI,45374
|
|
56
56
|
airflow/providers/cncf/kubernetes/utils/xcom_sidecar.py,sha256=k6bdmVJ21OrAwGmWwledRrAmaty9ZrmbuM-IbaI4mqo,2519
|
|
57
|
-
apache_airflow_providers_cncf_kubernetes-10.
|
|
58
|
-
apache_airflow_providers_cncf_kubernetes-10.
|
|
59
|
-
apache_airflow_providers_cncf_kubernetes-10.
|
|
60
|
-
apache_airflow_providers_cncf_kubernetes-10.
|
|
61
|
-
apache_airflow_providers_cncf_kubernetes-10.
|
|
62
|
-
apache_airflow_providers_cncf_kubernetes-10.
|
|
57
|
+
apache_airflow_providers_cncf_kubernetes-10.12.0.dist-info/entry_points.txt,sha256=ByD3QJJyP9CfmTYtpNI1953akD38RUDgpGXLaq9vpOw,111
|
|
58
|
+
apache_airflow_providers_cncf_kubernetes-10.12.0.dist-info/licenses/LICENSE,sha256=gXPVwptPlW1TJ4HSuG5OMPg-a3h43OGMkZRR1rpwfJA,10850
|
|
59
|
+
apache_airflow_providers_cncf_kubernetes-10.12.0.dist-info/licenses/NOTICE,sha256=E3-_E02gwwSEFzeeWPKmnIjOoos3hW28CLISV6sYrbQ,168
|
|
60
|
+
apache_airflow_providers_cncf_kubernetes-10.12.0.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
|
61
|
+
apache_airflow_providers_cncf_kubernetes-10.12.0.dist-info/METADATA,sha256=R2loT_RB1FLCzAP_pEEF0aAvUmwibJNq3e59oXJ0ngY,5834
|
|
62
|
+
apache_airflow_providers_cncf_kubernetes-10.12.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|