Skip to content

Commit 5ed45ed

Browse files
carlossgdlorenc
authored andcommitted
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
1 parent fc43e21 commit 5ed45ed

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/executor/push.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ func pushLayerToCache(opts *config.KanikoOptions, cacheKey string, layer v1.Laye
126126
if err != nil {
127127
return errors.Wrap(err, "appending layer onto empty image")
128128
}
129-
return DoPush(empty, &config.KanikoOptions{
130-
Destinations: []string{cache},
131-
})
129+
cacheOpts := *opts
130+
cacheOpts.Destinations = []string{cache}
131+
return DoPush(empty, &cacheOpts)
132132
}

0 commit comments

Comments
 (0)