amoghrajesh commented on code in PR #34819:
URL: https://github.com/apache/airflow/pull/34819#discussion_r1349849665


##########
airflow/providers/cncf/kubernetes/operators/resource.py:
##########
@@ -61,20 +61,22 @@ def __init__(
         yaml_conf: str,
         namespace: str | None = None,
         kubernetes_conn_id: str | None = KubernetesHook.default_conn_name,
+        config_file: str | None = None,
         **kwargs,
     ) -> None:
         super().__init__(**kwargs)
         self._namespace = namespace
         self.kubernetes_conn_id = kubernetes_conn_id
         self.yaml_conf = yaml_conf
+        self.config_file = config_file
 
     @cached_property
     def client(self) -> ApiClient:
         return self.hook.api_client
 
     @cached_property
     def hook(self) -> KubernetesHook:
-        hook = KubernetesHook(conn_id=self.kubernetes_conn_id)
+        hook = KubernetesHook(conn_id=self.kubernetes_conn_id, 
config_file=self.config_file)

Review Comment:
   Dont you think we should have a None check before using the config_file 
here? If not passed, it will go as None to the hook. 
   
   Also can you add some test coverage for this?



-- 
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