This is an automated email from the ASF dual-hosted git repository.

dimberman pushed a commit to branch v1-10-test
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/v1-10-test by this push:
     new 9e2557a  Fix init containers
9e2557a is described below

commit 9e2557a579ab9287293969662aa35e39b4b8b292
Author: Daniel Imberman <[email protected]>
AuthorDate: Sun Aug 9 10:18:18 2020 -0700

    Fix init containers
---
 airflow/kubernetes/pod_launcher.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/airflow/kubernetes/pod_launcher.py 
b/airflow/kubernetes/pod_launcher.py
index 30cb26a..620df31 100644
--- a/airflow/kubernetes/pod_launcher.py
+++ b/airflow/kubernetes/pod_launcher.py
@@ -299,9 +299,8 @@ def _convert_to_airflow_pod(pod):
     volumes, vol_secrets = _extract_volumes_and_secrets(pod.spec.volumes, 
base_container.volume_mounts)
     secrets.extend(vol_secrets)
     api_client = ApiClient()
-    if pod.spec.init_containers is None:
-        init_containers = [],
-    else:
+    init_containers = pod.spec.init_containers
+    if pod.spec.init_containers is not None:
         init_containers = [api_client.sanitize_for_serialization(i) for i in 
pod.spec.init_containers]
     dummy_pod = Pod(
         image=base_container.image,

Reply via email to