kaniko
kaniko copied to clipboard
After I turned off all caching, all build contexts were still cached in the /kaniko directory
All relevant versions: kaniko: v1.22.0-debug tekton: v0.57.0 kubernetes: v1.28.3-aliyun.1 containerd: 1.6.28 host os: aliyun_3_9_x64_20G_alibase_20231219.vhd
command options :
--cache=false
--cache-run-layers=false
--cache-copy-layers=false
--compressed-caching=false
--cleanup
--context=$(workspaces.source.path)
--dockerfile=$(workspaces.source.path)/Dockerfile
--destination=${image}
--digest-file=$(results.IMAGE_DIGEST.path)
others: workingDir: / runAs: root workspaces.source: /workerspace/source results.IMAGE_DIGEST.path: /tekton/results/IMAGE_DIGEST
The above is the build environment and command line options I used.
I'm using kaniko in tekton and I have no need to use kaniko cache.
But I still found that there are built contexts cache in the /kaniko directory. My common technical architecture is Java, and each jar package is more than 100M. If there is such a context cache problem, once the number of tekton tasks reaches hundreds or thousands or more, my k8s host disk will be full. At present, my temporary method is to clean up tekton tasks regularly, but I still want to keep most of the task containers because I want to see the historical container logs.
So, please help to see if what I reported is a problem. If so, please help fix it as soon as possible. Thank you very much!