Skip to content

Commit

Permalink
KubernetesExecutor should accept images from executor_config
Browse files Browse the repository at this point in the history
Addresses:
#13003 (comment)

Users should be able to specify custom images in the executor_config. Not being
able to is a regression.
  • Loading branch information
dimberman committed Dec 14, 2020
1 parent 01524bb commit e0d3aad
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion airflow/kubernetes/pod_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,9 +535,15 @@ def construct_pod(
- executor_config
- dynamic arguments
"""
try:
image = pod_override_object.spec.containers[0].image # type: ignore
if not image:
image = kube_image
except Exception: # pylint: disable=W0703
image = kube_image
dynamic_pod = PodGenerator(
namespace=namespace,
image=kube_image,
image=image,
labels={
'airflow-worker': worker_uuid,
'dag_id': make_safe_label_value(dag_id),
Expand Down

0 comments on commit e0d3aad

Please sign in to comment.