chapm250 commented on code in PR #34819:
URL: https://github.com/apache/airflow/pull/34819#discussion_r1350404713
##########
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:
if it's null the kubernetes library fills in the default, the
KubernetesPodOperator works the same way
https://github.com/apache/airflow/blob/main/airflow/providers/cncf/kubernetes/operators/pod.py#L301
https://github.com/apache/airflow/blob/main/airflow/providers/cncf/kubernetes/operators/pod.py#L518
--
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]