Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After I turned off all caching, all build contexts were still cached in the /kaniko directory #3090

Open
hugtale opened this issue Mar 27, 2024 · 2 comments
Labels
area/caching For all bugs related to cache issues kind/question Further information is requested priority/p1 Basic need feature compatibility with docker build. we should be working on this next.

Comments

@hugtale
Copy link

hugtale commented Mar 27, 2024

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!

@hugtale
Copy link
Author

hugtale commented Mar 27, 2024

image

This picture is seen on the host machine by searching the upperDir directory of the container. At first, I saw the abnormal disk usage problem of the stopped tekton task container through "crictl ps -a".

@hugtale hugtale changed the title all build context cache in /kaniko when container is stopped after I set "no cache" anywhere After I turned off all caching, all build contexts were still cached in the /kaniko directory Mar 27, 2024
@QuanZhang-William QuanZhang-William added area/caching For all bugs related to cache issues kind/question Further information is requested priority/p1 Basic need feature compatibility with docker build. we should be working on this next. labels Mar 27, 2024
@hugtale
Copy link
Author

hugtale commented Mar 29, 2024

image

Because the "--cleanup" option was used earlier, I can only clean this context cache in this way at present. Hope it gets fixed soon, thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/caching For all bugs related to cache issues kind/question Further information is requested priority/p1 Basic need feature compatibility with docker build. we should be working on this next.
Projects
None yet
Development

No branches or pull requests

2 participants