raphaelauv commented on code in PR #45571:
URL: https://github.com/apache/airflow/pull/45571#discussion_r1920151137


##########
providers/src/airflow/providers/cncf/kubernetes/hooks/kubernetes.py:
##########
@@ -757,6 +759,16 @@ async def _load_config(self):
             await async_config.load_kube_config_from_dict(self.config_dict)
             return async_client.ApiClient()
 
+        if kubeconfig_path is not None:
+            self.log.debug("loading kube_config from: %s", kubeconfig_path)
+            self._is_in_cluster = False
+            await async_config.load_kube_config(
+                config_file=kubeconfig_path,
+                client_configuration=self.client_configuration,
+                context=cluster_context,
+            )
+            return async_client.ApiClient()
+

Review Comment:
   thanks for the review :+1: 
   
   my fix is a reflect of the current implementation of the not async version , 
I had in mind to only fix the issue , not refactor the KPO code duplication , 
is that okay ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to