Skip to content

Commit

Permalink
Bump the kaniko timeout to 20m. (#871)
Browse files Browse the repository at this point in the history
  • Loading branch information
dlorenc authored Aug 3, 2018
1 parent 789f604 commit 85d0729
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion pkg/skaffold/build/kaniko/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import (
)

const kanikoContainerName = "kaniko"
const kanikoTimeout = 20 * time.Minute

func runKaniko(ctx context.Context, out io.Writer, artifact *v1alpha2.Artifact, cfg *v1alpha2.KanikoBuild) (string, error) {
dockerfilePath := artifact.DockerArtifact.DockerfilePath
Expand Down Expand Up @@ -112,7 +113,7 @@ func runKaniko(ctx context.Context, out io.Writer, artifact *v1alpha2.Artifact,
}
}()

if err := kubernetes.WaitForPodComplete(pods, p.Name); err != nil {
if err := kubernetes.WaitForPodComplete(pods, p.Name, kanikoTimeout); err != nil {
return "", errors.Wrap(err, "waiting for pod to complete")
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/skaffold/kubernetes/wait.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ func WaitForPodReady(pods corev1.PodInterface, podName string) error {
})
}

func WaitForPodComplete(pods corev1.PodInterface, podName string) error {
func WaitForPodComplete(pods corev1.PodInterface, podName string, timeout time.Duration) error {
logrus.Infof("Waiting for %s to be ready", podName)
return wait.PollImmediate(time.Millisecond*500, time.Minute*10, func() (bool, error) {
return wait.PollImmediate(time.Millisecond*500, timeout, func() (bool, error) {
pod, err := pods.Get(podName, meta_v1.GetOptions{
IncludeUninitialized: true,
})
Expand Down

0 comments on commit 85d0729

Please sign in to comment.