From 7141c42cc33000fe506a41679409d0a260d63eb0 Mon Sep 17 00:00:00 2001 From: Mati O Date: Tue, 22 Aug 2023 11:48:49 +0300 Subject: [PATCH] Make cluster_context templated (#33604) --- airflow/providers/cncf/kubernetes/operators/pod.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/airflow/providers/cncf/kubernetes/operators/pod.py b/airflow/providers/cncf/kubernetes/operators/pod.py index 7a1cd975e693..eee7aab2ab30 100644 --- a/airflow/providers/cncf/kubernetes/operators/pod.py +++ b/airflow/providers/cncf/kubernetes/operators/pod.py @@ -173,7 +173,7 @@ class KubernetesPodOperator(BaseOperator): They can be exposed as environment vars or files in a volume. :param in_cluster: run kubernetes client with in_cluster configuration. :param cluster_context: context that points to kubernetes cluster. - Ignored when in_cluster is True. If None, current-context is used. + Ignored when in_cluster is True. If None, current-context is used. (templated) :param reattach_on_restart: if the worker dies while the pod is running, reattach and monitor during the next try. If False, always create a new pod for each try. :param labels: labels to apply to the Pod. (templated) @@ -262,6 +262,7 @@ class KubernetesPodOperator(BaseOperator): "container_resources", "volumes", "volume_mounts", + "cluster_context", ) template_fields_renderers = {"env_vars": "py"}