dstandish commented on code in PR #26766:
URL: https://github.com/apache/airflow/pull/26766#discussion_r984174695
##########
airflow/providers/cncf/kubernetes/utils/xcom_sidecar.py:
##########
@@ -54,6 +56,9 @@ def add_xcom_sidecar(pod: k8s.V1Pod) -> k8s.V1Pod:
pod_cp.spec.volumes.insert(0, PodDefaults.VOLUME)
pod_cp.spec.containers[0].volume_mounts =
pod_cp.spec.containers[0].volume_mounts or []
pod_cp.spec.containers[0].volume_mounts.insert(0, PodDefaults.VOLUME_MOUNT)
- pod_cp.spec.containers.append(PodDefaults.SIDECAR_CONTAINER)
+
+ sidecar = copy.deepcopy(PodDefaults.SIDECAR_CONTAINER)
+ sidecar.image = conf.get('kubernetes', 'sidecar_container_image',
fallback=sidecar.image)
Review Comment:
stuff in the k8s provider should not refer to core settings. we're trying
to keep these separate. core should only be referred to for k8s executor. if
you want to be able to modify the xcom container, should do so via airflow
connection instead... or... possibly.... through an operator param... but i
think airflow connection is better. look in KPO how you can reference attrs on
the hook through `self.hook`. this can get you access to params defined in the
connection.
--
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]