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/11/05 19:47:38 UTC
[GitHub] [airflow] dstandish commented on a diff in pull request #27516: KPO should use hook's get namespace method to get namespace
dstandish commented on code in PR #27516:
URL: https://github.com/apache/airflow/pull/27516#discussion_r1014710390
##########
airflow/providers/cncf/kubernetes/operators/kubernetes_pod.py:
##########
@@ -577,7 +577,9 @@ def build_pod_request_obj(self, context: Context | None = None) -> k8s.V1Pod:
pod.metadata.name = PodGenerator.make_unique_pod_id(pod.metadata.name)
if not pod.metadata.namespace:
- hook_namespace = self.hook.conn_extras.get("extra__kubernetes__namespace")
+ # todo: replace with call to `hook.get_namespace` in 6.0, when it doesn't default to `default`.
+ # if namespace not actually defined in hook, we want to check k8s if in cluster
+ hook_namespace = self.hook._get_namespace()
Review Comment:
yes it should. it will happen after 6.0 when we replace the current `get_namespace`
--
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