feat(kaniko): Optimize kaniko build by 50% using compression and add progress
Merge current PR after 9464: https://github.com/GoogleContainerTools/skaffold/pull/9464
Description
We have a large code base(over 96k files) and it's painful to deploy the service because it takes a lot of time. I've spent a lot of time trying to fix this and finally, I did it, now it takes less than 50% time to deploy and it transfers 3x less data.
I also added progress output so it'll be convenient to see what's going on.
User facing changes
New kaniko config option BuildContextCompressionLevel.
New default output Start building with kaniko for artifact.
New progress Sending build context to Kaniko pod {amount}
.
before optimization:
3 minutes and 40 seconds to create a tar file and 613M transfer
after optimization:
1 minute and 24 seconds to create a tar file and 167M transfer
After both of these changes https://github.com/GoogleContainerTools/skaffold/pull/9476 and https://github.com/GoogleContainerTools/skaffold/pull/9451 It now takes only 4 minutes from the time the skaffold dev command is run until the deployment stabilizes.
It used to take more than 15 minutes(~10 minutes for kaniko build and ~5 minutes for helm deploy)
@ericzzzzzzz what do you think about this PR? it reduced kaniko build time by 50% and data transfer by 70%(from 610M to 167M)
Hi @idsulik , Thank you so much for the contribution, this is a great improvement. It's gonna take me some time to review this as I'm not very familiar with kaniko.