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


##########
providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/hooks/kubernetes.py:
##########
@@ -818,6 +818,19 @@ def __init__(
         self._event_polling_fallback = False
         self._config_loaded = False
 
+    def _uses_exec_auth(self, kubeconfig_data: dict) -> bool:
+        """
+        Detect if kubeconfig uses exec-based authentication.
+
+        Exec plugins return short-lived tokens (EKS, GKE, etc).
+        """
+        users = kubeconfig_data.get("users", [])
+        for user in users:
+            user_auth = user.get("user", {})
+            if "exec" in user_auth:
+                return True
+        return False

Review Comment:
   +1 needs addressing.



##########
providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/hooks/kubernetes.py:
##########
@@ -818,6 +818,19 @@ def __init__(
         self._event_polling_fallback = False
         self._config_loaded = False
 
+    def _uses_exec_auth(self, kubeconfig_data: dict) -> bool:
+        """
+        Detect if kubeconfig uses exec-based authentication.
+
+        Exec plugins return short-lived tokens (EKS, GKE, etc).
+        """
+        users = kubeconfig_data.get("users", [])
+        for user in users:
+            user_auth = user.get("user", {})
+            if "exec" in user_auth:
+                return True
+        return False

Review Comment:
   +1 needs addressing



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