Preserve options when doing a cache push (#423)
* Preserve options when doing a cache push Otherwise options like `insecure` are lost * Do not override original object
This commit is contained in:
parent
fc43e218f0
commit
5ed45ed2fb
|
|
@ -126,7 +126,7 @@ func pushLayerToCache(opts *config.KanikoOptions, cacheKey string, layer v1.Laye
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrap(err, "appending layer onto empty image")
|
return errors.Wrap(err, "appending layer onto empty image")
|
||||||
}
|
}
|
||||||
return DoPush(empty, &config.KanikoOptions{
|
cacheOpts := *opts
|
||||||
Destinations: []string{cache},
|
cacheOpts.Destinations = []string{cache}
|
||||||
})
|
return DoPush(empty, &cacheOpts)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue