@@ -131,7 +131,7 @@ def setup_tests(self, test_label):
131131 "affinity" : {},
132132 "containers" : [
133133 {
134- "image" : "ubuntu:16.04 " ,
134+ "image" : "ubuntu" ,
135135 "args" : ["echo 10" ],
136136 "command" : ["bash" , "-cx" ],
137137 "env" : [],
@@ -176,7 +176,7 @@ def test_do_xcom_push_defaults_false(self, kubeconfig_path, tmp_path):
176176 shutil .copy (kubeconfig_path , new_config_path )
177177 k = KubernetesPodOperator (
178178 namespace = "default" ,
179- image = "ubuntu:16.04 " ,
179+ image = "ubuntu" ,
180180 cmds = ["bash" , "-cx" ],
181181 arguments = ["echo 10" ],
182182 labels = self .labels ,
@@ -193,7 +193,7 @@ def test_config_path_move(self, kubeconfig_path, tmp_path):
193193
194194 k = KubernetesPodOperator (
195195 namespace = "default" ,
196- image = "ubuntu:16.04 " ,
196+ image = "ubuntu" ,
197197 cmds = ["bash" , "-cx" ],
198198 arguments = ["echo 10" ],
199199 labels = self .labels ,
@@ -212,7 +212,7 @@ def test_config_path_move(self, kubeconfig_path, tmp_path):
212212 def test_working_pod (self ):
213213 k = KubernetesPodOperator (
214214 namespace = "default" ,
215- image = "ubuntu:16.04 " ,
215+ image = "ubuntu" ,
216216 cmds = ["bash" , "-cx" ],
217217 arguments = ["echo 10" ],
218218 labels = self .labels ,
@@ -229,7 +229,7 @@ def test_working_pod(self):
229229 def test_skip_cleanup (self ):
230230 k = KubernetesPodOperator (
231231 namespace = "unknown" ,
232- image = "ubuntu:16.04 " ,
232+ image = "ubuntu" ,
233233 cmds = ["bash" , "-cx" ],
234234 arguments = ["echo 10" ],
235235 labels = self .labels ,
@@ -244,7 +244,7 @@ def test_skip_cleanup(self):
244244 def test_delete_operator_pod (self ):
245245 k = KubernetesPodOperator (
246246 namespace = "default" ,
247- image = "ubuntu:16.04 " ,
247+ image = "ubuntu" ,
248248 cmds = ["bash" , "-cx" ],
249249 arguments = ["echo 10" ],
250250 labels = self .labels ,
@@ -262,7 +262,7 @@ def test_delete_operator_pod(self):
262262 def test_skip_on_specified_exit_code (self ):
263263 k = KubernetesPodOperator (
264264 namespace = "default" ,
265- image = "ubuntu:16.04 " ,
265+ image = "ubuntu" ,
266266 cmds = ["bash" , "-cx" ],
267267 arguments = ["exit 42" ],
268268 task_id = str (uuid4 ()),
@@ -282,7 +282,7 @@ def test_already_checked_on_success(self):
282282 """
283283 k = KubernetesPodOperator (
284284 namespace = "default" ,
285- image = "ubuntu:16.04 " ,
285+ image = "ubuntu" ,
286286 cmds = ["bash" , "-cx" ],
287287 arguments = ["echo 10" ],
288288 labels = self .labels ,
@@ -304,7 +304,7 @@ def test_already_checked_on_failure(self):
304304 """
305305 k = KubernetesPodOperator (
306306 namespace = "default" ,
307- image = "ubuntu:16.04 " ,
307+ image = "ubuntu" ,
308308 cmds = ["bash" , "-cx" ],
309309 arguments = ["lalala" ],
310310 labels = self .labels ,
@@ -325,7 +325,7 @@ def test_already_checked_on_failure(self):
325325 def test_pod_hostnetwork (self ):
326326 k = KubernetesPodOperator (
327327 namespace = "default" ,
328- image = "ubuntu:16.04 " ,
328+ image = "ubuntu" ,
329329 cmds = ["bash" , "-cx" ],
330330 arguments = ["echo 10" ],
331331 labels = self .labels ,
@@ -345,7 +345,7 @@ def test_pod_dnspolicy(self):
345345 dns_policy = "ClusterFirstWithHostNet"
346346 k = KubernetesPodOperator (
347347 namespace = "default" ,
348- image = "ubuntu:16.04 " ,
348+ image = "ubuntu" ,
349349 cmds = ["bash" , "-cx" ],
350350 arguments = ["echo 10" ],
351351 labels = self .labels ,
@@ -367,7 +367,7 @@ def test_pod_schedulername(self):
367367 scheduler_name = "default-scheduler"
368368 k = KubernetesPodOperator (
369369 namespace = "default" ,
370- image = "ubuntu:16.04 " ,
370+ image = "ubuntu" ,
371371 cmds = ["bash" , "-cx" ],
372372 arguments = ["echo 10" ],
373373 labels = self .labels ,
@@ -386,7 +386,7 @@ def test_pod_node_selector(self):
386386 node_selector = {"beta.kubernetes.io/os" : "linux" }
387387 k = KubernetesPodOperator (
388388 namespace = "default" ,
389- image = "ubuntu:16.04 " ,
389+ image = "ubuntu" ,
390390 cmds = ["bash" , "-cx" ],
391391 arguments = ["echo 10" ],
392392 labels = self .labels ,
@@ -408,7 +408,7 @@ def test_pod_resources(self):
408408 )
409409 k = KubernetesPodOperator (
410410 namespace = "default" ,
411- image = "ubuntu:16.04 " ,
411+ image = "ubuntu" ,
412412 cmds = ["bash" , "-cx" ],
413413 arguments = ["echo 10" ],
414414 labels = self .labels ,
@@ -487,7 +487,7 @@ def test_pod_affinity(self, val):
487487 }
488488 k = KubernetesPodOperator (
489489 namespace = "default" ,
490- image = "ubuntu:16.04 " ,
490+ image = "ubuntu" ,
491491 cmds = ["bash" , "-cx" ],
492492 arguments = ["echo 10" ],
493493 labels = self .labels ,
@@ -510,7 +510,7 @@ def test_port(self):
510510
511511 k = KubernetesPodOperator (
512512 namespace = "default" ,
513- image = "ubuntu:16.04 " ,
513+ image = "ubuntu" ,
514514 cmds = ["bash" , "-cx" ],
515515 arguments = ["echo 10" ],
516516 labels = self .labels ,
@@ -541,7 +541,7 @@ def test_volume_mount(self):
541541 ]
542542 k = KubernetesPodOperator (
543543 namespace = "default" ,
544- image = "ubuntu:16.04 " ,
544+ image = "ubuntu" ,
545545 cmds = ["bash" , "-cx" ],
546546 arguments = args ,
547547 labels = self .labels ,
@@ -571,7 +571,7 @@ def test_run_as_user(self, uid):
571571 name = str (uuid4 ())
572572 k = KubernetesPodOperator (
573573 namespace = "default" ,
574- image = "ubuntu:16.04 " ,
574+ image = "ubuntu" ,
575575 cmds = ["bash" , "-cx" ],
576576 arguments = ["echo 10" ],
577577 task_id = name ,
@@ -596,7 +596,7 @@ def test_fs_group(self, gid):
596596 name = str (uuid4 ())
597597 k = KubernetesPodOperator (
598598 namespace = "default" ,
599- image = "ubuntu:16.04 " ,
599+ image = "ubuntu" ,
600600 cmds = ["bash" , "-cx" ],
601601 arguments = ["echo 10" ],
602602 task_id = name ,
@@ -620,7 +620,7 @@ def test_disable_privilege_escalation(self):
620620
621621 k = KubernetesPodOperator (
622622 namespace = "default" ,
623- image = "ubuntu:16.04 " ,
623+ image = "ubuntu" ,
624624 cmds = ["bash" , "-cx" ],
625625 arguments = ["echo 10" ],
626626 labels = self .labels ,
@@ -660,7 +660,7 @@ def test_faulty_image(self):
660660 def test_faulty_service_account (self ):
661661 k = KubernetesPodOperator (
662662 namespace = "default" ,
663- image = "ubuntu:16.04 " ,
663+ image = "ubuntu" ,
664664 cmds = ["bash" , "-cx" ],
665665 arguments = ["echo 10" ],
666666 labels = self .labels ,
@@ -682,7 +682,7 @@ def test_pod_failure(self):
682682 bad_internal_command = ["foobar 10 " ]
683683 k = KubernetesPodOperator (
684684 namespace = "default" ,
685- image = "ubuntu:16.04 " ,
685+ image = "ubuntu" ,
686686 cmds = ["bash" , "-cx" ],
687687 arguments = bad_internal_command ,
688688 labels = self .labels ,
@@ -702,7 +702,7 @@ def test_xcom_push(self, test_label):
702702 args = [f"echo '{ json .dumps (expected )} ' > /airflow/xcom/return.json" ]
703703 k = KubernetesPodOperator (
704704 namespace = "default" ,
705- image = "ubuntu:16.04 " ,
705+ image = "ubuntu" ,
706706 cmds = ["bash" , "-cx" ],
707707 arguments = args ,
708708 labels = self .labels ,
@@ -726,7 +726,7 @@ def test_env_vars(self):
726726
727727 k = KubernetesPodOperator (
728728 namespace = "default" ,
729- image = "ubuntu:16.04 " ,
729+ image = "ubuntu" ,
730730 cmds = ["bash" , "-cx" ],
731731 arguments = ["echo 10" ],
732732 env_vars = env_vars ,
@@ -891,7 +891,7 @@ def test_init_container(self):
891891
892892 init_container = k8s .V1Container (
893893 name = "init-container" ,
894- image = "ubuntu:16.04 " ,
894+ image = "ubuntu" ,
895895 env = init_environments ,
896896 volume_mounts = volume_mounts ,
897897 command = ["bash" , "-cx" ],
@@ -904,7 +904,7 @@ def test_init_container(self):
904904 )
905905 expected_init_container = {
906906 "name" : "init-container" ,
907- "image" : "ubuntu:16.04 " ,
907+ "image" : "ubuntu" ,
908908 "command" : ["bash" , "-cx" ],
909909 "args" : ["echo 10" ],
910910 "env" : [{"name" : "key1" , "value" : "value1" }, {"name" : "key2" , "value" : "value2" }],
@@ -913,7 +913,7 @@ def test_init_container(self):
913913
914914 k = KubernetesPodOperator (
915915 namespace = "default" ,
916- image = "ubuntu:16.04 " ,
916+ image = "ubuntu" ,
917917 cmds = ["bash" , "-cx" ],
918918 arguments = ["echo 10" ],
919919 labels = self .labels ,
@@ -1062,7 +1062,7 @@ def test_pod_priority_class_name(self, hook_mock, await_pod_completion_mock):
10621062 priority_class_name = "medium-test"
10631063 k = KubernetesPodOperator (
10641064 namespace = "default" ,
1065- image = "ubuntu:16.04 " ,
1065+ image = "ubuntu" ,
10661066 cmds = ["bash" , "-cx" ],
10671067 arguments = ["echo 10" ],
10681068 labels = self .labels ,
@@ -1085,7 +1085,7 @@ def test_pod_name(self):
10851085 pod_name_too_long = "a" * 221
10861086 k = KubernetesPodOperator (
10871087 namespace = "default" ,
1088- image = "ubuntu:16.04 " ,
1088+ image = "ubuntu" ,
10891089 cmds = ["bash" , "-cx" ],
10901090 arguments = ["echo 10" ],
10911091 labels = self .labels ,
@@ -1107,7 +1107,7 @@ def test_on_kill(self):
11071107 namespace = "default"
11081108 k = KubernetesPodOperator (
11091109 namespace = "default" ,
1110- image = "ubuntu:16.04 " ,
1110+ image = "ubuntu" ,
11111111 cmds = ["bash" , "-cx" ],
11121112 arguments = ["sleep 1000" ],
11131113 labels = self .labels ,
@@ -1149,7 +1149,7 @@ def test_reattach_failing_pod_once(self):
11491149 def get_op ():
11501150 return KubernetesPodOperator (
11511151 namespace = "default" ,
1152- image = "ubuntu:16.04 " ,
1152+ image = "ubuntu" ,
11531153 cmds = ["bash" , "-cx" ],
11541154 arguments = ["exit 1" ],
11551155 labels = self .labels ,
@@ -1210,7 +1210,7 @@ def get_op():
12101210 def test_changing_base_container_name_with_get_logs (self ):
12111211 k = KubernetesPodOperator (
12121212 namespace = "default" ,
1213- image = "ubuntu:16.04 " ,
1213+ image = "ubuntu" ,
12141214 cmds = ["bash" , "-cx" ],
12151215 arguments = ["echo 10" ],
12161216 labels = self .labels ,
@@ -1240,7 +1240,7 @@ def test_changing_base_container_name_no_logs(self):
12401240 """
12411241 k = KubernetesPodOperator (
12421242 namespace = "default" ,
1243- image = "ubuntu:16.04 " ,
1243+ image = "ubuntu" ,
12441244 cmds = ["bash" , "-cx" ],
12451245 arguments = ["echo 10" ],
12461246 labels = self .labels ,
@@ -1270,7 +1270,7 @@ def test_changing_base_container_name_no_logs_long(self):
12701270 """
12711271 k = KubernetesPodOperator (
12721272 namespace = "default" ,
1273- image = "ubuntu:16.04 " ,
1273+ image = "ubuntu" ,
12741274 cmds = ["bash" , "-cx" ],
12751275 arguments = ["sleep 3" ],
12761276 labels = self .labels ,
@@ -1296,7 +1296,7 @@ def test_changing_base_container_name_no_logs_long(self):
12961296 def test_changing_base_container_name_failure (self ):
12971297 k = KubernetesPodOperator (
12981298 namespace = "default" ,
1299- image = "ubuntu:16.04 " ,
1299+ image = "ubuntu" ,
13001300 cmds = ["exit" ],
13011301 arguments = ["1" ],
13021302 labels = self .labels ,
0 commit comments