dstandish commented on code in PR #27719:
URL: https://github.com/apache/airflow/pull/27719#discussion_r1025614313
##########
airflow/providers/cncf/kubernetes/operators/kubernetes_pod.py:
##########
@@ -326,6 +328,23 @@ def _render_nested_template_fields(
self._do_render_template_fields(content, ("limits", "requests"),
context, jinja_env, seen_oids)
return
+ if id(content) not in seen_oids and isinstance(content, k8s.V1Volume):
+ seen_oids.add(id(content))
+ self._do_render_template_fields(
+ content, ("name", "persistent_volume_claim"), context,
jinja_env, seen_oids
+ )
+ return
+
+ if id(content) not in seen_oids and isinstance(content,
k8s.V1VolumeMount):
+ seen_oids.add(id(content))
+ self._do_render_template_fields(content, ("name",), context,
jinja_env, seen_oids)
+ return
+
+ if id(content) not in seen_oids and isinstance(content,
k8s.V1PersistentVolumeClaimVolumeSource):
+ seen_oids.add(id(content))
+ self._do_render_template_fields(content, ("claim_name",), context,
jinja_env, seen_oids)
+ return
+
Review Comment:
i think it keeps same logic but .... little cleaner
--
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]