ferruzzi commented on a change in pull request #19398:
URL: https://github.com/apache/airflow/pull/19398#discussion_r743784073
##########
File path: airflow/providers/cncf/kubernetes/operators/kubernetes_pod.py
##########
@@ -484,6 +489,11 @@ def create_pod_request_obj(self) -> k8s.V1Pod:
),
)
+ if self.random_name_suffix:
+ if pod_template:
+ pod_template.metadata.name =
PodGenerator.make_unique_pod_id(pod_template.metadata.name)
+ pod.metadata.name =
PodGenerator.make_unique_pod_id(pod.metadata.name)
+
pod = PodGenerator.reconcile_pods(pod_template, pod)
Review comment:
Sure, I'll move this. Is there a particular reason that I missed or
just preference?
##########
File path: airflow/providers/cncf/kubernetes/operators/kubernetes_pod.py
##########
@@ -484,6 +489,11 @@ def create_pod_request_obj(self) -> k8s.V1Pod:
),
)
+ if self.random_name_suffix:
+ if pod_template:
+ pod_template.metadata.name =
PodGenerator.make_unique_pod_id(pod_template.metadata.name)
+ pod.metadata.name =
PodGenerator.make_unique_pod_id(pod.metadata.name)
+
pod = PodGenerator.reconcile_pods(pod_template, pod)
Review comment:
Sure, I'll move this. That simplifies things. Cheers.
##########
File path: airflow/providers/cncf/kubernetes/operators/kubernetes_pod.py
##########
@@ -484,6 +489,11 @@ def create_pod_request_obj(self) -> k8s.V1Pod:
),
)
+ if self.random_name_suffix:
+ if pod_template:
+ pod_template.metadata.name =
PodGenerator.make_unique_pod_id(pod_template.metadata.name)
+ pod.metadata.name =
PodGenerator.make_unique_pod_id(pod.metadata.name)
+
pod = PodGenerator.reconcile_pods(pod_template, pod)
Review comment:
See:
https://github.com/apache/airflow/pull/19398/commits/2d34a160b89fa3217cce9ce7996a4787660b799b
--
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]