mirror of
https://github.com/GoogleContainerTools/kaniko
synced 2026-10-22 10:56:28 +02:00
Add retries to image push.
This uses the default provided retry transport by go-containerregistry as this originally had no retries built in. This is useful to avoid intermittent failures of image registries when returning a retryable status code.
This commit is contained in:
@@ -41,6 +41,7 @@ import (
|
||||
"github.com/google/go-containerregistry/pkg/v1/layout"
|
||||
"github.com/google/go-containerregistry/pkg/v1/mutate"
|
||||
"github.com/google/go-containerregistry/pkg/v1/remote"
|
||||
"github.com/google/go-containerregistry/pkg/v1/remote/transport"
|
||||
"github.com/google/go-containerregistry/pkg/v1/tarball"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/sirupsen/logrus"
|
||||
@@ -311,7 +312,7 @@ func makeTransport(opts *config.KanikoOptions, registryName string, loader syste
|
||||
}
|
||||
}
|
||||
}
|
||||
return tr
|
||||
return transport.NewRetry(tr)
|
||||
}
|
||||
|
||||
// pushLayerToCache pushes layer (tagged with cacheKey) to opts.Cache
|
||||
|
||||
Reference in New Issue
Block a user