You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/06/25 19:56:41 UTC

[GitHub] [airflow] dstandish commented on a diff in pull request #24658: Add `airflow_kpo_in_cluster` label to KPO pods

dstandish commented on code in PR #24658:
URL: https://github.com/apache/airflow/pull/24658#discussion_r906718644


##########
airflow/providers/cncf/kubernetes/hooks/kubernetes.py:
##########
@@ -127,6 +127,9 @@ def __init__(
         self.disable_verify_ssl = disable_verify_ssl
         self.disable_tcp_keepalive = disable_tcp_keepalive
 
+        # Expose whether the hook is configured to use incluster_config or not
+        self.is_in_cluster: Optional[bool] = None

Review Comment:
   So... maybe what you should do is this
   
   ```
   @property
   def is_in_cluster(self):
       self.client
       return self._is_in_cluster
   ```
   
   that way it will always tell the truth....
   
   sorta like we arrived at with KPO



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org