apache-airflow-providers-cncf-kubernetes 8.3.2__py3-none-any.whl → 8.3.3__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.

Potentially problematic release.


This version of apache-airflow-providers-cncf-kubernetes might be problematic. Click here for more details.

@@ -29,7 +29,7 @@ from airflow import __version__ as airflow_version
29
29
 
30
30
  __all__ = ["__version__"]
31
31
 
32
- __version__ = "8.3.2"
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
- """`KubernetesPodOperator` callbacks methods.
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
- """Invoke this callback after creating the sync client.
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
- """Invoke this callback after creating the pod.
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
- """Invoke this callback when the pod starts.
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
- """Invoke this callback when the pod completes.
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
- """Invoke this callback after cleaning/deleting the pod.
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
- """Invoke this callback when resuming the `KubernetesPodOperator` from deferred state.
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
- """Invoke this callback to process pod container logs.
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
- """Kubernetes operator decorator.
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": 1718604007,
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
- """Get status of existing Deployment.
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
- """Get Job of specified name and namespace.
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
- """Get job with status of specified name and namespace.
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
- """Block job of specified name and namespace until it is complete or failed.
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
- """Get list of Jobs from all namespaces.
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
- """Get list of Jobs from dedicated namespace.
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
- """Check whether the given job is complete (with success or fail).
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
- """Check whether the given job is failed.
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
- """Check whether the given job is completed successfully..
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
- """Block job of specified name and namespace until it is complete or failed.
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
- """Generate random lowercase alphanumeric string of length num.
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
- """Add random string to pod or job name while staying under max length.
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
- """Add random string to pod name while staying under max length.
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
@@ -16,6 +16,7 @@
16
16
  specific language governing permissions and limitations
17
17
  under the License.
18
18
  -#}
19
+ from __future__ import annotations
19
20
 
20
21
  import json
21
22
  import {{ pickling_library }}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: apache-airflow-providers-cncf-kubernetes
3
- Version: 8.3.2
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.2/changelog.html
33
- Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-cncf-kubernetes/8.3.2
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.2``
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.2/>`_.
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.2/changelog.html>`_.
123
+ `changelog <https://airflow.apache.org/docs/apache-airflow-providers-cncf-kubernetes/8.3.3/changelog.html>`_.
@@ -1,15 +1,15 @@
1
1
  airflow/providers/cncf/kubernetes/LICENSE,sha256=FFb4jd2AXnOOf7XLP04pQW6jbdhG49TxlGY6fFpCV1Y,13609
2
- airflow/providers/cncf/kubernetes/__init__.py,sha256=BRwrh3ItUekugYe__8BBZHGGFGOMls-0MaX7TT9DJMo,1502
3
- airflow/providers/cncf/kubernetes/callbacks.py,sha256=s3DRwNmQJSBlbeUwhSUJwfRFFMdJ9h_PnBzVl881r-8,4094
4
- airflow/providers/cncf/kubernetes/get_provider_info.py,sha256=YtAgeEsbzYsCUxgTgIHk3Sd2gk3Wl02hy2neuWRwPSs,17839
2
+ airflow/providers/cncf/kubernetes/__init__.py,sha256=3PkYBJE4gb81vIaWnJ7IX40PF_qH2pnfs8GLGzlInV0,1502
3
+ airflow/providers/cncf/kubernetes/callbacks.py,sha256=SK_gKvGWuU-nxHfsqsYMlNQ8HZbHfpvyItOqieel2lc,4162
4
+ airflow/providers/cncf/kubernetes/get_provider_info.py,sha256=7BHwQ_X8x7__glo_gOkKcbveeK8YoCWapZ6g98eMyKQ,17860
5
5
  airflow/providers/cncf/kubernetes/k8s_model.py,sha256=xmdFhX29DjegoZ-cq8-KDL9soVYXf4OpU6fAGr3cPTU,2101
6
6
  airflow/providers/cncf/kubernetes/kube_client.py,sha256=yflZxLousXA9d7t67KrEy55qzb1cUhEyy6yCPkEem28,5329
7
7
  airflow/providers/cncf/kubernetes/kube_config.py,sha256=FAmhZZ_Z2JtoVzL6wENSjcwrlwAenHttTX_Ild9aEms,5225
8
- airflow/providers/cncf/kubernetes/kubernetes_helper_functions.py,sha256=7-Evcavj3qQ_VUgD6aA64GpNHImwa268xPllQcYAJng,6765
8
+ airflow/providers/cncf/kubernetes/kubernetes_helper_functions.py,sha256=oAy66vfRfdGaK7M-3L5TWvNFA9fqiuuQT7pv9w1VlVw,6780
9
9
  airflow/providers/cncf/kubernetes/pod_generator.py,sha256=2M7ZpWpZiyZEPyrxoVNzThgMuZ11_gaaeSxg1m1hY5s,24380
10
10
  airflow/providers/cncf/kubernetes/pod_generator_deprecated.py,sha256=aukRdia0Wtv0FVZXgvaIWQxdWfnT9cxzH0UwOVph8dE,11998
11
11
  airflow/providers/cncf/kubernetes/pod_launcher_deprecated.py,sha256=v1dpXnlpGI6nTmwO-h15rfs42NYcg9lrEpxrgA0ynE8,12039
