From 52bf3e0ce1aca048c060e9f3d1d72ad9fdc08946 Mon Sep 17 00:00:00 2001 From: Martynas Asipauskas Date: Fri, 30 Aug 2024 13:02:13 +0100 Subject: [PATCH 1/2] Fix Bearer auth to work when authenticating against K8S from Airflow Operator --- third_party/airflow/armada/log_manager.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/third_party/airflow/armada/log_manager.py b/third_party/airflow/armada/log_manager.py index 0a94ddeabbb..b7c763eb085 100644 --- a/third_party/airflow/armada/log_manager.py +++ b/third_party/airflow/armada/log_manager.py @@ -47,15 +47,12 @@ def _k8s_client(self, k8s_context) -> client.CoreV1Api: k8s_client = client.CoreV1Api( api_client=client.ApiClient(configuration=configuration) ) - k8s_client.api_client.configuration.api_key_prefix["authorization"] = ( - "Bearer" - ) KubernetesPodLogManager.CLIENTS[k8s_context] = k8s_client return KubernetesPodLogManager.CLIENTS[k8s_context] def _with_bearer_auth(self, client): client.api_client.configuration.api_key["authorization"] = ( - self._token_retriever.get_token() + f"Bearer {self._token_retriever.get_token()}" ) def fetch_container_logs( From 84dafa720cd6e6ad4bc000911f9e0f71423a4713 Mon Sep 17 00:00:00 2001 From: Martynas Asipauskas Date: Fri, 30 Aug 2024 13:03:55 +0100 Subject: [PATCH 2/2] Update pyproject.toml --- third_party/airflow/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/airflow/pyproject.toml b/third_party/airflow/pyproject.toml index 3c8471bde44..76229ca7e73 100644 --- a/third_party/airflow/pyproject.toml +++ b/third_party/airflow/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "armada_airflow" -version = "1.0.2" +version = "1.0.3" description = "Armada Airflow Operator" readme='README.md' authors = [{name = "Armada-GROSS", email = "armada@armadaproject.io"}]