File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -539,6 +539,8 @@ metadata:
539539spec:
540540 backoffLimit: 0
541541 ttlSecondsAfterFinished: 3600
542+ parallelism: 1
543+ completions: 1
542544 template:
543545 spec:
544546 containers:
@@ -574,6 +576,12 @@ spec:
574576 path: config.json
575577EOF
576578
579+ # RHDHBUGS-2478: the job pod might not be scheduled right away after job creation
580+ if ! invoke_cluster_cli -n " ${namespace} " wait " job/${kanikoJobName} " --for=jsonpath=' {.status.active}' =1 --timeout=300s >&2 ; then
581+ errorf " unable to get Kaniko job active. Something might be preventing Jobs from being scheduled properly in this cluster"
582+ invoke_cluster_cli -n " ${namespace} " describe job " ${kanikoJobName} " >&2
583+ return 1
584+ fi
577585 kanikoPod=$( invoke_cluster_cli -n " ${namespace} " get pods --selector=job-name=" ${kanikoJobName} " -o jsonpath=' {.items[0].metadata.name}' )
578586 if [ -z " $kanikoPod " ]; then
579587 errorf " unable to determine the Kaniko Pod"
You can’t perform that action at this time.
0 commit comments