Commit Graph

8 Commits

Author SHA1 Message Date
Cole Wippern 776fa43eb2 refactor cache.Warm and add tests 2020-01-10 12:29:17 -08:00
Cole Wippern b1b0513c05 Fix #926 cache warmer and method signature 2020-01-10 12:29:16 -08:00
Sharif Elgamal 56eeaf41e6
Merge pull request #452 from sharifelgamal/cache-fix
Create cache directory if it doesn't already exist
2019-08-02 13:41:38 -07:00
Sharif Elgamal 8a24115b6a
Prevent panic on nil image 2019-08-02 13:25:20 -07:00
v.rul 7750094ec1 Add checking image presence in cache prior to downloading it
This changes allow to use kaniko-warmer multiple times without unnecessary docker image downloads.
To check image presence in cache directory I'm using existing cache function that is used by kaniko-executor.
I've considered building separate function to only check image presence, but it will have pretty much the same code.
Questionable decision is to embed CacheOptions type to KanikoOptions and WarmerOptions. Probably this should be resolved by creating interface providing needed options and implement it both mentioned structs. But I've struggled to get a meaningfull name to it.
To replicate previous behaviour of downloading regardless of cache state I've added --force(-f) option.

This changes provides crucial speed-up when downloading images from remote registry is slow.

Closes #722
2019-07-24 18:09:21 +03:00
dlorenc 4b7e2b3a06
Update the cache warmer to also save manifests. (#576) 2019-02-21 14:09:22 -06:00
James Rawlings af50bcec69 let's return errors when warming a cache (#553)
* let's return errors when warming a cache

* Fix lint error in warm.go
2019-02-08 15:14:53 -06:00
Sharif Elgamal effac9dfc3
Persistent volume caching for base images (#383)
* comments

* initial commit for persisent volume caching

* cache warmer works

* general cleanup

* adding some debugging

* adding missing files

* Fixing up cache retrieval and cleanup

* fix tests

* removing auth since we only cache public images

* simplifying the caching logic

* fixing logic

* adding volume cache to integration tests. remove auth from cache warmer image.

* add building warmer to integration-test

* move sample yaml files to examples dir

* small test fix
2018-10-11 13:38:05 -07:00