fdemiane commented on code in PR #32673:
URL: https://github.com/apache/airflow/pull/32673#discussion_r1267800821


##########
airflow/providers/google/cloud/hooks/kubernetes_engine.py:
##########
@@ -387,8 +387,15 @@ def get_xcom_sidecar_container_resources(self):
 
     def get_conn(self) -> client.ApiClient:
         configuration = self._get_config()
+        configuration.refresh_api_key_hook = self._refresh_api_key_hook
         return client.ApiClient(configuration)
 
+    def _refresh_api_key_hook(self, configuration: 
client.configuration.Configuration):
+        creds = self.get_credentials()
+        if not GKEPodHook._is_credentials_valid(creds):
+            GKEPodHook._refresh_token(creds)
+            configuration.api_key = {"authorization": creds.token}

Review Comment:
   Thank you for the review! Fixed 



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