12
- airflow/providers/cncf/kubernetes/python_kubernetes_script.jinja2,sha256=gUGBhBTFWIXjnjxTAjawWIacDwk2EDxoGEzVQYnlUT8,1741
12
+ airflow/providers/cncf/kubernetes/python_kubernetes_script.jinja2,sha256=I0EHRGwLHjSiX85e51HBIoddRDnC8TJPFrDBqQq_NJg,1776
13
13
  airflow/providers/cncf/kubernetes/python_kubernetes_script.py,sha256=KnTlZSWCZhwvj89fSc2kgIRTaI4iLNKPquHc2wXnluo,3460
14
14
  airflow/providers/cncf/kubernetes/secret.py,sha256=wj-T9gouqau_X14slAstGmnSxqXJQzdLwUdURzHna0I,5209
15
15
  airflow/providers/cncf/kubernetes/template_rendering.py,sha256=AZesc6MDfpFHoN1PvQpVwM-PzwbKYC1IsdChYvTubZ8,2965
@@ -18,14 +18,14 @@ airflow/providers/cncf/kubernetes/backcompat/backwards_compat_converters.py,sha2
18
18
  airflow/providers/cncf/kubernetes/cli/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
19
19
  airflow/providers/cncf/kubernetes/cli/kubernetes_command.py,sha256=W49hsWZ3XWUJgFLte56tMNGqmOvcFitl7iFjmFR8Ezo,6990
20
20
  airflow/providers/cncf/kubernetes/decorators/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
21
- airflow/providers/cncf/kubernetes/decorators/kubernetes.py,sha256=YGEdDNZhxeq8dpAaKpwMS2oGRvN1sN0xzf8mYotMk1E,5780
21
+ airflow/providers/cncf/kubernetes/decorators/kubernetes.py,sha256=qfU_MDOhBsHc2leu1RW3YE5steDFOnWxcVswhjC6GXU,5785
22
22
  airflow/providers/cncf/kubernetes/executors/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
23
23
  airflow/providers/cncf/kubernetes/executors/kubernetes_executor.py,sha256=hBYBVJrXG2b11U4prMFlcYARyTnPeZFYNt5hYLQAGsU,33671
24
24
  airflow/providers/cncf/kubernetes/executors/kubernetes_executor_types.py,sha256=9rRhfRuujGtSE73Ax0kC12whZCgWF2m6j5w9G9e0F_I,1673
25
25
  airflow/providers/cncf/kubernetes/executors/kubernetes_executor_utils.py,sha256=RtSHNyV8Hu4QLvMXLJJaanEfJWlZK2n6Ic2adg18oBE,23694
26
26
  airflow/providers/cncf/kubernetes/executors/local_kubernetes_executor.py,sha256=r5cvhj9NUTreQScn3Y8NlPFoYIa_NaAVQ27WqtOrJvw,10014
27
27
  airflow/providers/cncf/kubernetes/hooks/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
28
- airflow/providers/cncf/kubernetes/hooks/kubernetes.py,sha256=2etfKXuBASdOEGP8VDxUL-l-6RRrS5JM9VJyYpL7bwk,31879
28
+ airflow/providers/cncf/kubernetes/hooks/kubernetes.py,sha256=y9fLn9sAb55ldSfz3aZ8pvYbXqpBDBNLYrxG-qn-FOU,31969
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
@@ -54,7 +54,7 @@ airflow/providers/cncf/kubernetes/utils/delete_from.py,sha256=poObZSoEJwQyaYWilE
54
54
  airflow/providers/cncf/kubernetes/utils/k8s_resource_iterator.py,sha256=-Pgc5i2WEDl7ZBvtJZ4eWDqqlSj8WdULqwUyOWmsRp8,1928
55
55
  airflow/providers/cncf/kubernetes/utils/pod_manager.py,sha256=g4JZpRJONuWFLdSlc7VyBtDGoST7H4W9LAt2nqNtDpg,33669
56
56
  airflow/providers/cncf/kubernetes/utils/xcom_sidecar.py,sha256=k6bdmVJ21OrAwGmWwledRrAmaty9ZrmbuM-IbaI4mqo,2519
57
- apache_airflow_providers_cncf_kubernetes-8.3.2.dist-info/entry_points.txt,sha256=ByD3QJJyP9CfmTYtpNI1953akD38RUDgpGXLaq9vpOw,111
58
- apache_airflow_providers_cncf_kubernetes-8.3.2.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
59
- apache_airflow_providers_cncf_kubernetes-8.3.2.dist-info/METADATA,sha256=0LJNloknLPUS96eJ2Lgy8JrIPv3-APQh7oKzbnFwRmA,5260
60
- apache_airflow_providers_cncf_kubernetes-8.3.2.dist-info/RECORD,,
57
+ apache_airflow_providers_cncf_kubernetes-8.3.3.dist-info/entry_points.txt,sha256=ByD3QJJyP9CfmTYtpNI1953akD38RUDgpGXLaq9vpOw,111
58
+ apache_airflow_providers_cncf_kubernetes-8.3.3.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
59
+ apache_airflow_providers_cncf_kubernetes-8.3.3.dist-info/METADATA,sha256=6nWdBBVIX0_LFqu9-UsBcLxfibIhF92Iszu7B1SeC7E,5260
60
+ apache_airflow_providers_cncf_kubernetes-8.3.3.dist-info/RECORD,,