feat(warmer): Warmer now supports all registry-related flags (#1499)

which means we can now:
- set up one or more mirrors
- set up registries certificates
- skip TLS verify
- use plain HTTP
using the same set of flags that are defined for the executor
This commit is contained in:
Vincent Behar
2020-12-10 22:55:43 -08:00
committed by GitHub
parent 454910f613
commit dde98a8e73
14 changed files with 250 additions and 201 deletions
+2 -2
View File
@@ -147,7 +147,7 @@ func CheckPushPermissions(opts *config.KanikoOptions) error {
}
destRef.Repository.Registry = newReg
}
tr := newRetry(util.MakeTransport(opts, registryName))
tr := newRetry(util.MakeTransport(opts.RegistryOptions, registryName))
if err := checkRemotePushPermission(destRef, creds.GetKeychain(), tr); err != nil {
return errors.Wrapf(err, "checking push permission for %q", destRef)
}
@@ -244,7 +244,7 @@ func DoPush(image v1.Image, opts *config.KanikoOptions) error {
return errors.Wrap(err, "resolving pushAuth")
}
tr := newRetry(util.MakeTransport(opts, registryName))
tr := newRetry(util.MakeTransport(opts.RegistryOptions, registryName))
rt := &withUserAgent{t: tr}
if err := remote.Write(destRef, image, remote.WithAuth(pushAuth), remote.WithTransport(rt)); err != nil {