apache-airflow-providers-cncf-kubernetes 10.6.2rc1__py3-none-any.whl → 10.7.0rc1__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 +1 -1
- airflow/providers/cncf/kubernetes/executors/kubernetes_executor_utils.py +11 -1
- airflow/providers/cncf/kubernetes/hooks/kubernetes.py +17 -2
- {apache_airflow_providers_cncf_kubernetes-10.6.2rc1.dist-info → apache_airflow_providers_cncf_kubernetes-10.7.0rc1.dist-info}/METADATA +6 -6
- {apache_airflow_providers_cncf_kubernetes-10.6.2rc1.dist-info → apache_airflow_providers_cncf_kubernetes-10.7.0rc1.dist-info}/RECORD +7 -7
- {apache_airflow_providers_cncf_kubernetes-10.6.2rc1.dist-info → apache_airflow_providers_cncf_kubernetes-10.7.0rc1.dist-info}/WHEEL +0 -0
- {apache_airflow_providers_cncf_kubernetes-10.6.2rc1.dist-info → apache_airflow_providers_cncf_kubernetes-10.7.0rc1.dist-info}/entry_points.txt +0 -0
@@ -29,7 +29,7 @@ from airflow import __version__ as airflow_version
|
|
29
29
|
|
30
30
|
__all__ = ["__version__"]
|
31
31
|
|
32
|
-
__version__ = "10.
|
32
|
+
__version__ = "10.7.0"
|
33
33
|
|
34
34
|
if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
|
35
35
|
"2.10.0"
|
@@ -530,7 +530,17 @@ class AirflowKubernetesScheduler(LoggingMixin):
|
|
530
530
|
self.log.debug("Terminating kube_watchers...")
|
531
531
|
for kube_watcher in self.kube_watchers.values():
|
532
532
|
kube_watcher.terminate()
|
533
|
-
|
533
|
+
self.log.debug("kube_watcher=%s", kube_watcher)
|
534
|
+
|
535
|
+
# for now 20 seconds is max wait time for kube watchers to terminate.
|
536
|
+
max_wait_time = 20
|
537
|
+
start_time = time.time()
|
538
|
+
for kube_watcher in self.kube_watchers.values():
|
539
|
+
kube_watcher.join(timeout=max(int(max_wait_time - (time.time() - start_time)), 0))
|
540
|
+
if kube_watcher.is_alive():
|
541
|
+
self.log.warning("kube_watcher didn't terminate in time=%s", kube_watcher)
|
542
|
+
kube_watcher.kill()
|
543
|
+
kube_watcher.join()
|
534
544
|
self.log.debug("kube_watcher=%s", kube_watcher)
|
535
545
|
self.log.debug("Flushing watcher_queue...")
|
536
546
|
self._flush_watcher_queue()
|
@@ -93,6 +93,7 @@ class KubernetesHook(BaseHook, PodOperatorHookProtocol):
|
|
93
93
|
:param cluster_context: Optionally specify a context to use (e.g. if you have multiple
|
94
94
|
in your kubeconfig.
|
95
95
|
:param config_file: Path to kubeconfig file.
|
96
|
+
:param config_dict: Takes the config file as a dict.
|
96
97
|
:param in_cluster: Set to ``True`` if running from within a kubernetes cluster.
|
97
98
|
:param disable_verify_ssl: Set to ``True`` if SSL verification should be disabled.
|
98
99
|
:param disable_tcp_keepalive: Set to ``True`` if you want to disable keepalive logic.
|
@@ -145,6 +146,7 @@ class KubernetesHook(BaseHook, PodOperatorHookProtocol):
|
|
145
146
|
client_configuration: client.Configuration | None = None,
|
146
147
|
cluster_context: str | None = None,
|
147
148
|
config_file: str | None = None,
|
149
|
+
config_dict: dict | None = None,
|
148
150
|
in_cluster: bool | None = None,
|
149
151
|
disable_verify_ssl: bool | None = None,
|
150
152
|
disable_tcp_keepalive: bool | None = None,
|
@@ -154,6 +156,7 @@ class KubernetesHook(BaseHook, PodOperatorHookProtocol):
|
|
154
156
|
self.client_configuration = client_configuration
|
155
157
|
self.cluster_context = cluster_context
|
156
158
|
self.config_file = config_file
|
159
|
+
self.config_dict = config_dict
|
157
160
|
self.in_cluster = in_cluster
|
158
161
|
self.disable_verify_ssl = disable_verify_ssl
|
159
162
|
self.disable_tcp_keepalive = disable_tcp_keepalive
|
@@ -213,12 +216,14 @@ class KubernetesHook(BaseHook, PodOperatorHookProtocol):
|
|
213
216
|
cluster_context = self._coalesce_param(self.cluster_context, self._get_field("cluster_context"))
|
214
217
|
kubeconfig_path = self._coalesce_param(self.config_file, self._get_field("kube_config_path"))
|
215
218
|
kubeconfig = self._get_field("kube_config")
|
216
|
-
num_selected_configuration = sum(
|
219
|
+
num_selected_configuration = sum(
|
220
|
+
1 for o in [in_cluster, kubeconfig, kubeconfig_path, self.config_dict] if o
|
221
|
+
)
|
217
222
|
|
218
223
|
if num_selected_configuration > 1:
|
219
224
|
raise AirflowException(
|
220
225
|
"Invalid connection configuration. Options kube_config_path, "
|
221
|
-
"kube_config, in_cluster are mutually exclusive. "
|
226
|
+
"kube_config, in_cluster, config_dict are mutually exclusive. "
|
222
227
|
"You can only use one option at a time."
|
223
228
|
)
|
224
229
|
|
@@ -265,6 +270,16 @@ class KubernetesHook(BaseHook, PodOperatorHookProtocol):
|
|
265
270
|
)
|
266
271
|
return client.ApiClient()
|
267
272
|
|
273
|
+
if self.config_dict:
|
274
|
+
self.log.debug(LOADING_KUBE_CONFIG_FILE_RESOURCE.format("config dictionary"))
|
275
|
+
self._is_in_cluster = False
|
276
|
+
config.load_kube_config_from_dict(
|
277
|
+
config_dict=self.config_dict,
|
278
|
+
client_configuration=self.client_configuration,
|
279
|
+
context=cluster_context,
|
280
|
+
)
|
281
|
+
return client.ApiClient()
|
282
|
+
|
268
283
|
return self._get_default_client(cluster_context=cluster_context)
|
269
284
|
|
270
285
|
def _get_default_client(self, *, cluster_context: str | None = None) -> client.ApiClient:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: apache-airflow-providers-cncf-kubernetes
|
3
|
-
Version: 10.
|
3
|
+
Version: 10.7.0rc1
|
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>
|
@@ -27,8 +27,8 @@ Requires-Dist: cryptography>=41.0.0
|
|
27
27
|
Requires-Dist: kubernetes>=32.0.0,<33.0.0
|
28
28
|
Requires-Dist: kubernetes_asyncio>=32.0.0,<33.0.0
|
29
29
|
Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
|
30
|
-
Project-URL: Changelog, https://airflow.staged.apache.org/docs/apache-airflow-providers-cncf-kubernetes/10.
|
31
|
-
Project-URL: Documentation, https://airflow.staged.apache.org/docs/apache-airflow-providers-cncf-kubernetes/10.
|
30
|
+
Project-URL: Changelog, https://airflow.staged.apache.org/docs/apache-airflow-providers-cncf-kubernetes/10.7.0/changelog.html
|
31
|
+
Project-URL: Documentation, https://airflow.staged.apache.org/docs/apache-airflow-providers-cncf-kubernetes/10.7.0
|
32
32
|
Project-URL: Mastodon, https://fosstodon.org/@airflow
|
33
33
|
Project-URL: Slack Chat, https://s.apache.org/airflow-slack
|
34
34
|
Project-URL: Source Code, https://github.com/apache/airflow
|
@@ -59,7 +59,7 @@ Project-URL: YouTube, https://www.youtube.com/channel/UCSXwxpWZQ7XZ1WL3wqevChA/
|
|
59
59
|
|
60
60
|
Package ``apache-airflow-providers-cncf-kubernetes``
|
61
61
|
|
62
|
-
Release: ``10.
|
62
|
+
Release: ``10.7.0``
|
63
63
|
|
64
64
|
Release Date: ``|PypiReleaseDate|``
|
65
65
|
|
@@ -73,7 +73,7 @@ This is a provider package for ``cncf.kubernetes`` provider. All classes for thi
|
|
73
73
|
are in ``airflow.providers.cncf.kubernetes`` python package.
|
74
74
|
|
75
75
|
You can find package information and changelog for the provider
|
76
|
-
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-cncf-kubernetes/10.
|
76
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-cncf-kubernetes/10.7.0/>`_.
|
77
77
|
|
78
78
|
Installation
|
79
79
|
------------
|
@@ -99,5 +99,5 @@ PIP package Version required
|
|
99
99
|
====================== ====================
|
100
100
|
|
101
101
|
The changelog for the provider package can be found in the
|
102
|
-
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-cncf-kubernetes/10.
|
102
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-cncf-kubernetes/10.7.0/changelog.html>`_.
|
103
103
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
airflow/providers/cncf/kubernetes/LICENSE,sha256=gXPVwptPlW1TJ4HSuG5OMPg-a3h43OGMkZRR1rpwfJA,10850
|
2
|
-
airflow/providers/cncf/kubernetes/__init__.py,sha256=
|
2
|
+
airflow/providers/cncf/kubernetes/__init__.py,sha256=nO-MA05qq1cVnEbzMUoPwMgv7GpTwbuIIfpxjjqgovY,1505
|
3
3
|
airflow/providers/cncf/kubernetes/callbacks.py,sha256=1nCLXFJKtr5FM9ApB8Drw5VAGSC3TDFsPSTMtRnAR3Q,6085
|
4
4
|
airflow/providers/cncf/kubernetes/exceptions.py,sha256=3cNEZTnrltBsqwzHiLfckwYYc_IWY1g4PcRs6zuMWWA,1137
|
5
5
|
airflow/providers/cncf/kubernetes/get_provider_info.py,sha256=Git4HycOcHrb4zD9W7ZYsqNDkQSQ4uipSJO_GaPiroE,16041
|
@@ -23,10 +23,10 @@ airflow/providers/cncf/kubernetes/decorators/kubernetes_cmd.py,sha256=C-G6_Ye42m
|
|
23
23
|
airflow/providers/cncf/kubernetes/executors/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
|
24
24
|
airflow/providers/cncf/kubernetes/executors/kubernetes_executor.py,sha256=W_TdvmD1pToHr6JQpUJr9YJNaQxjFDl6cDiWlrY3-DI,31927
|
25
25
|
airflow/providers/cncf/kubernetes/executors/kubernetes_executor_types.py,sha256=9EpTm3u0R6FgX7L41PFLUT2FRunpt7AFfbHvcA2pXmA,2004
|
26
|
-
airflow/providers/cncf/kubernetes/executors/kubernetes_executor_utils.py,sha256=
|
26
|
+
airflow/providers/cncf/kubernetes/executors/kubernetes_executor_utils.py,sha256=yThfPIabQcH_SWDgj4MnOB5poDthmbrwgSoG6Ah47jY,24983
|
27
27
|
airflow/providers/cncf/kubernetes/executors/local_kubernetes_executor.py,sha256=CWCN4b6Ircs-3tCxJjBsrjl4Q0ABBJIwqlZr7a5lW6k,12243
|
28
28
|
airflow/providers/cncf/kubernetes/hooks/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
29
|
-
airflow/providers/cncf/kubernetes/hooks/kubernetes.py,sha256=
|
29
|
+
airflow/providers/cncf/kubernetes/hooks/kubernetes.py,sha256=lsqlNxcqNkN_FGrT8aBCuWJlVV9Oo7BFwL9cWyoHZTw,37792
|
30
30
|
airflow/providers/cncf/kubernetes/kubernetes_executor_templates/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
31
31
|
airflow/providers/cncf/kubernetes/kubernetes_executor_templates/basic_template.yaml,sha256=yzJmXN4ZyB4aDwI_GIugpL9-f1YMVy__X-LQSbeU95A,2567
|
32
32
|
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=pl-G-2WhZVbewKkwmL9AxPo1hAQWHHEPK43b-ruF4-w,1937
|
55
55
|
airflow/providers/cncf/kubernetes/utils/pod_manager.py,sha256=DTIwT1b-MGpiIAao5SuKD8Qgu3vlGZ-NYeR_Mf5W7rE,40434
|
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.
|
57
|
+
apache_airflow_providers_cncf_kubernetes-10.7.0rc1.dist-info/entry_points.txt,sha256=ByD3QJJyP9CfmTYtpNI1953akD38RUDgpGXLaq9vpOw,111
|
58
|
+
apache_airflow_providers_cncf_kubernetes-10.7.0rc1.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
59
|
+
apache_airflow_providers_cncf_kubernetes-10.7.0rc1.dist-info/METADATA,sha256=re2BGhGerEDGlc5PqqiYtR-6wSGunVXMtho_qLmk_pc,4360
|
60
|
+
apache_airflow_providers_cncf_kubernetes-10.7.0rc1.dist-info/RECORD,,
|
File without changes
|