This is an automated email from the ASF dual-hosted git repository.
dstandish pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new db8cbf6ab5 Add get_namespace to GKEPodHook (#31397)
db8cbf6ab5 is described below
commit db8cbf6ab5e144f58555e0c30361d8d6ec31ef21
Author: Daniel Standish <[email protected]>
AuthorDate: Thu May 18 13:33:09 2023 -0700
Add get_namespace to GKEPodHook (#31397)
In next major release of CNCF this method will be used by KPO instead of
_get_namespace so best to add it to GKE as soon as possible.
---
airflow/providers/google/cloud/hooks/kubernetes_engine.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/airflow/providers/google/cloud/hooks/kubernetes_engine.py
b/airflow/providers/google/cloud/hooks/kubernetes_engine.py
index 1bbd674ca6..27e9d6043b 100644
--- a/airflow/providers/google/cloud/hooks/kubernetes_engine.py
+++ b/airflow/providers/google/cloud/hooks/kubernetes_engine.py
@@ -373,6 +373,9 @@ class GKEPodHook(GoogleBaseHook, PodOperatorHookProtocol):
def is_in_cluster(self) -> bool:
return False
+ def get_namespace(self):
+ """Get the namespace configured by the Airflow connection."""
+
def _get_namespace(self):
"""Implemented for compatibility with KubernetesHook. Deprecated; do
not use."""